/traffic-sim

Primary LanguageTypeScriptMIT LicenseMIT

Traffic simulator

A simple traffic simulator to move some vehicles along a route.

Installation

The application is a mono-repository, developed in TypeScript. It typically consists of the following packages:

  • root
    • GUI: The client part of the application.
    • Server: Hono-based service
    • Shared: Shared type and interface definitions

Development

In all packages folder, copy example.env to .env. Optionally, update your settings, e.g. the PORT that you want to use for the sim server and for the web developer server. And, of course, the location of the Valhalla service.

pnpm i
npm start

Screenshots

Admin view Admin view. You can set user to Administrator in About (i) page. An admin can, via the settings, add new vehicles including their route.

User view The default user view has no controls.

TODO

  • Synchronize with testbed time service (optional)
  • Display (sim) time in app (simState contains current time and speed, as well as state).