A high-performance, enterprise-grade Spring Boot application designed for scalable URL shortening. This project implements a Microservices architecture pattern, utilizing Redis for high-speed caching and rate limiting, RabbitMQ for asynchronous decoupling of the email service, and Docker for containerized deployment.
The application is fully hosted on Render with a CI/CD pipeline integrated via Docker Hub.
Explore the application in action through these video walkthroughs:
- Local Environment: Testing via Postman & Local Services
- Hosted Environment: Swagger UI & Production Cloud Demo
The repository includes a comprehensive Postman collection to facilitate immediate testing of all API endpoints.
Location: postman/UrlShortener.postman_collection.json
- Navigate to the postman folder in the root directory.
- Open Postman and click on Import.
- Drag and drop the
UrlShortener.postman_collection.jsonfile.
The application utilizes a cloud-native approach. The source code is built into a Docker image and deployed to Render.
| Render Deployment Logs | Docker Repository |
|---|---|
![]() |
![]() |
Interactive documentation is available for the live environment. This allows for real-time testing of endpoints without local setup.
🔗 Live Link: Swagger UI Dashboard
- Project Overview
- Visual Walkthrough
- Architecture & Design
- Project Structure
- Environment Configuration
- Getting Started
- Troubleshooting
The application utilizes a cloud-native approach. The source code is built into a Docker image, pushed to Docker Hub, and deployed automatically to Render.
| Render Deployment Logs | Docker Hub Repository |
|---|---|
| Successful build and deploy logs from the cloud hosting provider. | Container images stored and versioned in Docker Hub. |
![]() |
![]() |
Interactive documentation is available via Swagger/OpenAPI 3.0. This allows frontend developers and QA engineers to understand the contract without diving into the code.
Authentication & Admin Controllers: Secure endpoints for user registration, login (JWT), and administrator-level user management.
| Auth Controller | Admin & User Management |
|---|---|
![]() |
![]() |
URL Management & DTOs: The core business logic handles URL creation, expiration, and redirection. Strictly typed Data Transfer Objects (DTOs) ensure data integrity.
| URL Management Endpoints | Request DTO Models |
|---|---|
![]() |
![]() |
The backend is powered by a relational database (MySQL/PostgreSQL) designed to handle relationships between Users, URLs, and Click Analytics.
| Database Visualization | Live Users Table |
|---|---|
| Visual representation of the data tables. | Snapshot of the live database verifying user persistence. |
![]() |
![]() |
Comprehensive testing was conducted locally to ensure reliability before deployment.
User Onboarding & Email Flow (RabbitMQ): This flow demonstrates the asynchronous nature of the application. The main service sends a message to the RabbitMQ queue, which the Email Service consumes to send a verification code.
| Step 1: Email Token Received | Step 2: Account Verified | Step 3: Duplicate Check |
|---|---|---|
![]() |
![]() |
![]() |
Handling asynchronous email messages. ! ! RabbitMQ Queues:
| RabbitMQ Queues | RabbitMQ Cloud | Shorten Url |
|---|---|---|
![]() |
![]() |
![]() |
Performance & Analytics: Redis is used to cache frequently accessed URLs and limit request rates from specific IP addresses to prevent abuse.
| QR Code Generation | Redis Caching Logs | Analytics & IP Tracking |
|---|---|---|
![]() |
![]() |
![]() |
The solution uses a Layered Architecture to separate concerns:
- Controller Layer: Handles incoming REST requests.
- Service Layer: Contains business logic (Shortening algorithm, Caching strategy).
- Repository Layer: Direct database interaction using JPA.
- Async Layer: RabbitMQ Producer/Consumer for email tasks.
- Caching Layer: Redis Caching and Redis Rate limiting to prevent abusse.
Key Technologies:
- Backend: Java 21, Spring Boot 3.x
- Database: MySQL / PostgreSQL
- Caching: Redis Caching and Rate Limiting
- Message Broker: RabbitMQ with Email Microservice
- Containerization: Docker
- Tools: Lombok, Swagger UI, Maven
















