Real-time smart parking simulation dashboard built with ASP.NET Core, SignalR and React.
- Overview
- Features
- Concurrency Requirements
- Screenshots
- Tech Stack
- Requirements
- Getting Started
- Project Structure
- Future Improvements
- Author
Parking Flow is a real-time smart parking simulator created as a university project for ASP.NET application programming.
The application simulates cars entering, waiting, parking and leaving a parking lot.
The backend is built with ASP.NET Core Web API and contains the main simulation logic, including thread synchronization and background task processing.
The frontend is built with React and works as a live dashboard. It displays the current parking state, queue, activity log, statistics, occupancy trend and detailed information about each parking spot.
The main goal of the project was to demonstrate practical use of:
- thread synchronization,
- semaphores,
- thread pool tasks,
- AJAX communication,
- WebSocket live updates.
- 20 parking spots
- live parking spot status
- cars entering and leaving the parking lot
- waiting queue for cars
- automatic and manual simulation mode
- manual spot release
- parking reset option
The simulation supports different car types:
- normal car
- electric car
- VIP car
Cars can be assigned to preferred parking spots depending on their type.
The parking grid includes several types of parking spots:
- Standard
- VIP
- Electric
- Disabled
- Reserved
Each type is visually marked in the frontend.
The dashboard displays:
- free spots
- occupied spots
- cars in queue
- served cars
- current occupancy
- peak occupancy
- average wait time
- average parking time
- next spot release
- occupancy trend chart
The application includes a live activity log with event types:
- entered
- left
- waiting
- full
- system
Each event is updated in real time and displayed with a timestamp.
The frontend supports:
- dark mode
- light mode
- dynamic logo depending on selected theme
- premium graphite glassmorphism style
- responsive dashboard layout
The project uses several mechanisms required by the laboratory assignment.
| Requirement | Implementation |
|---|---|
| Lock / Mutex | lock protects parking spots, queue, activity log and simulation state |
| Semaphore | SemaphoreSlim controls the number of available parking spaces |
| Thread Pool | each car is processed as a separate Task.Run() background task |
| AJAX | frontend actions use fetch() to call ASP.NET Core API endpoints |
| WebSocket | SignalR sends live parking updates from backend to frontend |
The backend uses lock to protect shared application state, including:
- parking spot list,
- waiting queue,
- activity log,
- simulation status.
The parking lot has a limited number of spaces.
SemaphoreSlim controls whether a car can enter the parking lot or must wait in the queue.
Each car is handled as a separate background task.
A car can wait for a place, enter the parking lot, stay for a randomly selected parking time and then leave.
The React frontend communicates with ASP.NET Core API endpoints using fetch().
Main actions:
- add car,
- add five cars,
- start simulation,
- stop simulation,
- start auto mode,
- stop auto mode,
- release parking spot,
- reset parking.
SignalR is used to update the frontend live after every change in the parking state.
The frontend receives:
- parking spot updates,
- queue updates,
- statistics updates,
- activity log updates.
| Dark Mode | Light Mode |
|---|---|
![]() |
![]() |
| Parking Grid | Spot Details |
|---|---|
![]() |
![]() |
| Waiting Queue |
|---|
![]() |
| Area | Technology |
|---|---|
| Backend | ASP.NET Core Web API |
| Backend language | C# |
| Real-time communication | SignalR / WebSocket |
| Synchronization | lock, SemaphoreSlim |
| Background processing | Task.Run, ThreadPool |
| Frontend | React |
| Frontend build tool | Vite |
| API communication | fetch / AJAX |
| Icons | Lucide React |
| Animations | Framer Motion |
| Styling | CSS, glassmorphism, responsive layout |
To run the project locally, you need:
- .NET 8 or newer
- Node.js 18 or newer
- npm
- Visual Studio 2022 or Visual Studio Code
- modern web browser
git clone https://github.com/your-username/ParkingFlow.git
cd ParkingFlowcd backend/ParkingFlow.Api
dotnet runThe backend should start on addresses similar to:
https://localhost:7246
http://localhost:5288
Swagger is available at:
https://localhost:7246/swagger
Main API endpoint:
GET http://localhost:5288/api/parking/stateSignalR hub:
http://localhost:5288/parkingHub
Open a second terminal:
cd frontend
npm install
npm run devThe frontend should be available at:
http://localhost:5173
ParkingFlow/
βββ backend/
β βββ ParkingFlow.Api/
β βββ Controllers/
β β βββ ParkingController.cs
β βββ Hubs/
β β βββ ParkingHub.cs
β βββ Models/
β β βββ ParkingCar.cs
β β βββ ParkingEvent.cs
β β βββ ParkingSpot.cs
β β βββ ParkingState.cs
β β βββ ParkingStats.cs
β βββ Services/
β β βββ ParkingService.cs
β βββ appsettings.json
β βββ Program.cs
β
βββ frontend/
β βββ public/
β β βββ favicon.svg
β β βββ spaces-darkmode.png
β β βββ spaces-lightmode.png
β βββ src/
β β βββ components/
β β β βββ ActivityLog.jsx
β β β βββ AnalyticsPanel.jsx
β β β βββ Header.jsx
β β β βββ ParkingGrid.jsx
β β β βββ ParkingSpot.jsx
β β β βββ SpotDetailsModal.jsx
β β β βββ StatCard.jsx
β β β βββ WaitingQueue.jsx
β β βββ services/
β β β βββ parkingApi.js
β β βββ App.css
β β βββ App.jsx
β β βββ index.css
β β βββ main.jsx
β βββ package.json
β βββ vite.config.js
β
βββ screenshots/
β βββ darkmode.png
β βββ lightmode.png
β βββ place.png
β βββ ss1.png
β βββ waitingqueue.png
β
βββ .gitignore
βββ LICENSE
βββ README.md
- add user accounts
- add parking payment simulation
- add database support for historical results
- add charts for long-term occupancy statistics
- add more detailed car priority rules
- add admin panel for parking spot configuration
- add deployment configuration
- add automated backend tests
- add Docker support
Created by Katarzyna StaΕczyk.




