Skip to content

Repository files navigation

Favespot

A PWA (Progressive Web App) companion for Ghost CMS that lets you log visits to your favorite places, sync draft posts, and maintain index pages — all from your phone in the field.

Built for food bloggers, travel writers, or anyone who reviews places and publishes on Ghost.

(See https://fastfoodie.co for an example of a site that I update with this app)


Features

  • Log visits — name, location, place type, cuisine (for food/drink places), rating, tasting notes, photos
  • Place types — Restaurant, Café, Bar, Hotel, Attraction, Shop, or Other. Cuisine chips only appear for food/drink types. Place type is stored as a Ghost internal tag (#restaurant, #hotel etc.) — never creates public tag pages
  • Sync to Ghost — creates draft posts automatically via the Ghost Admin API
  • Places Index — auto-updates a sortable table page in Ghost after each sync
  • Lunch Specials Index — dedicated index page with a photo modal for lunch specials
  • Photo Gallery — appends visit photos to a Ghost gallery post automatically
  • Bucket List — save places you want to visit, auto-removed when you log a visit
  • Surprise Me — GPS-aware random place picker from your bucket list or visit history
  • Queue — offline-first saves with automatic sync when reconnected
  • Edit visits — edit any queued visit and re-sync to Ghost if already synced
  • Stats dashboard — total visits, average rating, rating distribution, most visited podium
  • Search & filter — search across all fields in the Queue tab
  • Photo reordering — drag and drop to set cover image order before upload
  • Private notes — local-only scratchpad per visit, never sent to Ghost
  • Light/dark mode — toggle in Settings
  • Backup & restore — full JSON export/import for moving between devices

Requirements

  • A self-hosted or managed Ghost CMS site (v5+)
  • A Ghost Admin API key (created in Ghost Admin → Settings → Integrations)
  • Optionally, a Google Places API key for accurate location search and current location lookup
  • A web server to host the static files (or any static host — GitHub Pages, Netlify, etc.)

Setup

1. Host the files

Upload these files to your web server in the same directory:

favespot.html
sw.js
manifest.json
icon-192.png
icon-512.png

The app will be accessible at https://yourserver.com/favespot.html.

2. Create Ghost pages and posts

In Ghost Admin, create the following (all published):

Type Purpose Suggested Slug
Page Places index (sortable table) places-index
Page Lunch specials index nova-lunch
Page All Posts archive all-posts
Post Photo gallery gallery

The All Posts and gallery pages can be left blank — Favespot and the footer script populate them automatically.

3. Configure the app

Open the app, go to Settings, and fill in:

  • Ghost URL — e.g. https://yourblog.com
  • Admin API Key — from Ghost Admin → Settings → Integrations → Add Custom Integration
  • Author Tag — optional tag applied to every post (e.g. your name)
  • Post Status — Draft (recommended) or Publish immediately
  • Google Places API Key — optional, enables accurate business name and current location lookup
  • Index Page Slug — slug of your places index page (default: places-index)
  • Lunch Specials Slug — slug of your lunch specials page (default: nova-lunch)
  • Gallery Post Slug — slug of your gallery post (default: gallery)
  • Surprise Me Radius — default search radius in miles for the Surprise Me feature

Hit Save Settings.

4. Install as a PWA

Android (Chrome): tap the 📲 Install button in the app header, or tap the browser menu (⋮) → Add to Home Screen

iOS (Safari, iOS 16.4+ recommended): tap Share → Add to Home Screen. The in-app Install button is not shown on iOS as Apple does not support the install prompt, but the app works fully once installed.

Desktop (Chrome/Edge): works in browser or installable as a desktop PWA.


Ghost Theme Footer (Optional)

The app works standalone without any theme changes. However, if you also want your Ghost site's homepage to show a posts grid, photo gallery, sortable places index, All Posts archive page, and lunch specials modal, add the included footer snippets to your Ghost theme.

Go to Ghost Admin → Settings → Code Injection → Site Footer and paste the contents of:

  • footer-script-template.html — powers the homepage posts grid (with pinned About post), photo gallery lightbox, sortable places index table, All Posts page with pagination, and contact line on post pages. Update the configuration block at the top of the file with your own values before pasting.
  • nova-lunch-footer-snippet.js — powers the clickable modal on your lunch specials page. Paste this inside the same <script> block alongside the footer script.

CORS Configuration

If your Ghost site and the app are on different domains, you'll need to add CORS headers to your Ghost server for Admin API calls. If using Caddy, add to your Caddyfile:

@ghostapi path /ghost/api/*
header @ghostapi {
    Access-Control-Allow-Origin "https://yourapphost.com"
    Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
    Access-Control-Allow-Headers "Authorization, Content-Type"
}

File Structure

favespot.html                  # Main app (single file PWA)
sw.js                          # Service worker (offline support)
manifest.json                  # PWA manifest
icon-192.png                   # App icon
icon-512.png                   # App icon (large)
footer-script-template.html    # Ghost theme footer script (optional)
nova-lunch-footer-snippet.js   # Lunch specials modal for Ghost theme (optional)
README.md                      # This file

Privacy

All visit data, settings, and private notes are stored locally in your browser's localStorage. Nothing is sent anywhere except directly to your own Ghost instance when you sync. There are no analytics, no third-party services, and no data collection.


License

MIT — free to use, modify, and distribute.


Credits

Author: Aaron Gersztoff, with assistance and from Claude, using vanilla JavaScript, the Ghost Admin API, and Google Places API.

About

A PWA (Progressive Web App) companion for Ghost CMS that lets you log visits to your favorite places, sync draft posts, and maintain index pages — all f rom your phone in the field.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages