Architecture
A collaborative group trip planner. Friends shape one itinerary together in a shared chat, vote on ideas, and get real walking and Uber times, directions, expenses and a printable plan. A home-lab engine does the thinking; the LLMs suggest, and code decides.
How It Works
Data Flow
tripbuddy.pazlabs.ioA Next.js app, statically exported to Firebase Hosting and installable on a phone. Google sign-in through Firebase Auth; members join a trip with an invite link. Security rules in Firestore decide who can read and change what.
The itinerary, votes, Plan chat, flights, lodging, expenses and the Bring list are Firestore documents. Every phone listens live, so a change on one shows up on the others in about a second. No server sits between the app and its data.
A FastAPI service on a Mac mini keeps Firestore listeners open. A chat message, a new item, a vote that closes, or a PDF request becomes a queued job, processed in order. It writes results back to Firestore, and the apps update on their own.
“Move the Alamo to Saturday morning” is sent with the trip's context to the PazLabs edge router on the Jetson. It routes local first: qwen2.5:7b on Ollama, escalating to Gemini or Grok only when needed, under daily caps. The model returns edit operations, never a whole plan.
The engine applies each edit itself: anchors and locked items never move, check-in and checkout times hold, flights limit who can be there, and walking stays under the day's limit. Refused edits are explained in the reply; the rest apply as a new plan version that anyone can undo.
“Optimize Saturday”, “I'll bring the speaker” and expense messages like “Victor paid $48 for Uber” are recognized in code and handled locally. Expense text is never sent to a cloud model.
Every venue is matched to a Google place. Ratings and hours are fetched live when someone taps, and only the place ID and coordinates are stored. Walking and driving paths are cached for 30 days; miles are measured in code along them. Hard daily quotas keep it inside the free tier.
Each member gets a private calendar link, served read-only from the Mac mini through a Cloudflare Tunnel. The Trip Itinerary PDF is rendered on the engine from the live itinerary and returned through Firestore, so no file storage is needed.
Cost
Built to run for free: Firebase's Spark plan with no Cloud Functions or Storage, home-lab compute, a free Cloudflare Tunnel, Google Maps Platform held inside its free monthly usage by hard daily quotas, the free National Weather Service, and local models first. Photos live in a shared album, linked rather than stored.
Tech Stack