How shrijit37/triptribe-ai works
Project type and purpose
• TripTribe is a full-stack web application that generates personalized travel itineraries.
• Users interact via a React/Vite frontend, which communicates with an Express.js backend using RESTful APIs and stores data in MongoDB.
• It also integrates with the Google Places API for city autocomplete.
File structure
Top-level layout:
• docker-compose.yaml – orchestrates containers for frontend, backend, and MongoDB
• backend/ – Express API
– config/ (db connection)
– controllers/ (route handlers)
– middleware/ (JWT authentication)
– models/ (Mongoose schemas)
– routes/ (defines endpoints)
– utils/ (token creation)
– server.js & index.js (app entry)
– Dockerfile
• frontend/ – React+Vite app
– Redux/ (api slices, auth slice, store)
– src/ (components, pages, context, services)
– public/ & index.html
– Dockerfile & Vite config
README for additional insights
• Tech stack: React/Vite, Redux, Express.js, MongoDB, Google Places API, JWT auth.
• Development & deployment uses Docker Compose, environment variables (.env), and can deploy to Cloud Run, Vercel, etc.
Detail
• Sub-components in the backend (config, routes, controllers, middleware).
• How JWT is created (utils/createToken.js) and checked (middleware/authenticate.js).
• Redux architecture: apiSlice and userApiSlice connecting to service endpoints in frontend/src/services/GlobalApi.jsx.
• Data flows for key features: signup/login, itinerary generation, saving itineraries.