TravelMate is a full-stack itinerary planning app with AI-based POI ranking, optimized route generation, Google Maps visualization, JWT authentication, and PDF export.
- AI-powered POI ranking and clustering
- Google Maps route visualization with polyline decoding
- Day-by-day itinerary planning
- Lightweight Three.js hero animation for landing/auth experience
- JWT auth with access + refresh token flow
- Shareable itinerary day cards
- Avatar customization
- Weather preview for destination
- PDF itinerary export
- Frontend: React 18 (Vite), pure JavaScript (JSX), Tailwind CSS, React Query, React Context, react-hook-form + zod
- Backend: Node.js (ESM), Express, MongoDB/Mongoose, JWT, bcrypt, Winston, pdfkit
- Create a project in Google Cloud Console.
- Enable APIs:
- Maps JavaScript API
- Places API
- Directions API
- Geocoding API
- Distance Matrix API
- Create API keys:
- Frontend key: restrict to HTTP referrers
- Backend key: restrict to server IPs
cd backend
npm install
cp .env.example .env
npm run devcd frontend
npm install
cp .env.example .env
npm run dev- Hard refresh the browser after restarting Vite (
Ctrl+F5). - Verify frontend is running with
npm run devinsidefrontend. - Make sure
frontend/src/index.cssis imported infrontend/src/main.jsx.
- Use pure JavaScript/JSX only.
- Do not hardcode API keys in source code.
GOOGLE_MAPS_API_KEYis validated on backend startup..env.examplefiles include required variables for both backend and frontend.