Snipify

A URL shortener I built so I'd learn every layer myself.

Status
Shipped
Built with
FastAPI SQLAlchemy PostgreSQL Redis

About

Snipify started as a way to learn FastAPI properly. Turning a long link into a short one is maybe a day of work. I kept going because the parts I would have skipped, the accounts and the emails and getting it running on a real server, were exactly the parts I could not do yet.

Limits, so one person cannot ruin it for everyone

Each account gets its own budget on each part of the site, counted per minute. Signing in gets a tight one, because that is where password guessing and inbox flooding happen. Redirects get a generous one, because that is the whole point of the product.

If the piece keeping those counts goes offline, requests are let through rather than blocked. A safety feature should not be the thing that takes the site down.

Running it

It runs on my own server. Pushing a change deploys it, restarts the app, and then checks it actually came back up before calling the deploy a success.

The source is public under an MIT licence, which means the parts I would write differently now are public too.