PE Hackathon — URL Shortener
"Shorten URLs. Survive anything."
Inspiration
Most hackathons end the moment the demo works on your laptop. I wanted to build something that survives after the demo — something that handles bad input, recovers from crashes, and never shows a user a Python stack trace. That's the real world, and that's what this project is about.
What I Built
A production-hardened URL shortening service built on Flask and PostgreSQL, engineered from the ground up for reliability.
How I Built It
- Flask + Peewee ORM for a lightweight, simple backend
- PostgreSQL for persistent, consistent storage
- pytest for 23 tests covering unit and integration scenarios
- GitHub Actions CI that blocks any deploy if tests fail
- Docker with
restart: alwaysfor automatic crash recovery
Challenges
- Getting the CI pipeline to spin up a real PostgreSQL instance for integration tests took more config than expected
- Writing tests before the feature was done felt uncomfortable at first — but it caught real bugs early
- Balancing coverage targets with actually meaningful tests, not just hitting lines for the sake of the metric and code that's reliable is entirely in the safety net around it
- Chaos engineering isn't scary — killing your own container on purpose at 2pm beats getting paged at 3am
- Documentation is part of the product, not an afterthought
Coverage
$$\text{Coverage} = \frac{\text{Lines tested}}{\text{Total lines}} = \frac{96}{100} = 96\%$$
What's next for pe-hackathons-2026
Built With
- docker
- flask
- github-actions
- pewee
- postgresql
- pytest
- python
Log in or sign up for Devpost to join the conversation.