Table of Contents
Sprinkly is more than just a URL shortener; it's a full-featured link management platform. It allows users to convert long, messy URLs into concise, shareable links while providing detailed analytics on click performance.
- π Secure Authentication: JWT-based stateless authentication with BCrypt password hashing.
- π Real-time Analytics: Visual graphs (Chart.js) showing click-through rates and engagement.
- β‘ High Performance: Optimized database queries and responsive React frontend.
- π± Fully Responsive: Seamless experience across desktop, tablet, and mobile.
- βοΈ Cloud Native: Dockerized backend and auto-scaling cloud deployment.
This project uses a modern, industry-standard stack focused on scalability and developer experience.
| Domain | Technology |
|---|---|
| Frontend | |
| Backend | |
| Database | |
| DevOps | |
| Deployment |
The system follows a Layered Architecture to separate concerns and ensure maintainability.
- Presentation Layer: React Frontend consumes REST APIs.
- Controller Layer: Spring Boot Controllers (
AuthController,UrlMappingController) handle HTTP requests. - Service Layer: Business logic (URL shortening algorithm, Analytics processing).
- Data Access Layer: Spring Data JPA repositories interact with the PostgreSQL database.
You can run Sprinkly locally using Docker (Recommended) or manually.
- Java 21 or 25
- Node.js v18+
- PostgreSQL (Local or Neon Cloud)
-
Clone the repository
git clone [https://github.com/Piyush-Kumar62/Sprinkly.git](https://github.com/Piyush-Kumar62/Sprinkly.git) cd Sprinkly -
Backend Setup
- Navigate to backend:
cd url-shortner-sb - Update
src/main/resources/application.propertieswith your DB creds. - Run app:
./mvnw spring-boot:run
- Navigate to backend:
-
Frontend Setup
- Navigate to frontend:
cd ../url-shortener-react - Install dependencies:
npm install - Start server:
npm run dev
- Navigate to frontend:
The backend exposes the following RESTful endpoints:
| Method | Endpoint | Description | Access |
|---|---|---|---|
POST |
/api/auth/register |
Register a new user | Public |
POST |
/api/auth/login |
Login & get JWT Token | Public |
POST |
/api/url/shorten |
Shorten a long URL | Auth Required |
GET |
/api/url/myurls |
Get user's URL history | Auth Required |
GET |
/api/url/analytics/{shortLink} |
Get click analytics | Auth Required |
GET |
/{shortLink} |
Redirect to original URL | Public |
- Basic URL Shortening
- User Authentication (JWT)
- Click Analytics Dashboard
- QR Code Generation for links
- Custom Aliases (e.g.,
sprink.ly/my-custom-name) - Export Analytics to CSV/PDF
Piyush Kumar Full Stack Developer | Cloud Enthusiast