URL Shortener
A URL shortener with click analytics, built to demonstrate system design and production-grade engineering practices.
Design
- Click tracking uses the outbox pattern.
- Click events are drained in bounded batches, triggered only by the external scheduler, never by reads.
- The analytics dashboard is a pure read.
- MongoDB Atlas only, with no Redis or external queue.
- Tailwind CSS with CSS-variable-based theming.
Engineering Practices
- TypeScript strict mode
- Linting and formatting
- Input and environment validation
- Scoped Vitest test suite
- CI
How It Works
- 01
Click
A short link is visited and the click is recorded as an event in the outbox.
- 02
Schedule
GitHub Actions, the external scheduler, triggers a drain.
- 03
Drain
Outbox events are processed in bounded batches. Reads never trigger this.
- 04
Read
The analytics dashboard is a pure read of the processed data.
