AI-powered route planning application for cycling and trekking adventures with real-time weather forecasts and interactive maps.
- π€ AI-Powered Route Generation - Generate realistic routes using Google Gemini 2.5 Pro
- π΄ Cycling Routes - 2-day city-to-city routes (max 60km/day)
- π₯Ύ Trekking Routes - Circular hiking routes (5-15km)
- π€οΈ Weather Forecasts - 3-day forecasts from OpenWeatherMap
- πΊοΈ Interactive Maps - Beautiful maps with Leaflet.js and enhanced markers
- πΎ Route Management - Save, view, and manage your routes
- π Secure Authentication - JWT-based auth with bcrypt password hashing
- π± Responsive Design - Mobile-friendly interface with Tailwind CSS
- πΌοΈ Country Images - Beautiful destination photos from Unsplash
- React 19.1.1 with Vite for fast development
- Tailwind CSS 3.4.17 for responsive styling
- React Leaflet 5.0.0 for interactive maps
- Axios 1.11.0 for API communication
- React Router DOM 7.8.0 for navigation
- Lucide React 0.539.0 for icons
- Node.js with Express.js 4.21.2 framework
- MongoDB 6.18.0 with Mongoose 8.17.1 ODM
- JWT 9.0.2 for authentication
- bcrypt 6.0.0 for password security
- Helmet 8.1.0 for security headers
- CORS 2.8.5 for cross-origin requests
- Google Gemini 2.5 Pro - AI route generation
- Google Places API - Location geocoding
- OpenWeatherMap - Weather forecasts
- Unsplash API - Country images
- OpenRouteService - Route optimization
- Node.js (v18 or higher)
- MongoDB (local installation or MongoDB Atlas account)
- Git for version control
- API Keys for external services (see API Setup)
git clone <repository-url>
cd trip-planner# Navigate to server directory
cd server
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Configure your environment variables (see Environment Variables section)
# Start the server
npm run devThe backend will run on http://localhost:5001
# Navigate to client directory (from project root)
cd client
# Install dependencies
npm install
# Create environment file
cp .env.example .env.local
# Start the development server
npm run devThe frontend will run on http://localhost:5173
Create a .env file in the server directory:
# Database
MONGODB_URI=mongodb://localhost:27017/trip-planner
# or MongoDB Atlas: mongodb+srv://username:password@cluster.mongodb.net/trip-planner
# JWT Secret (use a strong random string)
JWT_SECRET=your-super-secret-jwt-key-here
# Google Gemini AI
GEMINI_API_KEY=your-gemini-api-key
# Google Places API
GOOGLE_GEOCODING_API_KEY=your-google-places-api-key
# Weather API
OPENWEATHER_API_KEY=your-openweather-api-key
# Images API
UNSPLASH_API_KEY=your-unsplash-api-key
# Routing API
OPENROUTESERVICE_API_KEY=your-ors-api-key
# Environment
NODE_ENV=development
PORT=5001Create a .env.local file in the client directory:
# API Base URL
VITE_API_URL=http://localhost:5001/api- Visit Google AI Studio
- Create an API key
- Add to
GEMINI_API_KEYin your.envfile
- Go to Google Cloud Console
- Enable Places API
- Create credentials
- Add to
GOOGLE_GEOCODING_API_KEY
- Sign up at OpenWeatherMap
- Get your free API key
- Add to
OPENWEATHER_API_KEY
- Create account at Unsplash Developers
- Create a new application
- Add to
UNSPLASH_API_KEY
- Register at OpenRouteService
- Get API key
- Add to
OPENROUTESERVICE_API_KEY
# Install MongoDB locally
# macOS with Homebrew
brew tap mongodb/brew
brew install mongodb-community
# Start MongoDB service
brew services start mongodb/brew/mongodb-community- Create account at MongoDB Atlas
- Create a new cluster
- Get connection string
- Update
MONGODB_URIin.env
- Create a new account or sign in
- JWT tokens handle secure authentication
- Choose destination (country/city)
- Select trip type:
- Cycling: 2-day routes, max 60km/day
- Trekking: Circular routes, 5-15km
- AI generates realistic routes with actual locations
- Interactive map with enhanced markers
- 3-day weather forecast
- Route statistics and waypoints
- Save routes for future reference
- View saved routes in history
- Filter by trip type
- Search by location
- Delete unwanted routes
trip-planner/
βββ client/ # React frontend
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # Reusable components
β β β βββ auth/ # Authentication components
β β β βββ layout/ # Layout components
β β β βββ route/ # Route-related components
β β β βββ weather/ # Weather components
β β βββ contexts/ # React contexts
β β βββ hooks/ # Custom hooks
β β βββ pages/ # Page components
β β βββ providers/ # Context providers
β β βββ services/ # API services
β β βββ index.css # Global styles
β βββ package.json
β βββ tailwind.config.js
βββ server/ # Express backend
β βββ config/ # Database configuration
β βββ middleware/ # Custom middleware
β βββ models/ # Mongoose models
β βββ routes/ # API routes
β βββ services/ # Business logic services
β βββ package.json
β βββ server.js # Entry point
βββ README.md
βββ .gitignore
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/verify- Token verification
POST /api/routes/generate- Generate new routePOST /api/routes/save- Save routeGET /api/routes/user- Get user routesGET /api/routes/:id- Get specific routeDELETE /api/routes/:id- Delete route
GET /api/weather/forecast/:location- 3-day forecastGET /api/weather/route/:routeId- Weather for saved route
GET /api/images/country/:country- Get country image
This project is licensed under the MIT License.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Built by Michael Arie using React, Node.js, and AI