How vishal-bhilwariya/bharatyatra works
BharatYatra is an India travel discovery and planning platform with a React client, Express API, MongoDB persistence, and an admin CMS. A typical user explores destinations, then uses recommendations, itinerary generation, transport planning, translation, or chat assistance; the client’s pages are routed through the API to backend handlers and data. Admins manage travel content through protected CMS pages and API routes. The README documents these capabilities; several backend route and controller implementations were not sampled, so some subsystem links are documented or left unverified rather than inferred from names.
Main entry points: App.jsx Web application · api.jsx API client · models Mongoose models · Transportation.jsx Transport planner
Components 24
Traveler client
- Web application
client/src/App.jsx - Destination discovery
client/src/pages/ExploreStates.jsx - Home and search
client/src/pages/Home.jsx - Culture explorer
client/src/pages/ExploreCulture.jsx - Itinerary planner
client/src/pages/Itinerary.jsx - Recommendations
client/src/pages/Recommendations.jsx - Transport planner
client/src/pages/Transportation.jsx - Translator
client/src/pages/Translator.jsx - Travel assistant
client/src/components/TravelAssistant.jsx - API client
client/src/api/api.jsx - User authentication UI
client/src/context/AuthContext.jsx
Travel services
- Travel API routes
server/routes - Travel handlers
server/controllers
Identity and access
- Authentication routes
server/routes/authRoutes.js - Authentication handlers
server/controllers/authController.js - OTP, token, email services
server/services
Content administration
- Admin CMS pages
client/src/pages/admin - Admin API routes
server/routes - Admin handlers
server/controllers - Admin token middleware
server/middlewares/auth.middleware.js
Persistence
- Mongoose models
server/models
Other components
- Traveler
- Gemini API
- MongoDB
Connections 33
- Traveler → Web application: uses
README.md - Web application → Destination discovery: routes to
client/src/App.jsx - Web application → Home and search: routes to
client/src/App.jsx - Web application → Culture explorer: routes to
client/src/App.jsx - Web application → Itinerary planner: routes to
README.md - Web application → Recommendations: routes to
README.md - Web application → Transport planner: routes to
client/src/App.jsx - Web application → Translator: routes to
client/src/App.jsx - Destination discovery → API client: requests data
- Home and search → API client: requests data
- Culture explorer → API client: requests data
- Itinerary planner → API client: requests plans
README.md - Recommendations → API client: requests results
README.md - Transport planner → API client: requests routes
client/src/pages/Transportation.jsx - Transport planner → Gemini API: estimates route
README.md - Translator → API client: requests translation
README.md - Travel assistant → API client: requests parsing
README.md - API client → Travel API routes: calls API
README.md - Travel API routes → Travel handlers: dispatches
README.md - Travel handlers → Mongoose models: reads and writes
README.md - Mongoose models → MongoDB: persists
README.md - User authentication UI → API client: calls API
client/src/context/AuthContext.jsx - Web application → User authentication UI: provides context
client/src/App.jsx - Authentication routes → Authentication handlers: dispatches
server/routes/authRoutes.js - Authentication handlers → OTP, token, email services: uses services
server/controllers/authController.js - Authentication handlers → Mongoose models: reads and writes
server/controllers/authController.js - Admin CMS pages → API client: requests CMS
README.md - Admin API routes → Admin token middleware: checks token
server/routes/adminStateRoutes.js - Admin API routes → Admin handlers: dispatches
server/routes/adminStateRoutes.js - Admin handlers → Mongoose models: reads and writes
server/controllers/adminStateController.js - Mongoose models → MongoDB: persists
README.md - Web application → Admin CMS pages: routes to
client/src/App.jsx - Web application → Travel API routes: serves API