## Inspiration Most apps are built but never hardened. We wanted to build something that could survive production — real load, real failures, real monitoring.
## What we built A production-grade URL shortener deployed on DigitalOcean with full PE/SRE infrastructure:
- 2x Flask app instances behind Nginx load balancer
- PostgreSQL database with 2000 seeded URLs
- Prometheus metrics + Grafana dashboard
- Discord alerts firing within 60 seconds of service failure
- GitHub Actions CI/CD blocking deploys on test failure
## How we built it - Backend: Python + Flask + Peewee ORM + PostgreSQL
- Infrastructure: Docker Compose, Nginx (round-robin load balancing)
- Observability: Prometheus metrics endpoint, JSON structured logging
- Alerting: Cron-based health monitor with Discord webhook
- Testing: 22 pytest tests with SQLite in-memory DB, 50%+ coverage
- Load Testing: k6 — 200 concurrent users, 1.68% error rate
## Quests targeted
- Reliability: Bronze → Gold (tests, CI gate, health endpoint, chaos test, graceful errors)
- Scalability: Bronze → Silver (k6 load test, Docker Compose multi-instance, Nginx)
- Incident Response: Bronze → Silver (JSON logs, /metrics, Discord alert)
- Documentation: Bronze → Silver (README, DEPLOY.md, RUNBOOK.md, FAILURE_MODES.md)
## Challenges
- SQLite/PostgreSQL proxy initialization in test environment
- PostgreSQL sequence desync after bulk CSV seed loading
- 512MB RAM droplet required swap and careful Docker memory management
Built With
- actions
- digitalocean
- docker
- flask
- github
- k6
- nginx
- postgresql
- prometheus
- python
Log in or sign up for Devpost to join the conversation.