Park42 is a car parking reservation service, similar to those used for booking airport parking spots in advance.
This monorepo contains the Park42 API and a supporting mock payment service used during development.
- Node.js 22
- Docker and Docker Compose
bin/install– Install dependenciesdocker-compose up --build– Start PostgreSQL, Redis and the mock payment APIbin/npm run dev:db:setup– Setup the development database, which runs the following commands:bin/npm run dev:db:create– Create the databasebin/npm run dev:db:migrate– Migrate the databasebin/npm run dev:db:seed– Seed the database
Use the wrapper scripts at the repository root to work with the application. During development the database and auxiliary services run inside Docker, while the application runs on the host.
docker-compose up– Ensure the services are runningbin/npm run dev:worker– Start the BullMQ workerbin/dev– Start the application with automatic reloading
bin/npm run test:db:create– Create the test databasebin/npm run test:db:migrate– Migrate the test databasebin/npm run test– Run the test suite
The application is currently in its early stages and consists of a minimal set of entities and endpoints.
Users create Sessions to obtain a token and can request price calculations through the /prices endpoint.
erDiagram
USERS {
integer id PK
varchar email
varchar password_digest
}
SESSIONS {
integer id PK
varchar token
varchar ip_address
varchar user_agent
integer user_id FK
}
USERS ||--|{ SESSIONS : ""
Note
Some standard fields have been omitted from the diagram for brevity.