Smart Road Trip Planner is a modern web application designed to help travelers plan their road trips with detailed route information, gas station locations, attractions, cost estimation, and AI-powered assistance. The application features an interactive map interface with a sleek dark mode design and teal accent colors.
- Responsive map interface powered by Mapbox GL JS
- Custom route visualization with teal color scheme
- Interactive markers for start, end, gas stations, and attractions
- Distance overlay showing route length in km and miles
- Global location support with special enhancements for Indian travel
- Customizable routes with options for scenic routes and toll avoidance
- Detailed turn-by-turn directions
- Trip summary with distance and estimated duration
- Automatic discovery of gas stations along your route
- Interactive gas station list with distance information
- Toggle gas station visibility with a single click
- Discover interesting attractions along your journey
- Image gallery for attractions using Unsplash API with Flickr as fallback
- Rich attraction information with interactive markers
- Toggle attraction visibility
- Detailed trip cost estimation for fuel expenses
- Customized for Indian travel with INR currency support
- Rest stop recommendations based on trip duration
- Toll expense estimates for major routes
- Integrated AI chatbot using Groq's LLama3 model
- Get weather conditions along your route
- Ask for personalized trip recommendations
- Natural language interaction for route inquiries
- Modern dark-themed interface with teal neon accents
- Responsive design that works on desktop and mobile devices
- Animated transitions and interactive elements
- Frontend: HTML5, CSS3, JavaScript (ES6+), Tailwind CSS
- Mapping: Mapbox GL JS
- Routing: OpenRouteService API
- Geocoding: OpenRouteService Geocoding API
- Points of Interest: OpenRouteService POI API, Overpass API (fallback)
- Image Search: Unsplash API with Flickr API fallback
- AI Integration: Groq API (LLama3-8b model)
- Weather Data: Weather API integration
- API Keys for:
- OpenRouteService (
ORS_API_KEY) - Mapbox (
MAPBOX_ACCESS_TOKEN) - Unsplash (
UNSPLASH_ACCESS_KEY) - Groq (
GROQ_API_KEY) - optional, for AI features
- OpenRouteService (
-
Clone the repository:
git clone https://github.com/yourusername/smart-road-trip-planner.git cd smart-road-trip-planner -
Update API keys in
script.js:const ORS_API_KEY = 'your_openrouteservice_api_key'; const MAPBOX_ACCESS_TOKEN = 'your_mapbox_api_key'; const UNSPLASH_ACCESS_KEY = 'your_unsplash_api_key';
-
Update Groq API key in
chatbot.js(if using AI features):const GROQ_API_KEY = 'your_groq_api_key';
-
Serve the application:
- For local development, you can use a simple HTTP server:
# Python 3 python -m http.server # Or with Node.js npx serve
- Or deploy to your preferred hosting service
- For local development, you can use a simple HTTP server:
-
Access the application in your browser at
http://localhost:8000or your hosted URL
- Enter a starting location and destination in the input fields
- Optionally select route preferences (scenic routes, avoid tolls)
- Click "Plan My Trip" to calculate and display the route
- View trip summary with distance, duration, and cost estimates
- After planning a trip, gas stations and attractions along the route are automatically discovered
- Use the "Gas Stations" and "Attractions" toggle buttons to show/hide markers
- Click on markers or list items to view more details
- For attractions, click "View Photos" to open the image gallery
- Click the chat icon in the bottom-right corner to open the chatbot panel
- Ask questions about your trip, such as:
- "What's the weather like along my route?"
- "Recommend attractions between Delhi and Mumbai"
- "How long will it take to drive from Bangalore to Chennai?"
- "What's the fuel cost for this trip?"
This application is ready for deployment on various platforms. For detailed deployment instructions, see DEPLOYMENT.md.
Remember to set your environment variables as described in the deployment guide.
- Geocoding: Convert location names to coordinates
- Directions: Calculate routes between locations
- Places: Find points of interest along routes
- Map rendering and interaction
- Custom marker and layer styling
- Route visualization
- Search for high-quality images of attractions
- Display image galleries
- Natural language processing for the chatbot
- Trip cost calculations and recommendations
smart-road-trip-planner/
βββ public/ # Static files
β βββ index.html # Main HTML file
β βββ styles.css # External CSS styles
β βββ script.js # Main application logic
β βββ chatbot.js # AI chatbot integration
β βββ deployment-config.js # Environment variable handling
βββ server.js # Express server for serving the application
βββ package.json # Project dependencies and scripts
βββ .env.example # Example environment variables
βββ .gitignore # Git ignore configuration
βββ vercel.json # Vercel deployment configuration
βββ Procfile # Heroku deployment configuration
βββ DEPLOYMENT.md # Detailed deployment instructions
βββ README.md # This documentation
- Update placeholder text in
script.jsto show different default locations - Modify the default map center in the
initMap()function
- Modify the color scheme by updating CSS variables in
styles.css - Customize UI components using Tailwind classes in
index.html
- Fuel consumption and price defaults are set for Indian travel (15km/liter, βΉ100/liter)
- Modify these values in the
calculateTripCosts()function if needed
- Route calculation may fail for very long distances
- POI discovery depends on OpenRouteService API coverage
- Some attractions may not have available images
- Weather data is approximate and may not be available for all locations
- Add multi-stop route planning
- Implement user accounts for saving trips
- Incorporate real-time traffic data
- Add more transportation options (walking, cycling, public transport)
- Enhance offline capabilities
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenRouteService for routing and POI APIs
- Mapbox for mapping technology
- Unsplash and Flickr for image search capabilities
- Groq for AI chatbot capabilities
Β© 2025 Smart Road Trip Planner | Made with β₯ for global travelers
