Bills
started 2024-03
A minimal Go HTTP server for ticket management with QR code generation and PostgreSQL persistence.
Started as a learning project to explore Go's HTTP server capabilities while solving a real problem: managing tickets for a livestream event. I could have used my existing TypeScript implementations, but wanted to dive into Go following the Go By Examples HTTP server section.
The system generates unique QR codes for each ticket, stores them in PostgreSQL, and provides a simple REST API for creation and validation. Each ticket gets a UUID and can be marked as used when scanned. The QR codes contain the scan URL, making validation as simple as a GET request.
Clean, minimal implementation with automatic database migrations and interactive OpenAPI documentation. Sometimes the best way to learn a new language is to build something you actually need.
Highlights
- RESTful API with full CRUD operations for ticket management
- Automatic QR code generation with embedded scan URLs
- PostgreSQL persistence with auto-migration support
- Interactive OpenAPI documentation at /docs/
- Phone number lookup for ticket validation
- One-click ticket marking via GET /scan/{id}