Skip to content

steevebisson/trip-hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trip-hub

trip-hub is an AI-assisted road-trip planner that turns a plain-language request into a single shareable HTML page — a "trip hub" — with an interactive Leaflet map, per-stop Do/Eat/Shop picks (each with a booking link and a Google Maps link), lodging cards with live group voting, EV-charging stop planning, and one-command auto-deploy to Netlify. You describe the trip; Claude Code does the research and builds the page; everyone in your group gets a link.

Origin story

This started as a way to plan an 11-day Montréal → Niagara loop built around casinos and lakes: a dozen stops, real hotel options, EV charging along the route, and a way for the group to vote on where to stay without a group chat turning into a spreadsheet. A few days after that trip was planned, the same approach got reused — with no code changes — to plan a much smaller Mont-Tremblant getaway, and it worked well enough that a real hotel got booked off the resulting page. That single-destination example is checked in at examples/mont-tremblant-hub.html — open it in a browser to see what the tool actually produces before you build your own.

How it works

There's no app to run and no server to stand up. You work inside this repo with Claude Code, and Claude does three things:

  1. Searches live listings for hotels, restaurants, activities, and shops along your route using Firecrawl, rather than relying on stale training data.
  2. Builds (or refreshes) your trip page from templates/trip-template.html — a generic, self-contained HTML/CSS/JS template with placeholder data blocks that Claude fills in with your real stops, links, and coordinates.
  3. Deploys automatically — a Stop hook runs deploy-netlify.sh after every turn, so the moment Claude finishes editing your trip page, the live version is updated. No manual netlify deploy.

The pipeline/ directory holds the reference scripts Claude reads and adapts per trip (parsing search results, enriching listings, applying refreshes to an existing page) — they're a starting point, not a black box; expect Claude to tweak them per trip rather than run them unmodified.

Quickstart

git clone https://github.com/steevebisson/trip-hub && cd trip-hub
cp .env.example .env            # add your FIRECRAWL_API_KEY
npm install -g netlify-cli && netlify login
netlify sites:create --name my-trip-hub     # then put its ID/URL in .env
# group voting bin (put the returned ID into your trip page's BLOB constant):
curl -si -X POST -H "Content-Type: application/json" -d '{"votes":{}}' https://jsonblob.com/api/jsonBlob | grep -i location

Then open the repo in Claude Code and say something like:

"Plan me a trip to X for N people using templates/trip-template.html — search real listings and build my hub page."

Claude will search for real places, populate the template, and give you a page you can open locally or deploy.

Auto-deploy on every change

deploy-netlify.sh is the deploy contract: it's driven entirely by environment variables (NETLIFY_SITE_ID, NETLIFY_SITE_URL, PUBLISH_FILES — a space-separated list of files to publish), it always exits 0 so it never blocks Claude Code, and it talks back only via a single {"systemMessage": "..."} line on stdout. It hashes the files in PUBLISH_FILES and skips the deploy silently if nothing changed, so it's safe to run after every single turn. If NETLIFY_SITE_ID isn't set, or the netlify CLI isn't installed, it says so and exits cleanly rather than failing.

To wire it into Claude Code, add this to your own (untracked, machine-local) .claude/settings.local.json:

{"hooks":{"Stop":[{"hooks":[{"type":"command","command":"bash deploy-netlify.sh","timeout":120}]}]}}

With that in place, every time Claude finishes responding, your published trip files are re-deployed to Netlify if they changed — so your trip hub link is always current, without you doing anything.

Voting caveats

Group voting works by writing votes to a public jsonblob.com bin — the template ships with a PASTE_YOUR_BIN_ID placeholder in its BLOB constant that you replace with the bin ID you create in the quickstart above. This is deliberately simple, and that simplicity comes with real tradeoffs you should know about before sharing a link:

  • The bin is public and unauthenticated. Anyone who has the trip hub link can see and change the votes, including resetting them entirely. There's no login and no ownership check.
  • Bins expire after inactivity. jsonblob.com is a free, best-effort service — if nobody touches the bin for a while, it can be garbage-collected and the vote history lost. Don't treat it as durable storage.
  • Votes are positional, not by name. They're tied to the lodging card's position/index on the page, not a stable ID. If you reorder or add/remove lodging cards after voting has started, existing votes can end up attached to the wrong option. Finalize your lodging list before you send the link around.

None of this matters much for a weekend trip with five friends. It would matter a lot for anything you need to be tamper-proof or long-lived.

License

MIT — see LICENSE.

About

AI-assisted road-trip planner: one shareable HTML hub per trip — live lodging voting, maps, EV charging, auto-deploy to Netlify.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors