How anamikasharma1509/travelxp works
TravelXP is a full-stack cultural travel platform for discovering Indian destinations, booking through provider links, planning itineraries, exploring cultural knowledge, and preserving multilingual stories. The principal journey runs from the React client through a REST API to domain services and PostgreSQL, with optional AI and booking-provider integrations. The graph combines sampled call/import evidence with documented capabilities; dashed, uncited links mark product flows whose specific implementation wiring was not shown.
Main entry points: App.tsx React app · client.ts API client · prisma.ts PostgreSQL · storyService.ts Story service
Components 27
Travel client
- React app
client/src/App.tsx - Auth context
client/src/context/AuthContext.tsx - API client
client/src/api/client.ts
API and identity
- REST API
server/src/app.ts - API router
server/src/routes/apiRoutes.ts - Auth routes
server/src/routes/authRoutes.ts - Auth controller
server/src/controllers/authController.ts - Auth service
server/src/services/auth/authService.ts - Auth middleware
server/src/middleware/auth.ts - PostgreSQL
server/src/db/prisma.ts
Travel discovery
- Destination discovery
client/src/pages/DiscoverPage.tsx - Destination details
client/src/pages/DestinationDetailPage.tsx - Destination API
server/src/controllers/destinationController.ts - Destination service
server/src/services/destination/destinationService.ts
Planning and booking
- Booking search
client/src/pages/BookTravelPage.tsx - Booking API
server/src/controllers/bookingController.ts - Booking providers
- Itinerary planning
server/src/services/itinerary/itineraryPlanner.ts - Trip planning UI
client/src/pages/PlanTripPage.tsx - Plan results
client/src/pages/PlanResultsPage.tsx
Knowledge and heritage
- Cultural knowledge
client/src/pages/KnowPage.tsx - AI service
server/src/services/ai/aiService.ts - Story archive
client/src/pages/StoriesPage.tsx - Story API
server/src/controllers/storyController.ts - Story service
server/src/services/story/storyService.ts - Heritage moderation
server/src/controllers/adminController.ts
Other components
- Traveler
Connections 32
- Traveler → React app: uses
client/src/App.tsx - React app → Destination discovery: routes to
client/src/App.tsx - React app → Destination details: routes to
client/src/App.tsx - React app → Booking search: routes to
client/src/App.tsx - React app → Trip planning UI: routes to
client/src/App.tsx - React app → Plan results: routes to
client/src/App.tsx - React app → Cultural knowledge: routes to
client/src/App.tsx - React app → Story archive: routes to
client/src/App.tsx - React app → Auth context: provides
client/src/App.tsx - Auth context → API client: calls
client/src/context/AuthContext.tsx - API client → REST API: sends REST requests
README.md - REST API → API router: mounts
server/src/app.ts - API router → Auth routes: mounts
server/src/routes/apiRoutes.ts - Auth routes → Auth controller: dispatches
server/src/routes/authRoutes.ts - Auth controller → Auth service: calls
server/src/controllers/authController.ts - Auth service → PostgreSQL: queries
server/src/services/auth/authService.ts - Auth middleware → PostgreSQL: checks user
server/src/middleware/auth.ts - Destination discovery → API client: requests destinations
- Destination API → Destination service: delegates
- Destination service → PostgreSQL: queries
server/src/services/destination/destinationService.ts - Booking search → API client: searches providers
client/src/pages/BookTravelPage.tsx - API client → Booking providers: requests provider results
README.md - Booking API → Booking providers: provides search links
- Trip planning UI → Itinerary planning: requests itinerary
- Itinerary planning → Plan results: returns schedule
- Cultural knowledge → AI service: requests explanations
- AI service → PostgreSQL: uses stored context
- Story archive → API client: loads stories
- Story API → Story service: delegates
server/src/controllers/storyController.ts - Story service → PostgreSQL: reads and writes
server/src/services/story/storyService.ts - Story service → AI service: requests translation
server/src/services/story/storyService.ts - Heritage moderation → PostgreSQL: moderates records
server/src/controllers/adminController.ts