Voyage AI - AI-Powered Trip Planner
A beautiful trip planning application built with Next.js, mapcn (MapLibre), and Google Gemini AI.
Features
- πΊοΈ Interactive Maps - Beautiful map interface powered by mapcn and MapLibre
- π€ AI-Powered Planning - Use Google Gemini to generate trip itineraries from natural language
- π Multi-Stop Routes - Add multiple destinations and see driving routes between them
- π Trip Statistics - View total distance and estimated travel time
- π Dark/Light Mode - Automatic theme switching based on system preference
- π Location Search - Search for any location using OpenStreetMap/Nominatim
Getting Started
Prerequisites
- Node.js 18+
- npm or yarn
- Google Gemini API key (get one at Google AI Studio)
Installation
- Clone the repository and navigate to the project:
- Install dependencies:
- Create a
.env.localfile in the root directory:
GEMINI_API_KEY=your_gemini_api_key_here
- Start the development server:
- Open http://localhost:3000 in your browser.
Usage
Basic Location Search
Type a location name in the search bar and click on a result to add it to your trip.
AI Trip Planning
Use natural language to plan your trip:
- "Plan a 3-day trip to Paris"
- "Road trip from Los Angeles to San Francisco"
- "Best attractions in Tokyo"
- "Weekend getaway in New York City"
The AI will suggest locations, provide descriptions, and automatically add them to your map.
Managing Your Trip
- Click on a stop in the sidebar to highlight it on the map
- Click the trash icon to remove a stop
- Routes and distances are calculated automatically between stops
Tech Stack
- Framework: Next.js 15 with App Router
- Map Library: mapcn (MapLibre wrapper)
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui
- AI: Google Gemini
- Routing: OSRM (Open Source Routing Machine)
- Geocoding: Nominatim (OpenStreetMap)
API Routes
POST /api/gemini- Process natural language queries with Gemini AIGET /api/geocode?q=<query>- Geocode location names to coordinates
Credits
- Map tiles by CARTO
- Routing by OSRM
- Geocoding by OpenStreetMap/Nominatim
- Map components by mapcn