Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

128 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BusBuddy icon

BusBuddy

One platform, three apps β€” live school-bus tracking for administrators, parents, and drivers.

Flutter Dart Firebase State Theme License


πŸš€ Overview

BusBuddy is a Flutter app that turns a single sign-in into the right experience for each person who touches the school run. One login resolves the user's role and routes them to one of three purpose-built apps β€” an Admin fleet console, a Parent tracker, and a Driver companion β€” all sharing one Firebase backend, one typed data layer, and a polished light/dark design system.

Role App Accent What they do
πŸ›‘οΈ Administrator Admin Indigo Manage buses, drivers, students, routes & assignments; watch the whole fleet live; read attendance/occupancy reports
πŸ‘¨β€πŸ‘©β€πŸ‘§ Parent / Student Parent Mint Track their bus live with ETA & next stop, see the driver & route, get notifications
πŸ§‘β€βœˆοΈ Driver Driver Amber Follow the route & stops, broadcast live location, mark attendance with a QR scan

How it works: a user's Firestore level (1 = Admin, 2 = Parent, 3 = Driver) drives appForRole(...) after login, so each role only ever sees its own app.

At a glance: 3 role-based apps Β· ~39 screens Β· one shared Firebase backend & typed data layer Β· 204 tests Β· full light & dark.


✨ Features

  • πŸ“ Live GPS tracking β€” real-time bus positions on an OpenStreetMap map (flutter_map), with theme-aware tiles, route polylines, stop markers and staleness indicators.
  • 🧭 Route & stop progress β€” per-stop reached / next / upcoming status with a visual timeline and progress bar.
  • πŸ“· QR attendance β€” drivers mark students present by scanning a code.
  • πŸ”” Push notifications β€” broadcast and per-role messages (Firebase Messaging + OneSignal).
  • πŸ“Š Reports & analytics β€” fleet occupancy, attendance rate and per-route breakdowns with charts (fl_chart).
  • πŸŒ“ Light & dark mode β€” every screen, in all three apps, via ThemeExtension palettes + a shared ThemeController.
  • πŸ” Role-based access β€” one branded login, three role-gated apps.
  • πŸ“₯ Data export β€” admins can download fleet/attendance data.
  • ⚑ Offline-aware β€” Firestore persistence and streams hoisted out of build() for smooth performance.

πŸ”‘ Login

A single branded login (brand blue #2563EB, light & dark) is the entry point for all three roles.

Login (light) Β Β  Login (dark)

πŸ“± The apps

πŸ›‘οΈ Admin β€” fleet console (indigo)

Manage the entire operation: buses, drivers, students, routes, contacts and assignments; watch every bus live on one map; and read attendance & occupancy reports.

Home β€” light Home β€” dark Live tracking Reports
All Admin screens (light & dark)
Screen Light Dark
Home
Driver management
Add driver
Students management
Add students
Bus management
Add bus
Assign bus
Route management
Add route
Stop picker
Contacts management
Add contacts
Live tracking
Reports (1)
Reports (2)
Notification management
Add notification
Feedback
Settings
Download data

πŸ‘¨β€πŸ‘©β€πŸ‘§ Parent β€” live tracker (mint)

A calm, focused experience for families: where is my child's bus, which stop is next, and how far away is it.

Home β€” light Home β€” dark Live location Bus details
All Parent screens (light & dark)
Screen Light Dark
Home
Bus
Live location
Tracking
Account
Contacts
Feedback
Notifications
Settings

πŸ§‘β€βœˆοΈ Driver β€” route companion (amber)

Everything a driver needs at a glance: the live map and route, the next stop, and one-tap QR attendance.

Home β€” light Home β€” dark Attendance QR scan
All Driver screens (light & dark)
Screen Light Dark
Home
Attendance
QR / barcode scan
Account
Contacts
Feedback
Notifications
Settings

🧱 Architecture

BusBuddy is one Flutter project containing three role apps over a shared, typed data layer:

lib/
β”œβ”€β”€ main.dart            # boot β†’ Firebase β†’ auth gate β†’ appForRole(role)
β”œβ”€β”€ login_pages/         # branded login + LoginBloc
β”œβ”€β”€ routing/             # appForRole router
β”œβ”€β”€ theme/               # shared brand theme + ThemeController (light/dark)
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ models/          # typed models (Driver, Student, Bus, Route, AssignedBus, StopsStatus, …)
β”‚   └── repositories/    # abstract repo + Firebase impl per collection (mockable, injectable)
β”œβ”€β”€ app1/                # πŸ›‘οΈ Admin  (AdminPalette Β· indigo)
β”œβ”€β”€ app2/                # πŸ‘¨β€πŸ‘©β€πŸ‘§ Parent (ParentPalette Β· mint)
└── app3/                # πŸ§‘β€βœˆοΈ Driver (DriverPalette Β· amber)
  • State management β€” BLoC for flows (login, navigation) plus a repository pattern: every Firestore collection has an abstract repository and a Firebase implementation, so pages depend on interfaces and are unit-testable with fakes.
  • Theming β€” each app defines a ThemeExtension palette (light + dark) read via context.palette; a shared ThemeController (backed by shared_preferences) toggles Light / Dark / System.
  • Maps β€” flutter_map + latlong2, with theme-aware tiles (OSM light / Carto dark).
  • Tested β€” 204 widget/repository tests; UI screens are guarded by render tests that fail on layout overflow.

πŸ‘¨β€πŸ’» Tech stack

  • Flutter & Dart
  • Firebase β€” Authentication, Cloud Firestore, Cloud Functions, Storage, Messaging, Realtime Database
  • BLoC + repository pattern for state & data
  • flutter_map + latlong2 for live maps Β· fl_chart for reports
  • mobile_scanner / NFC for attendance Β· geolocator for driver location

πŸ› οΈ Getting started

1. Clone & install

git clone https://github.com/Adith-Senthil-kumar/Bus_management_app.git
cd Bus_management_app
flutter pub get

2. Configure Firebase

Firebase config files are intentionally not committed β€” point the app at your own Firebase project:

# easiest: generates lib/firebase_options.dart for every platform
dart pub global activate flutterfire_cli
flutterfire configure

Or add the platform files manually:

  • android/app/google-services.json
  • ios/Runner/GoogleService-Info.plist
  • macos/Runner/GoogleService-Info.plist

In the Firebase console, enable Authentication (Email/Password), Cloud Firestore, and Storage.

3. Run

flutter run                 # pick a device
flutter run -d chrome       # web (great for a quick demo)
flutter run --release       # noticeably smoother than debug

4. Test

flutter test
flutter analyze

🎨 App icon

The launcher icon is generated reproducibly from Flutter's canvas (no external image tools needed):

flutter test test/tools/generate_app_icon.dart   # paint the 1024Β² masters β†’ assets/
dart run flutter_launcher_icons                   # fan out to every platform

πŸ™Œ Contributors

  • Adith Senthil Kumar β€” Lead Developer

πŸ“„ License

Released under the MIT License.

About

Streamlining College Transportation with Real-Time Tracking and Multi-User Functionality

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages