Skip to content
gaurang2456Public

About

Snip is a Spring Boot powered URL management platform that provides URL shortening, QR code generation, click analytics, Redis caching, and fast, reliable link redirection.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”— URL Manager

https://snip-delta-two.vercel.app/

A full-stack URL Management Platform built with Spring Boot, React, MySQL, and Redis.

The application allows users to create, manage, and track shortened URLs with support for custom aliases, QR code generation, click analytics, expiration management, caching, and monitoring.

๐Ÿš€ Deployment

Planned deployment stack:

  • Frontend: Vercel
  • Backend: Railway
  • Database: MySQL
  • Cache: Redis

Deployment configuration is already included through Docker and environment-based configuration.

โœจ Features

URL Shortening

  • Create short URLs from long URLs
  • Generate custom aliases
  • Automatic short code generation
  • URL validation

URL Management

  • View all shortened URLs
  • View URL details
  • Enable/disable URLs
  • Expiration date support

Analytics

  • Track URL clicks
  • Click count monitoring
  • URL performance insights
  • Analytics dashboard

QR Code Generation

  • Generate QR codes for shortened URLs
  • Download and share QR codes
  • Mobile-friendly access

Performance Optimization

  • Redis caching for faster URL resolution
  • Reduced database load
  • Improved response times

Monitoring

  • Spring Boot Actuator integration
  • Health checks
  • Application metrics
  • Runtime monitoring

Modern Frontend

  • Responsive React UI
  • Dashboard view
  • URL management interface
  • Analytics visualization

๐Ÿ› ๏ธ Tech Stack

Backend

  • Java 17
  • Spring Boot 3
  • Spring Data JPA
  • Spring Data Redis
  • Spring Validation
  • Spring Actuator
  • Maven
  • Lombok

Frontend

  • React
  • Axios
  • React Router
  • Recharts
  • CSS

Database & Caching

  • MySQL
  • Redis

DevOps & Deployment

  • Docker
  • Docker Compose
  • Vercel
  • Railway

๐Ÿ“‚ Project Structure

url-manager
โ”‚
โ”œโ”€โ”€ backend
โ”‚   โ”œโ”€โ”€ controller
โ”‚   โ”œโ”€โ”€ service
โ”‚   โ”œโ”€โ”€ repository
โ”‚   โ”œโ”€โ”€ model
โ”‚   โ”œโ”€โ”€ dto
โ”‚   โ”œโ”€โ”€ config
โ”‚   โ””โ”€โ”€ resources
โ”‚
โ”œโ”€โ”€ frontend
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ”‚   โ”œโ”€โ”€ api
โ”‚   โ”‚   โ”œโ”€โ”€ components
โ”‚   โ”‚   โ”œโ”€โ”€ pages
โ”‚   โ”‚   โ””โ”€โ”€ services
โ”‚   โ””โ”€โ”€ public
โ”‚
โ”œโ”€โ”€ docker-compose.yml
โ””โ”€โ”€ README.md

โš™๏ธ Backend Setup

Clone Repository

git clone https://github.com/yourusername/url-manager.git
cd url-manager

Configure MySQL

Create a database:

CREATE DATABASE urlshortener;

Update:

backend/src/main/resources/application.yml
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/urlshortener
    username: your_username
    password: your_password

Configure Redis

Make sure Redis is running locally:

redis-server

Run Backend

cd backend
mvn spring-boot:run

Backend runs at:

http://localhost:8080

๐Ÿ’ป Frontend Setup

Install dependencies:

cd frontend
npm install

Run frontend:

npm start

Frontend runs at:

http://localhost:3000

๐Ÿณ Docker Setup

Run the complete application stack:

docker compose up --build

Services:

Service Port
Frontend 3000
Backend 8080
MySQL 3306
Redis 6379

๐Ÿ“ก API Endpoints

Create Short URL

POST /api/urls

Request:

{
  "originalUrl": "https://www.google.com",
  "customAlias": "google",
  "expiryDays": 30,
  "title": "Google Search"
}

Get All URLs

GET /api/urls

Get URL By ID

GET /api/urls/{id}

Get Analytics

GET /api/urls/{id}/analytics

Redirect URL

GET /{shortCode}

Example:

http://localhost:8080/google

๐Ÿ“Š Example Response

{
  "id": 1,
  "originalUrl": "https://www.google.com",
  "shortCode": "google",
  "shortUrl": "http://localhost:8080/google",
  "clickCount": 2,
  "createdAt": "2026-06-02T03:00:00",
  "expiresAt": "2026-07-02T03:00:00",
  "isActive": true,
  "title": "Google Search"
}

๐Ÿ“ˆ System Architecture

React Frontend
        โ”‚
        โ–ผ
Spring Boot REST API
        โ”‚
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ–ผ             โ–ผ
MySQL       Redis
(Database) (Cache)

๐Ÿ”ฎ Future Enhancements

  • User Authentication & Authorization
  • Custom Domains
  • Team Workspaces
  • Advanced Analytics
  • Export Reports (CSV/PDF)
  • URL Categories & Tags
  • Rate Limiting
  • Geo-location Analytics
  • AI-powered Traffic Insights

๐ŸŽฏ Key Learning Outcomes

  • REST API Development
  • Spring Boot Architecture
  • Database Design
  • Redis Caching
  • Full-Stack Development
  • Docker Containerization
  • API Monitoring
  • React Integration
  • Deployment & DevOps
  • Scalable System Design

๐Ÿ‘จโ€๐Ÿ’ป Author

Gaurang Kishore

About

Snip is a Spring Boot powered URL management platform that provides URL shortening, QR code generation, click analytics, Redis caching, and fast, reliable link redirection.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages