A smart mobile application that calculates toll charges, fuel expenses, and total trip cost in real-time, helping users plan road trips efficiently and manage travel expenses.
TollFuel Pro is a full-stack mobile application built using Flutter (frontend) and Kotlin Spring Boot (backend). It enables users to estimate travel costs by combining toll data and fuel consumption, making it ideal for daily commuters, travelers, and fleet managers.
- Toll Cost Estimation – Calculates toll charges based on distance and route
- Fuel Cost Calculator – Estimates fuel expenses using mileage and fuel price
- Total Trip Cost Breakdown – Displays combined toll + fuel cost
- Trip History – Stores and retrieves previous trips
- Cross-Platform UI – Built with Flutter for smooth mobile experience
- REST API Backend – Kotlin Spring Boot handles business logic
- Database Integration – MySQL for persistent storage
- Flutter
- Dart
- Dio (API communication)
- Material UI
- Kotlin
- Spring Boot
- Spring Data JPA
- REST APIs
- MySQL
TollFuelPro/
│
├── frontend/ # Flutter mobile application
│ └── lib/
│ ├── screens/ # UI screens (Trip screen, etc.)
│ ├── services/ # API service layer
│ ├── models/ # Data models
│ └── main.dart # App entry point
│
├── backend/ # Kotlin Spring Boot backend
│ └── src/main/kotlin/com/tollfuelpro/
│ ├── controller/ # REST controllers
│ ├── service/ # Business logic
│ ├── model/ # Entity classes
│ ├── repository/ # Database access layer
│ └── TollFuelProApplication.kt
│
└── database/ # Database configuration
- Flutter SDK
- Android Studio / VS Code
- Java 17+
- MySQL installed
- Gradle
- Navigate to backend folder:
cd backend
- Configure database in
application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/tollfuel
spring.datasource.username=root
spring.datasource.password=yourpassword
- Create database:
CREATE DATABASE tollfuel;- Run backend server:
./gradlew bootRun
Server runs on:
http://localhost:8080
- Navigate to frontend folder:
cd frontend
- Install dependencies:
flutter pub get
- Run the app:
flutter run
POST /trip/calculate
Request Body:
{
"distance": 100,
"mileage": 20,
"fuelPrice": 100
}Response:
{
"fuelCost": 500,
"tollCost": 150,
"totalCost": 650
}POST /trip/save
GET /trip/all
For Android Emulator use:
http://10.0.2.2:8080
Instead of:
localhost
- Google Maps route integration
- Live toll detection
- Toll alerts & notifications
- Fleet management system
- Payment & subscription system
- Advanced analytics dashboard
-
User enters trip details (distance, mileage, fuel price)
-
Flutter app sends request to backend API
-
Backend calculates:
- Fuel cost = Distance / Mileage × Fuel Price
- Toll cost = Estimated based on route
-
Response is returned and displayed in UI
- Daily commuters
- Road trip planners
- Cab drivers
- Logistics & transport companies
Contributions are welcome!
- Fork the repository
- Create a new branch
- Make changes
- Submit a pull request
This project is open-source and available under the MIT License.
Rika
- Passionate about building innovative tech solutions 🚀
- Exploring Flutter, AI, and full-stack development
If you like this project, give it a ⭐ on GitHub!