Skip to content

A Full Stack URL Shortener built with Spring Boot, React (Vite), and PostgreSQL. Features real-time analytics, JWT authentication, and secure cloud deployment.

License

Notifications You must be signed in to change notification settings

Piyush-Kumar62/Sprinkly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

Sprinkly πŸ”—

A modern, full-stack URL shortener built for scale and performance.

Frontend Live Backend Live

CI Status License Stars


Table of Contents
  1. About The Project
  2. Tech Stack
  3. Architecture
  4. Getting Started
  5. API Endpoints
  6. Roadmap
  7. Contact

πŸš€ About The Project

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.

image

🌟 Key Features

  • πŸ” 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.

πŸ› οΈ Tech Stack

This project uses a modern, industry-standard stack focused on scalability and developer experience.

Domain Technology
Frontend React TailwindCSS Vite
Backend Java Spring Spring Boot
Database Postgres Neon
DevOps Docker GitHub Actions
Deployment Vercel Render

πŸ—οΈ Architecture

The system follows a Layered Architecture to separate concerns and ensure maintainability.

  1. Presentation Layer: React Frontend consumes REST APIs.
  2. Controller Layer: Spring Boot Controllers (AuthController, UrlMappingController) handle HTTP requests.
  3. Service Layer: Business logic (URL shortening algorithm, Analytics processing).
  4. Data Access Layer: Spring Data JPA repositories interact with the PostgreSQL database.

⚑ Getting Started

You can run Sprinkly locally using Docker (Recommended) or manually.

Prerequisites

  • Java 21 or 25
  • Node.js v18+
  • PostgreSQL (Local or Neon Cloud)

Option 1: Manual Setup

  1. Clone the repository

    git clone [https://github.com/Piyush-Kumar62/Sprinkly.git](https://github.com/Piyush-Kumar62/Sprinkly.git)
    cd Sprinkly
  2. Backend Setup

    • Navigate to backend: cd url-shortner-sb
    • Update src/main/resources/application.properties with your DB creds.
    • Run app:
      ./mvnw spring-boot:run
  3. Frontend Setup

    • Navigate to frontend: cd ../url-shortener-react
    • Install dependencies: npm install
    • Start server: npm run dev

πŸ”Œ API Endpoints

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

πŸ›£οΈ Roadmap

  • 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

πŸ“¬ Contact

Piyush Kumar Full Stack Developer | Cloud Enthusiast

LinkedIn GitHub

(back to top)

About

A Full Stack URL Shortener built with Spring Boot, React (Vite), and PostgreSQL. Features real-time analytics, JWT authentication, and secure cloud deployment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages