Skip to content

A real-time school van tracking platform with separate mobile apps for drivers and parents, providing live location updates, in-app messaging, student management, trip management, route optimization and instant notifications.

Notifications You must be signed in to change notification settings

LishanSD/TrackMyVan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

160 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrackMyVan

TrackMyVan is a mobile application to provide real-time tracking, notifications, and safety updates for school van transport services in Sri Lanka. It consists of two client applications (Driver and Parent apps) connected to a cloud-based Firebase backend for real-time data synchronization.

Table of Contents

  1. System Architecture
  2. Tech Stack
  3. Features & Design
  4. Database Schema
  5. Mobile Challenges Addressed

System Architecture

Overview

The architecture follows a client-server model with two React Native applications:

  • Driver Mobile App: For van drivers to manage trips and share location.
  • Parent Mobile App: For parents to track their child's location and attendance.
  • Backend Layer: Firebase Authentication, Realtime Database, Firestore, Storage.

External Services

  • Google Maps Platform: Mapping and geocoding services.
  • Open Routing Service: Route Optimization.
  • Device GPS: Hardware-level location services.

High level Architecture

Screenshot From 2026-02-15 11-02-05

Route Optimization Flow

Screenshot From 2026-02-15 11-02-55

Authentication Flow

Screenshot From 2026-02-15 11-02-41

Real-Time Location Tracking Flow

Screenshot From 2026-02-15 11-02-21

Tech Stack

Frontend

  • Framework: React Native 0.81.5 (Expo SDK 54.0.0)
  • Language: TypeScript
  • Navigation: Expo Router
  • Maps: React Native Maps
  • Styling: NativeWind + TailwindCSS

Backend

  • Database: Firebase Realtime Database (Location/Trip Data) & Firestore (User/Student Data)
  • Authentication: Firebase Authentication
  • Logic: Node.js runtime (Cloud Functions/Client SDK)
  • API Communication: Axios (Driver-App), Firebase SDK 10.7.0

Development Tools

  • Visual Studio Code
  • Expo CLI
  • Git

Features & Design

Key Modules

  • Real-Time Tracking: Drivers update location every 5 seconds; Parents view live updates.
  • Route Optimization: Uses OpenRouteService for optimized paths.
  • Authentication: Secure login for Parents and Drivers.
  • Trip Management: Start/End trips, mark attendance (Picked Up/Dropped Off).
  • Notifications: Automated status updates for parents.

Driver App UI

  • Dashboard for trip summary.
  • Map view for navigation.
  • Student list for attendance.
  • Settings & Messages.
Screenshot From 2026-02-15 11-03-41 Screenshot From 2026-02-15 11-03-35 Screenshot From 2026-02-15 11-03-15 Screenshot From 2026-02-15 11-03-50 Screenshot From 2026-02-15 11-03-44

Parent App UI

  • Real-time map view of the child.
  • Attendance logs.
  • Driver communication (Messages).
  • Child profile management.
Screenshot From 2026-02-15 11-04-03 Screenshot From 2026-02-15 11-03-59 Screenshot From 2026-02-15 11-03-55

Database Schema

Firestore Collections

students

"student_uid": {
  "age": "string",
  "grade": "string",
  "name": "string",
  "status": "string",
  "driverId": "string", // Foreign Key to Driver
  "parentId": "string", // Foreign Key to Parent
  "homeLocation": { "latitude": "number", "longitude": "number" },
  "schoolLocation": { "latitude": "number", "longitude": "number" }
}

users (split into drivers and parents)

  • drivers/{driver_id}: Name, Email, Phone, Role.
  • parents/{parent_id}: Name, Email, Phone, Role.

trips

"trip_id": {
  "date": "string",
  "driverId": "string",
  "status": "string",
  "startTime": "Timestamp",
  "endTime": "Timestamp",
  "children": [{ "childId": "string", "status": "string" }]
}

routes

Stores optimized route geometry and waypoints for navigation.

messages

Stores chat messages between drivers and parents.

Realtime Database Structure

locations/{driver_uid}

{
  "bearing": "number",
  "lat": "number",
  "lng": "number",
  "speed": "number",
  "timestamp": "number (Epoch)"
}

Mobile Challenges Addressed

  1. Real-Time Synchronization:

    • Used Firebase Realtime Database with onValue listeners for instant location updates (5s interval).
    • Subscription management to prevent memory leaks.
  2. Network Reliability:

    • Implemented exponential backoff for API calls (3 attempts, 1s -> 5s delay).
    • Graceful UI fallbacks for offline states.
    • Rate limiting via custom RateLimiter class for OpenRouteService (40req/min).
  3. Battery Optimization:

    • Location updates configured with time (5s) and distance (10m) thresholds to balance accuracy and power consumption.

About

A real-time school van tracking platform with separate mobile apps for drivers and parents, providing live location updates, in-app messaging, student management, trip management, route optimization and instant notifications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages