Ducktix
Ticketing platform with batches, orders, coupons and check-in, modeled in PostgreSQL for Databases II.

About the project
A Databases II assignment at UDESC that became a complete product: organizers publish in-person, online or hybrid events, sell tickets in batches and check people in at the door; attendees buy, apply coupons and receive their tickets.
The delivery covered the whole database path: conceptual model, logical model with a data dictionary, DDL and the application running on that schema. Rules that cannot be broken, such as never selling more than exists or never having an online event with an address, live in PostgreSQL CHECK constraints.
A sale locks the batch row with SELECT ... FOR UPDATE inside a transaction, so two buyers fighting over the last seat cannot both get through. In production the database is Neon, with a driver that keeps the session open for those transactions.
Read the article: SQLWhat shipped
- Conceptual model, logical model and DDL documented with the reason for each change
- Business rules as CHECK constraints in the database and in the Drizzle schema
- Concurrent stock control with SELECT ... FOR UPDATE
- Amounts in cents and timezone-aware dates
- Per-event coupons, simulated payment and tickets issued with a QR code
- Check-in by reading the QR code with the camera
- Organizer dashboard with occupancy and revenue per batch
How it works
- Organizers
- Attendees
- Next.js
- Server actions
- Drizzle ORM
- PostgreSQL (Neon)
- CHECK constraints
- SELECT ... FOR UPDATE
- Vercel Blob
- Resend (e-mail)
- QR Code