How himanshu8github/travelbuddy works
TravelBuddy is a full-stack trip-planning app. Users browse Indian destinations or sign in, then use a trip form to request an AI itinerary and view its schedule and supporting travel tools; separate dashboard features cover trip history, expenses, chat suggestions, and premium subscriptions. The graph includes documented capabilities even where implementation was not sampled. Edges are limited to visible imports, calls, route registration, or README statements; unsampled page and integration details are not inferred.
Main entry points: App.jsx Page routing · server.js API server · Dashboard.jsx Trip dashboard · auth.hook.js Authentication sync
Components 29
Travel web app
- Page routing
client/src/App.jsx - Destination discovery
client/src/pages/Explore.jsx - Destination details
client/src/pages/Destination.jsx - Trip dashboard
client/src/pages/Dashboard.jsx - Destination catalog
client/src/data/places.js
Trip planning
- Trip request form
client/src/components/ItenaryForm.jsx - Generated itinerary
server/controller/cohere.controller.js - Itinerary tools
client/src/components/itinerary - AI planner
client/src/pages/AiPlanner.jsx - Expense tracking
client/src/pages/ExpenseTracker.jsx - Trip history
client/src/pages/History.jsx
AI services
- API server
server/server.js - Itinerary API route
server/routes/cohere.iteneray.route.js - Chat suggestions route
server/routes/chat.cohere.route.js - Chat suggestions
server/controller/chat.cohere.controller.js - Gemini API route
server/routes/gemini.route.js
Accounts and data
- Authentication sync
client/src/hooks/auth.hook.js - User session state
client/src/store/authstore.js - Firebase services
client/src/firebase.js - Trip data access
client/src/utils/firebaseDBUtils.js
Premium billing
- Premium plans
client/src/components/PaidPlans.jsx - Checkout session
server/controller/payment.controller.js - Payment route
server/routes/stripe.route.js - Payment webhook
server/routes/stripe.webhook.route.js
Other components
- Traveler
- Stripe
- Groq API
- Firestore
- Firebase Auth
Connections 33
- Traveler → Page routing: uses
client/src/App.jsx - Page routing → Destination discovery: routes to
client/src/App.jsx - Page routing → Destination details: routes to
client/src/App.jsx - Page routing → Trip dashboard: routes to
client/src/App.jsx - Page routing → AI planner: routes to
client/src/App.jsx - Page routing → Trip history: routes to
client/src/App.jsx - Page routing → Expense tracking: routes to
client/src/App.jsx - Page routing → Premium plans: routes to
client/src/App.jsx - Destination discovery → Destination catalog: reads
- Destination details → Destination catalog: reads
- Trip dashboard → Trip request form: navigates to
client/src/pages/Dashboard.jsx - Trip request form → Itinerary tools: renders
client/src/components/ItenaryForm.jsx - Trip request form → API server: requests itinerary
- API server → Itinerary API route: mounts
server/server.js - API server → Chat suggestions route: mounts
server/server.js - API server → Gemini API route: mounts
- Itinerary API route → Generated itinerary: routes to
server/routes/cohere.iteneray.route.js - Chat suggestions route → Chat suggestions: routes to
- Generated itinerary → Groq API: generates with
server/controller/cohere.controller.js - Trip dashboard → Trip data access: reads and adds
client/src/pages/Dashboard.jsx - Trip dashboard → Authentication sync: checks session
- Page routing → Authentication sync: syncs session
client/src/App.jsx - Authentication sync → Firebase services: uses
client/src/hooks/auth.hook.js - Authentication sync → User session state: updates
client/src/hooks/auth.hook.js - Firebase services → Firebase Auth: provides
- Trip data access → Firestore: reads and writes
- Traveler → Premium plans: selects plan
- Premium plans → Payment route: starts checkout
- API server → Payment route: mounts
server/server.js - Payment route → Checkout session: routes to
server/routes/stripe.route.js - Checkout session → Stripe: creates session
server/controller/payment.controller.js - Payment webhook → Stripe: verifies events
server/routes/stripe.webhook.route.js - Payment webhook → Firestore: updates plan
server/routes/stripe.webhook.route.js