SQLite keeps vehicle data on the device for fast access.
Technical guide
FleetTax Docs
A practical reference for the offline Android app: architecture, data flow, notification behavior, setup, build steps, and release resources.
Product
What FleetTax does
FleetTax helps Indian bus and truck fleet owners track Vahan road tax deadlines without depending on cloud sync. Operators can add vehicles, choose the tax period, view the calculated expiry state, receive local reminders, open the Vahan portal, and record payment references after renewal.
Monthly, quarterly, and yearly periods calculate status automatically.
Open Vahan, pay tax, then log date, period, and receipt reference.
Architecture
Application structure
The app follows a clear Flutter structure: models hold business rules, the database helper owns persistence, services handle platform concerns, providers coordinate state, and screens/widgets render the user workflow.
lib/
main.dart
models/vehicle.dart
db/database_helper.dart
providers/vehicle_provider.dart
services/notification_service.dart
screens/dashboard_screen.dart
screens/add_edit_screen.dart
screens/mark_paid_screen.dart
widgets/vehicle_card.dart
widgets/stats_bar.dart
widgets/filter_chips.dart
Persistence
Vehicle data model
| Field | Purpose | Example |
|---|---|---|
reg |
Vehicle registration number | DL01AB1234 |
type |
Commercial vehicle class | bus or truck |
taxPeriod |
Validity period for the most recent payment | monthly, quarterly, yearly |
lastPaid |
Payment date used to calculate expiry | 2026-05-15 |
receiptRef |
Optional receipt or transaction reference | VAHAN-2026-001 |
Reminders
Notification behavior
FleetTax uses WorkManager for periodic background checks and flutter_local_notifications for local alerts. Vehicles become attention-worthy when they are expired or within the 10-day warning window.
- Load saved vehicles from SQLite.
- Calculate each expiry date from
lastPaid + taxPeriod. - Classify status as expired, due soon, or valid.
- Show local notifications for expired and due-soon vehicles.
Developer setup
Run locally
flutter pub get
flutter analyze
flutter test
flutter run
The project targets Flutter with Dart SDK 3.11.5 or newer and Android 13+ behavior for notifications. Keep emulator or device notification permissions enabled while validating reminders.
Release
Build and distribute
flutter clean
flutter pub get
flutter build apk --release
build/app/outputs/flutter-apk/app-release.apk
Attach the APK and PDF guide to the GitHub Releases page.
Support
Troubleshooting checklist
Grant notification permission, verify WorkManager setup, and test on a real device when possible.
Hot restart the app, inspect SQLite migrations, and verify provider reload calls after writes.
Run on a device with a browser installed and check url_launcher Android configuration.