A real-time vehicle tracking proof-of-concept application built with .NET 10 (Preview), ASP.NET Core, SignalR, Leaflet.js, and PostgreSQL/PostGIS.
- Real-time Tracking: Live vehicle positions updated via SignalR.
- Incident Management: Report, view, and manage incidents on the map.
- Dispatch System: Assign incidents to the nearest available vehicles.
- History Playback: Replay vehicle movements over time.
- Responsive Dashboard: Web-based UI with interactive map and sidebars.
- Backend: .NET 10 (ASP.NET Core Web API)
- Frontend: ASP.NET Core MVC / Razor Pages + Vanilla JS
- Database: PostgreSQL + PostGIS (Spatial Data)
- Real-time: SignalR
- Maps: Leaflet.js + OpenStreetMap/CartoDB
- Containerization: Docker & Docker Compose
- Docker Desktop (recommended)
- OR
- .NET 10 SDK (if running standalone)
- PostgreSQL 16+ with PostGIS extension (if running standalone)
The easiest way to run the application is using Docker Compose.
-
Clone the repository:
git clone https://github.com/EyasDmour/VehicleTrackerPOC.git cd VehicleTrackerPOC -
Run the application:
docker compose up -d --build
-
Access the application:
- Web Dashboard: http://localhost:5001
The database will be automatically seeded with dummy data (incidents and vehicles) on the first run.
- To stop the application:
docker compose down
If you prefer to run the services manually without Docker configurations:
Ensure you have a PostgreSQL instance running.
# Example using Docker for just the DB
docker run --name vehicle-db -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password -e POSTGRES_DB=vehicle_tracker -p 5432:5432 -d postgis/postgis:16-3.4Navigate to the api directory and update appsettings.json or use User Secrets to set your connection string:
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Database=vehicle_tracker;Username=user;Password=password"
}cd api
dotnet runThe API will start on http://localhost:5000.
The web app needs to know where the API is. Ensure web/appsettings.json points to the correct URL (default http://localhost:5000).
cd web
dotnet runThe Web App will start on http://localhost:5001.
- /api: Backend ASP.NET Core Web API (Controllers, SignalR Hubs, EF Core Context).
- /web: Frontend ASP.NET Core MVC Application (Razor Views, JS modules).
- /nginx (optional): Configuration for reverse proxying if needed (not active in default compose).
This is a Proof of Concept. Default credentials are provided for local development convenience in docker-compose.yml. For production deployment, ensure you:
- Change all passwords.
- Use environment variables for secrets.
- Disable Swagger in production.
- Enable HTTPS/SSL.