URL Shortener
A production-ready URL shortening service built as a RESTful API with JWT authentication, input validation, and PostgreSQL persistence. Designed to demonstrate backend engineering fundamentals.
Technologies Used
Problem
I wanted to build a backend-focused project that demonstrates API design, authentication, database modeling, and deployment — the core skills needed for backend engineering roles.
What I Built
A clean, well-structured RESTful API that handles URL shortening with proper authentication, validation, and database management. Fully containerized with Docker for easy deployment.
Challenges
Designing a clean API structure, implementing secure JWT auth flow, handling URL collision edge cases with nanoid, and setting up Drizzle ORM migrations with PostgreSQL.
Architecture
Express.js REST API with middleware-based JWT authentication, Zod for request validation, Drizzle ORM for PostgreSQL interactions, and Docker Compose for multi-container deployment.
Key Features
- RESTful API with proper HTTP semantics
- Custom URL aliases and nanoid-generated short codes
- JWT authentication with bcrypt password hashing
- Zod schema validation for all inputs
- PostgreSQL with Drizzle ORM for type-safe queries
- Docker Compose for containerized deployment