Forem

Cover image for How I Built Open Source Fastest URL Shortener Ever With Rust
Ibrohim Abdivokhidov
Ibrohim Abdivokhidov

Posted on

How I Built Open Source Fastest URL Shortener Ever With Rust

In this tutorial, I’ll be walking you thro building notlink - an open source, blazingly fast URL shortener ever. If you are Rust luver. You should definitely check this out. ✨

Tech Stack:

  • Rust (core language)
  • Shuttle (cloud deployment)
  • Actix Web (backend framework)
  • Neon (serverless PostgreSQL)
  • Diesel (ORM for database magic)

What we’ll be covering:
✅ Setting up a Rust project from scratch
✅ Integrating Diesel ORM with PostgreSQL (Neon)
✅ Building API endpoints (URL shortening/redirection)
✅ Database migrations, models, and helper functions (crypto, random code generation)
✅ Shuttle deployment hacks (including fixing libpq.so.5 issues with a custom script!)
✅ Testing with curl and troubleshooting

Instructor:
Hi, I'm Ibrohim. I build things and make content about it. Known mostly for 70+ Hackathons, 400+ Fails, 4+ Papers, 200K+ Creators, 2+ OS Contributions and $OC, $TROC Meme Coins. 👻

Chapters:
00:00 introduction
00:10 how it works
01:13 getting started with backend
02:54 creating a new Rust project
04:00 Diesel ORM integration
05:25 setting up Shuttle
08:15 testing simple app
09:15 setting up Neon DB
09:48 DB migration and creating tables
11:11 .env stuff
11:55 creating models
12:12 table alteration
13:25 DB operations
14:12 routes
15:50 encryption and decryption
18:11 update DB schema
19:00 main.rs
19:45 running and testing the app
20:38 deploy to Shuttle and testing real url
22:00 looking thro Neon DB tables and data
22:30 final notes. wrap up.
27:45 outro. my message to ya'll

Put a star ⭐️ :

Join the community on Discord: https://discord.gg/nUdcd9p8Ae

i'm here: https://yaps.gg (i build things and yap about it)

Follow me: https://www.linkedin.com/in/abdibrokhim/

Watch: https://youtu.be/Mhz_eVH3XnQ

Top comments (0)