
🔗 https://jnhssg.de/playground/urls
Ever frustrated by URLs that hide the real message? Me too, that's why URL shorteners exist. But since public ones raise privacy concerns, I built my own solution while learning Rust to align with my goals. URL Unicorn is a personal URL shortening service consisting of two Rust applications: a REST API for URL management and a Telegram bot for convenient mobile access.
🦀 After years of working with TypeScript, Go, and Python for backend services, I finally took the plunge and built a side project in Rust and I'm absolutely hooked. This project solidified my learning motivation for Rust. The initial learning curve is real, but once you internalize the ownership model, you gain a powerful tool that catches bugs before they ever reach production. I'll definitely be reaching for Rust for more backend projects.

The Tech Stack
It’s built with Rust’s power and practicality in mind. The backend uses Actix Web for speed and clean code, request parsing and middleware feel so intuitive you don’t even think about it. For database work, Diesel handles SQL queries safely with compile-time checks (no more runtime surprises), and we’ve got a PostgreSQL index on short_code for lightning-fast redirects. I also threw in a custom API key middleware to protect write endpoints while leaving redirects open, Actix makes this feel like a breeze.
The Telegram bot? Super simple too. Teloxide keeps it lightweight and async-friendly, running alongside Tokio for smooth message handling. Error handling with thiserror? Just add a ? and you’re good,no messy exceptions to debug.
What really stuck with me wasn’t the speed (though it’s impressive), but how Rust makes refactoring feel like play. I rename a field? The compiler shows me exactly where it’s used. No more null pointer chaos either, Option and Result force you to handle everything upfront. And that match pattern? It’s where I get to write clear, exhaustive error logic without fear.
Honestly? Rust’s tooling (like cargo and rust-analyzer) has become my favorite part too, like having a super smart coding partner that catches mistakes before you even hit save.
Infrastructure
The services run on my K3s cluster hosted on Hetzner, deployed via Argo CD. The Rust binaries compile to small, efficient Docker images, the final API image is under 20MB. All requests are passing with a P95 below 50ms, which is blazing fast.
Rust, Actix Web, Diesel ORM, PostgreSQL, Tracing, Serde
Rust, Teloxide, Tokio, Reqwest
K3s, Docker, Argo CD, Hetzner