Man, this is a grind but worth it. The URL shortener finally feels like something I could actually deploy somewhere people use.
Ditched JSON for Real Database
First thing: goodbye JSON file. Writing to a file every single time someone shortens a URL was gonna break eventually. Switched to PostgreSQL (SQLite fallback for smaller setups). Now it actually handles multiple people using it at once without choking.
No More Sketchy Links
Added URL validation so I don’t accidentally turn this into a phishing playground. Checks if the link is safe before shortening it. Basic but important.
Users Can Actually Own Their Links Now
Built login/signup so people have their own accounts. They can see just their shortened URLs, track clicks on their stuff, delete what they don’t want. No more shared mess.
Spam Protection
Rate limiting by IP because obviously someone would try to abuse it. Can’t shorten 10,000 URLs per minute anymore—keeps the database happy and blocks the dumb attacks.
Tetris animation still lives on the homepage. Some things you don’t touch.
Log in to leave a comment
I am currently working on a URL Shortener web application with both CLI and web interfaces in Python/Flask. The web UI features a retro Tetris animation on the left side with falling blocks that stack properly, paired with a clean, modern form interface using an orange color scheme (#ff6b35).
Key features include:
Dual interfaces: Command-line tool (python main.py shorten “url”) and web dashboard
Animated Tetris game: Black blocks falling at random X positions, auto-clearing completed lines
Modern UI design: Press Start 2P retro font for the title, smooth transitions, toast notifications, and animated statistics
Full functionality: URL shortening with base62 codes, click tracking, JSON storage, copy-to-clipboard, and a list view for all URLs
Clean architecture: Separated concerns with shared backend logic, Flask routes, and organized file structure (templates, static/css, static/js)
Log in to leave a comment