DEV Community

Cover image for πŸš€ Shorty URL β€” A Modern, Secure URL Shortener Built with React & Express (New Release)
Muhammad Sheharyar Butt
Muhammad Sheharyar Butt

Posted on

πŸš€ Shorty URL β€” A Modern, Secure URL Shortener Built with React & Express (New Release)

I’m excited to introduce Shorty URL, a modern full-stack URL shortener designed for real-world use. The goal of this project was to go beyond basic link shortening and deliver a secure, analytics-driven, and visually polished experience.

Shorty focuses on performance, security, and usability while maintaining a clean and scalable architecture.

✨ Features

  • πŸ”— URL Shortening β€” Create short, memorable links instantly
  • πŸ“± QR Code Generation β€” Download QR codes for any shortened link
  • πŸ“Š Link Analytics β€” Track clicks, unique visitors, and performance metrics
  • πŸŒ™ Dark Mode β€” Elegant light and dark themes
  • πŸ”’ Security Built-In
  • HTTPS-only URL validation
  • Rate limiting to prevent abuse
  • Full input sanitization
  • πŸ“ Link History β€” Local storage–based history of created links
  • 🚨 Report System β€” Report suspicious or malicious URLs
  • πŸ“§ Contact Form β€” Built-in contact functionality
  • πŸ“± Responsive Design β€” Works seamlessly on desktop and mobile

🌐 Live Demo

Frontend: https://shorty.msyb.dev

πŸ› οΈ Tech Stack

  • Frontend
  • React 19
  • React Router 7
  • Ant Design 6
  • CSS3
  • Backend
  • Node.js
  • Express
  • MySQL

Security & Infrastructure

  • Helmet.js for secure HTTP headers
  • API rate limiting
  • CORS with origin whitelisting
  • Input validation and sanitization
  • SQL injection and XSS protection

Deployment

Vercel with serverless-ready architecture

🧩 Architecture Overview

The project is split into two clear layers:

A React-based frontend responsible for UI, theming, routing, and user interactions

An Express-based backend handling URL generation, redirection, analytics, reporting, and security enforcement

This separation keeps the system scalable, maintainable, and easy to extend.

πŸ“‘ API Capabilities

  • URL creation and redirection
  • Global and per-link analytics
  • QR code tracking
  • Contact submissions
  • Malicious link reporting
  • Health monitoring

πŸ”’ Security First Approach

Security was a primary focus while building Shorty:

  • Strict HTTPS validation for all URLs
  • Rate limiting to mitigate abuse
  • Sanitized inputs across all endpoints
  • Parameterized database queries
  • Hardened HTTP headers and controlled CORS access

πŸ”— Open Source

The project is fully open source and available on GitHub:
Link

πŸ“Œ Final Notes

Shorty URL is built as a production-ready URL shortener, not just a demo project. It showcases how modern frontend frameworks and a well-structured Express API can work together to deliver a secure and scalable application.

Feedback, feature suggestions, and contributions are always welcome.
If you find it useful, a star ⭐ would mean a lot.

Thanks for reading.

Top comments (0)