A modern real-time bus tracking system built for university campuses
π Live GPS Tracking β’ π Real-time Updates β’ π± Cross-platform β’ π― Role-based Access
π Try Live Demo β’ π API Documentation β’ π οΈ Setup Guide
- π― Overview
- β¨ Key Features
- ποΈ System Architecture
- π Real-Time Communication
- π οΈ Technology Stack
- π System Flow
- π₯ User Roles
- π Quick Start
- π Documentation
- π₯ Team
New Bus App is a comprehensive real-time bus management system designed for university campuses. It enables students to track buses in real-time, drivers to manage trips efficiently, and administrators to oversee the entire transportation network.
The system uses modern web technologies to deliver a seamless experience across all devices, with real-time updates powered by SignalR WebSocket connections.
- π Real-time Tracking: Students know exactly when their bus will arrive
- π± Universal Access: Works on any device with a web browser
- β‘ Instant Updates: No more waiting - get live location updates instantly
- π― Role Management: Different experiences for students, drivers, and admins
| Feature | Description |
|---|---|
| π Live Bus Tracking | See real-time bus locations on interactive map |
| π Smart Notifications | Get alerts when bus approaches your stop |
| π± Mobile Friendly | Full PWA support - works like a native app |
| πΊοΈ Route Visualization | See complete bus routes and stops |
| Feature | Description |
|---|---|
| πΊοΈ Trip Management | Start/stop trips with live location sharing |
| π Passenger Tracking | See students waiting at stops |
| π GPS Integration | Automatic location updates |
| π― Route Guidance | Clear route information and stops |
| Feature | Description |
|---|---|
| π Fleet Management | Manage all buses and drivers |
| π Analytics Dashboard | Track usage patterns and performance |
| π₯ User Management | Control access and permissions |
| βοΈ System Configuration | Customize routes, schedules, and settings |
π Click to expand architecture diagram
flowchart TB
subgraph "Client Layer"
S[π Student App]
D[π Driver App]
A[π¨βπΌ Admin Panel]
end
subgraph "API Gateway"
API[REST API]
HUB[SignalR Hub]
end
subgraph "Business Logic"
AUTH[Authentication Service]
TRIP[Trip Service]
LOC[Location Service]
NOTIFY[Notification Service]
end
subgraph "Data Layer"
DB[(SQL Database)]
end
S -->|HTTP/WebSocket| API
D -->|HTTP/WebSocket| HUB
A -->|HTTP| API
API --> AUTH
HUB --> LOC
HUB --> NOTIFY
AUTH --> DB
TRIP --> DB
LOC --> DB
NOTIFY --> DB
LOC -.->|Real-time| S
NOTIFY -.->|Push| D
Alternative View:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT APPLICATIONS β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
β β Student β β Driver β β Admin β β
β β Web β β Web β β Dashboard β β
β β + PWA β β + PWA β β β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BACKEND INFRASTRUCTURE β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
β β REST API β β SignalR β β Auth Service β β
β β β β Hub β β (JWT) β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
β β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
β β Trip Logic β β Location β β Notification β β
β β Service β β Service β β Service β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA STORAGE β
β βββββββββββββββββββββββββββββββββββββββββ β
β β SQL Server Database β β
β β (Primary Data Store) β β
β βββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Principle | Implementation |
|---|---|
| π Real-time First | SignalR WebSocket for instant updates |
| π± Mobile-First | PWA with offline capabilities |
| π Secure by Design | JWT authentication + role-based access |
| β‘ Scalable | Microservices-ready architecture |
| π― User-Centric | Role-based interfaces and workflows |
The heart of the system is the SignalR Hub that manages real-time communication between all users.
sequenceDiagram
participant Client as "Client App"
participant Hub as "SignalR Hub"
participant Auth as "Auth Service"
participant DB as "Database"
participant Users as "Other Users"
Client->>Hub: WebSocket Connection
Hub->>Auth: Validate JWT Token
Auth-->>Hub: User Profile (ID, Role)
alt Student Role
Hub->>DB: Store student connection
Hub->>Hub: Join "Students" group
else Driver Role
Hub->>DB: Store driver connection
Hub->>Hub: Join "Drivers" group
else Admin Role
Hub->>DB: Store admin connection
end
Hub-->>Client: Connection Ready
Note over Client,Users: Real-time communication begins
Client->>Hub: Share Location
Hub->>DB: Update location
Hub->>Users: Broadcast to relevant group
| Message Type | Direction | Purpose |
|---|---|---|
NewLocationFromDriver |
Driver β Students | Live bus location updates |
NewLocationFromStudent |
Student β Drivers | Student waiting at stop |
ArriveNewStation |
Driver β Students | Bus arrival notification |
stoplocationfromstudent |
Student β Drivers | Student left stop |
TripStatusUpdate |
Driver β Admin | Trip progress updates |
flowchart TD
Start([Trip Start]) --> DriverLogin[Driver Logs In]
DriverLogin --> StartTrip[Start Trip]
StartTrip --> ShareLocation[Share Live Location]
ShareLocation --> StudentConnect{Students Connected?}
StudentConnect -->|Yes| StudentWait[Students See Location]
StudentConnect -->|No| NoStudents[No Active Students]
StudentWait --> CheckStation{Near Station?}
NoStudents --> CheckStation
CheckStation -->|Yes| NotifyStudents[Notify Students]
CheckStation -->|No| ContinueRoute[Continue Route]
NotifyStudents --> StudentBoard[Students Board]
StudentBoard --> CheckStation
ContinueRoute --> CheckStation
CheckStation -->|Trip Complete| EndTrip[End Trip]
EndTrip --> StopLocation[Stop Location Sharing]
StopLocation --> End([Trip Complete])
flowchart LR
subgraph "Student Journey"
S1[Login] --> S2[View Map]
S2 --> S3[Track Bus]
S3 --> S4[Get Notifications]
S4 --> S5[Board Bus]
end
subgraph "Driver Journey"
D1[Login] --> D2[Start Trip]
D2 --> D3[Share Location]
D3 --> D4[Manage Stops]
D4 --> D5[End Trip]
end
subgraph "Admin Journey"
A1[Login] --> A2[View Dashboard]
A2 --> A3[Manage Fleet]
A3 --> A4[Monitor Trips]
A4 --> A5[Generate Reports]
end
S3 -.->|Real-time| D3
D4 -.->|Notifications| S4
D5 -.->|Trip Data| A4
|
Primary Goal: Track buses efficiently Key Actions:
Permissions:
|
Primary Goal: Manage trips safely Key Actions:
Permissions:
|
Primary Goal: Oversee system Key Actions:
Permissions:
|
- π Live Demo: newbus.vercel.app
- π API Docs: newbus.tryasp.net/swagger
# Clone the repository
git clone https://github.com/Yusuf-Hussien/New-Bus-App.git
cd New-Bus-App
# Quick setup (requires .NET 8 + SQL Server)
dotnet restore
dotnet run --project Backend/NewBusProject/NewBusAPI
# Frontend (any HTTP server)
cd Frontend
python -m http.server 5500
# or
npx http-server -p 5500π Detailed Setup: See Documentation/SETUP.md for complete installation guide
| Document | Description |
|---|---|
| π Setup Guide | Complete installation & configuration |
| π’ Deployment | Production deployment options |
| π§ͺ Testing | Testing strategies & guidelines |
| π‘ API Reference | Interactive API documentation |
| π§ Configuration | Environment setup & variables |
Real-time bus tracking with interactive maps and proximity alerts
Trip management with live location sharing and passenger tracking
| Role | Name |
|---|---|
| π Business & System Analysis | Ahmed Abdelhady |
| ποΈ UI/UX & Visual Design | Amr Desouki |
| π¨ Frontend Developer | Ahmed Ibrahim |
| π¨βπ» Backend & Real-Time Features | Kareem Ayman |
| π§ Backend & DevOps (Team Lead) | Yusuf Hussien |
University Project β’ Hurghada University β’ 2025-2026
This project is licensed under the MIT License - see the LICENSE file for details.
