Skip to content

pranjalpatel044/shortalytics-java-fullstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🚀 Shortalytics - URL Shortener & Analytics Platform

Java React MySQL Security Chart.js

📖 Overview

Shortalytics is a modern, full-stack URL shortening web application designed for performance and scalability. It allows users to generate concise short links and provides a detailed Analytics Dashboard to track click performance in real-time.

Built with Spring Boot (Java 21) and React, this application features secure JWT Authentication and interactive data visualization using Chart.js, making it a production-ready solution for link management.

✨ Key Features

📊 Advanced Analytics

  • Visual Data: Interactive charts powered by react-chartjs-2 to visualize click trends over time.
  • Traffic Tracking: Monitor total clicks per link to measure engagement.
  • Date Filtering: Filter analytics data to analyze performance for specific periods.

🔗 Link Management

  • Instant Shortening: Generate short, memorable links in milliseconds.
  • Clipboard Actions: One-click copy functionality with react-hot-toast notifications.
  • Redirect Engine: Fast and reliable redirection to the original URL.

🔐 Security & UI

  • Secure Auth: User registration and login protected by Spring Security & JWT.
  • Modern UI: Responsive design built with Tailwind CSS and smooth animations using Framer Motion.
  • User Dashboard: Centralized hub to manage, view, and delete shortened links.

🛠 Tech Stack

Component Technologies Used
Backend Java 21, Spring Boot, Spring Security (JWT)
Frontend React.js, Tailwind CSS, Framer Motion
Database MySQL
Visualization Chart.js, React-Chartjs-2
Tools Maven, Git, Postman

📸 Screenshots

Landing Page User Dashboard
Landing Dashboard
Analytics & Charts Login Screen
Analytics Login

🔌 API Endpoints

The backend exposes RESTful APIs for seamless frontend integration:

Method Endpoint Description
POST /api/auth/register Register a new user
POST /api/auth/login Authenticate user & get JWT
POST /api/urls/shorten Create a new short URL
GET /api/urls/myurls Fetch all URLs for the logged-in user
GET /api/analytics/{shortUrl} Get click data & charts for a link
GET /{shortUrl} Redirect to the original URL

🚀 Getting Started

Prerequisites

  • Java JDK 21 or higher
  • Node.js (v18+) & npm
  • MySQL installed and running

1️⃣ Backend Setup (Spring Boot)

  1. Clone the repository and navigate to the backend folder:
    git clone [https://github.com/pranjalpatel044/shortalytics.git](https://github.com/pranjalpatel044/shortalytics.git)
    cd shortalytics/backend
  2. Configure database in src/main/resources/application.properties:
    spring.datasource.url=jdbc:mysql://localhost:3306/shortalytics_db
    spring.datasource.username=root
    spring.datasource.password=your_password
    app.jwt.secret=your_super_secret_key
  3. Run the application:
    mvn spring-boot:run

2️⃣ Frontend Setup (React)

  1. Navigate to the frontend folder:
    cd ../url-shortener-fe
  2. Install dependencies and run:
    npm install
    npm run dev

Developed by Pranjal Patel

About

Full-stack URL shortener with real-time analytics dashboard using Spring Boot, JWT authentication, and React with Chart.js for click tracking and performance insights.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages