A simple app that allows users to create events and purchase tickets to these events. Handles concurrency (users purchasing tickets at the same time) with optimisitc database locking using transactions and the version
column.
- React Frontend
frontend/
- NestJS Backend
backend/
- Drizzle ORM with SQLite Database (
backend/local.db
)
- Clone the repo
pnpm install
in root to install in all packagespnpm run dev
in root to run both frontend and backend concurrently- Open the app on http://localhost:3000
Given more time there are a few things that I'd love to improve on:
- Add in an additional concurrency handler for redundancy (database row-level locking)
- Add in Unit and E2E Tests
- Tidy up the monorepo setup (e.g. reusing types in front and backend)
- Use database migrations and a more performant/scalable DB
- Add better linting and code formatting