How kritika8006/tripwise works
TripWise is a collaborative trip-planning application: users authenticate, create trips, collect member preferences, and access generated plans, destination discovery, chat, events, and budget tools. The web client routes users to these features and sends API requests; the Express backend dispatches requests to route handlers and domain services, which use PostgreSQL for application data. Planning and destination search include AI/embedding capabilities. Several domain modules are documented by the source index but were not excerpted, so their internal behavior and some client-to-server links are not asserted.
Main entry points: index.js Express API · App.jsx App routing · api.js HTTP client · database.js PostgreSQL
Components 33
Web client
- App routing
frontend/src/App.jsx - Auth hook
frontend/src/hooks/useAuth.js - Trip views
frontend/src/pages/TripDetailPage.jsx - Preferences
frontend/src/pages/PreferencesPage.jsx - Plan view
frontend/src/pages/PlanPage.jsx - Budget view
frontend/src/pages/BudgetPage.jsx - Chat view
frontend/src/pages/ChatPage.jsx - Destination view
frontend/src/pages/DestinationsPage.jsx - HTTP client
frontend/src/services/api.js
API domains
- Express API
backend/src/index.js - Auth routes
backend/src/routes/auth.js - Trip routes
backend/src/routes/trips.js - Group routes
backend/src/routes/groups.js - Preference routes
backend/src/routes/preferences.js - Plan routes
backend/src/routes/plans.js - Chat routes
backend/src/routes/chat.js - Destination routes
backend/src/routes/destinations.js - Event routes
backend/src/routes/events.js - Budget routes
backend/src/routes/budget.js - Auth controller
backend/src/controllers/authController.js - Group controller
backend/src/controllers/groupController.js - Preference controller
backend/src/controllers/preferencesController.js - Authentication checks
backend/src/middleware/auth.js
Planning services
- Plan generation
backend/src/services/planningService.js - PDF export
backend/src/services/pdfService.js - Destination intelligence
backend/src/services/ragService.js - Trip chat
backend/src/services/chatService.js - Event discovery
backend/src/services/eventsService.js - Budget calculation
backend/src/services/budgetService.js
State and storage
- Auth state
frontend/src/store/authSlice.js - Trip state
frontend/src/store/tripSlice.js - PostgreSQL
backend/src/config/database.js
Other components
- Traveler
Connections 44
- Traveler → App routing: uses
frontend/src/App.jsx - App routing → Auth hook: checks auth
frontend/src/App.jsx - Auth hook → Auth state: loads state
frontend/src/hooks/useAuth.js - App routing → Trip views: routes to
frontend/src/App.jsx - App routing → Preferences: routes to
frontend/src/App.jsx - App routing → Plan view: routes to
frontend/src/App.jsx - App routing → Budget view: routes to
frontend/src/App.jsx - App routing → Chat view: routes to
frontend/src/App.jsx - App routing → Destination view: routes to
frontend/src/App.jsx - Trip views → HTTP client: requests data
frontend/src/pages/TripDetailPage.jsx - Preferences → Trip state: dispatches updates
frontend/src/pages/PreferencesPage.jsx - Plan view → HTTP client: requests plans
frontend/src/pages/PlanPage.jsx - Budget view → HTTP client: requests budget
frontend/src/pages/BudgetPage.jsx - Chat view → HTTP client: sends chat
frontend/src/pages/ChatPage.jsx - Destination view → HTTP client: searches destinations
frontend/src/pages/DestinationsPage.jsx - Trip state → HTTP client: calls API
frontend/src/store/tripSlice.js - Auth state → HTTP client: calls API
frontend/src/store/authSlice.js - HTTP client → Express API: sends requests
- Express API → Auth routes: mounts routes
backend/src/index.js - Express API → Trip routes: mounts routes
backend/src/index.js - Express API → Group routes: mounts routes
backend/src/index.js - Express API → Preference routes: mounts routes
backend/src/index.js - Express API → Plan routes: mounts routes
backend/src/index.js - Express API → Chat routes: mounts routes
backend/src/index.js - Express API → Destination routes: mounts routes
backend/src/index.js - Express API → Event routes: mounts routes
backend/src/index.js - Express API → Budget routes: mounts routes
backend/src/index.js - Auth routes → Auth controller: dispatches to
backend/src/routes/auth.js - Group routes → Group controller: dispatches to
backend/src/routes/groups.js - Preference routes → Preference controller: dispatches to
backend/src/routes/preferences.js - Plan routes → Plan generation: invokes
backend/src/routes/plans.js - Plan routes → PDF export: exports PDF
backend/src/routes/plans.js - Chat routes → Trip chat: invokes
backend/src/routes/chat.js - Destination routes → Destination intelligence: searches with
backend/src/routes/destinations.js - Event routes → Event discovery: invokes
backend/src/routes/events.js - Budget routes → Budget calculation: invokes
backend/src/routes/budget.js - Auth routes → Authentication checks: protects endpoints
backend/src/routes/auth.js - Plan routes → Authentication checks: protects endpoints
backend/src/routes/plans.js - Plan generation → Destination intelligence: uses context
backend/src/services/planningService.js - Destination intelligence → PostgreSQL: queries destinations
backend/src/services/ragService.js - Auth controller → PostgreSQL: reads and writes
backend/src/controllers/authController.js - Group controller → PostgreSQL: manages members
backend/src/controllers/groupController.js - Preference controller → PostgreSQL: stores preferences
backend/src/controllers/preferencesController.js - Authentication checks → PostgreSQL: checks users
backend/src/middleware/auth.js