This app is a basic simulation of how cars move in a road. It allows users to spawn in cars and let them move in the grid based in driving rules
The backend uses express to server the client and typeorm to persist the data
The UI is written in NextJs and allows the user to configure input and behavior
In order for the project to run we can use docker with
docker-compose up --build -d
The api is on http://localhost:8080 The UI is on https://localhost:3000
We can use tools like lazy docker to monitor logs
Alternatively we can install npm packages using pnpm
and run the dev or start command
The following reports are available
-
All simulations: Get a list of simulations filtered by date
-
Get simulation by id: based on the ID get the simulation, cars sorted from fastest to slowest with the difference in expected and actual steps, action logs, how many normal cars and how many emergency cars were in the simulation, how many actions have been recorded, fastest car, slowest car
-
Get the fastest simulations: get simulations ordered by the least amount of steps taken
-
Get the slowest simulations: get simulations ordered by the mist amount of steps taken
-
Get the least wait time simulations: get simulations where the difference between expected and actual steps is the smallest