A modern web application for calculating fuel costs for your trips. Plan your route, calculate the distance, and estimate your fuel expenses - all in one place.
- Route Planning: Set starting point, destination, and optional waypoints
- Interactive Map: View your route on an interactive map powered by Leaflet
- Fuel Cost Estimation: Calculate costs based on distance, fuel consumption, and current fuel prices
- Trip Summary: Get detailed information about distance, travel time, fuel volume, and total cost
- Multiple Fuel Types: Support for different fuel types and custom fuel prices
- React: Modern, component-based UI library
- Leaflet & react-leaflet: Interactive map components
- Axios: HTTP client for API requests
- SASS: Advanced CSS preprocessing
- Vite: Next-generation frontend build tool
- Node.js (v18+)
- npm or bun
- Clone the repository
git clone https://github.com/skorotkiewicz/tripcost
cd tripcost
- Install dependencies
npm install
# or
bun install
- Start the development server
npm run dev
# or
bun dev
- Open your browser and navigate to
http://localhost:5173
- Enter your starting location
- Add your destination
- (Optional) Add waypoints for more complex routes
- Enter your vehicle's fuel consumption (liters per 100km)
- Select your fuel type
- Click "Calculate" to see your results
- View your route on the map and detailed cost breakdown
- OpenStreetMap/Nominatim: For geocoding (converting addresses to coordinates)
- OSRM (Open Source Routing Machine): For route calculation and distance/time estimation
This project is licensed under the MIT License - see the LICENSE file for details.
- Leaflet for the amazing mapping library
- OpenStreetMap for providing the map data
- OSRM for the routing engine