An End-to-End Smart City Platform for Real-Time Traffic Monitoring, Road Incident Management, and Automated Emergency Roadside Assistance.
STMS is a full-stack graduation project engineered to solve urban traffic congestion, enable rapid roadside assistance (towing, battery jumps, fuel delivery, flat tires), and provide unified operational dashboards for city administrators, emergency response teams, customer support agents, and automotive sellers.
graph TD
ClientApp[📱 Flutter Mobile App] -->|REST API / SignalR| Backend[.NET 8 Web API]
WebPortal[💻 React Web Portal] -->|REST API / SignalR| Backend
Backend -->|EF Core SQL| Database[(SQL Server)]
Backend -->|Payment Gateway| Stripe[💳 Stripe API]
ClientApp -->|Location Services| Maps[🗺️ Google Maps API]
| Module | Sub-System | Key Capabilities |
|---|---|---|
| 📱 Mobile App | STMS-main |
• Live Support Chat with Customer Service • Emergency SOS trigger & Real-time provider tracking • Interactive Traffic Map & Incident Reporting • In-App Store & Stripe Payment Checkout |
| 👑 Admin Portal | my-project |
• System-wide user approvals & role management • System health, support ticket workspace, & analytics • Incident history audit & live clock monitoring |
| 🎧 CS Agent Panel | my-project |
• Real-time SignalR ticket chat workspace • Driver & provider lookup with block/unblock tools • Incident escalation & support reporting |
| 🚜 Rescue Provider | my-project |
• Active mission dispatch & real-time route updates • Mission arrival & completion tracking • Earnings dashboard with weekly analytics |
| 🛒 Store Seller | my-project |
• Product catalog management & inventory control • Real-time order processing & status updates |
| ⚙️ Backend API | src |
• Indexed EF Core SQL Server persistence • Dynamic JWT Refresh Token authentication • Secure Stripe Webhook HMAC signature validation |
SmartTrafficManagement/
├── src/ # .NET 8 Backend API & Infrastructure
│ ├── SmartTrafficManagement.API/ # Web API Controllers, Hubs, & Configurations
│ ├── SmartTrafficManagement.Application/# CQRS, DTOs, & Business Logic Handlers
│ ├── SmartTrafficManagement.Core/ # Entities, Constants, & Interfaces
│ └── SmartTrafficManagement.Infrastructure/# EF Core, SignalR, & Database Migrations
├── my-project/ # React Web Operations Portal (Admin, CS, Provider, Seller)
│ ├── src/
│ │ ├── api/ # API Client & SignalR Services
│ │ ├── components/ # UI Components & Navigation
│ │ └── pages/ # Role-based Dashboards (Admin, CsAgent, Provider, Seller)
│ └── vite.config.js
└── STMS-main/ # Flutter Mobile Client Application
├── lib/
│ ├── core/ # Network ApiClient, SignalR, & Theme System
│ └── features/ # Auth, Emergency Tracking, Traffic Maps, & Live Chat
└── pubspec.yaml
Ensure you have the following installed on your machine:
- .NET 8.0 SDK
- Node.js 18.0+
- Flutter SDK 3.19+
- SQL Server (or SQL LocalDB / Docker container)
cd src/SmartTrafficManagement.API
# Restore dependencies
dotnet restore
# Apply database migrations
dotnet ef database update --project ../SmartTrafficManagement.Infrastructure --startup-project .
# Run the API server
dotnet runDefault Endpoints:
http://localhost:5066| Swagger UI athttp://localhost:5066/swagger
cd my-project
# Install dependencies
npm install
# Start Vite dev server
npm run devAccess Portal:
http://localhost:5173
cd STMS-main
# Get packages
flutter pub get
# Run on target device / emulator
flutter run- Dynamic Token Refresh: Both React and Flutter clients feature seamless 401 interceptors to auto-refresh JWT tokens without disturbing user sessions.
- Production Webhook Security: Stripe Webhook HMAC signature validation enforced in production to prevent forged payment events.
- Database Optimization: Custom SQL indexes on foreign keys (
Vehicles,TrafficReports,Orders,OrderItems) ensuring sub-millisecond query execution.
Developed with ❤️ as a Graduation Project by Mohamed Ashraf.