I built this delivery dispatch service to practice and master core backend engineering fundamentals in NestJS. Instead of just building a basic CRUD API, I wanted to understand how real-world dispatch systems manage state transitions, handle route assignments, and keep data consistent under concurrent requests.
The backend is engineered with NestJS, TypeORM, and PostgreSQL running inside Docker containers. To handle state protection, I implemented concurrency guards that intercept duplicate route acceptance requests and immediately throw an HTTP 409 Conflict exception before any invalid state mutation reaches the database.
To streamline my testing workflow without manually dropping database schemas, I also built a Node.js automation script (scripts/clear-db.js) that pipes dynamic SQL queries straight into the Docker container via IPC streams.
In the video, I walk through the route acceptance logic, demonstrate how the HTTP 409 conflict guard blocks duplicate claims, and run a live demo of the automated database reset in action.
Check out the video below to watch the full walkthrough in action. If you enjoy the demo, please give the video a like and leave a comment with your thoughts!
답글 남기기