A simple URL shortener service made in ExpressJS that lets users create their own custom short links (if the name is available), view leaderboards of the most-clicked links, and enjoy a smooth frontend experience.
This project is built with a backend-first mindset,,the frontend was heavily assisted by AI (~80%) while I focused on building backend.
- π₯ Custom Short URLs
- Users can shorten their URLs and choose their own custom alias (if available).
- π Leaderboard
- See the top links with the highest number of clicks/views.
- π‘οΈ Security
- Secured with Helmet and best practices to prevent common web vulnerabilities.
- π οΈ Validation
- Robust input validation using Joi.
- π« No Auth Required
- Anyone can shorten URLs and view statsβno accounts or sign-in needed.
- π Frontend & Backend Separation
- Backend (Express.js) and frontend are in separate folders and communicate via REST API.
Backend
- Express.js - Web framework
- Neon - Serverless PostgreSQL (Free Tier)
- PostgreSQL - Database
- Joi - Input validation
- Helmet - Security middleware
Frontend
- Vanilla JS / HTML / CSS
cd backend
npm install
node --watch appMake sure Neon DB is configured properly. Create the necessary tables with the provided SQL schema.
cd frontend
# Open with LiveServer/port 5500- No authentication means anyone can use itβdesigned for quick, frictionless URL shortening.
- The frontend is kept minimal since the focus was on backend logic and API design.
This project is licensed under the MIT License. See LICENSE for details.



