https://github.com/imperviousdeveloper/url-shortner-react
An efficient and modern URL Shortener application
https://github.com/imperviousdeveloper/url-shortner-react
react spring-boot
Last synced: 3 months ago
JSON representation
An efficient and modern URL Shortener application
- Host: GitHub
- URL: https://github.com/imperviousdeveloper/url-shortner-react
- Owner: ImperviousDeveloper
- Created: 2025-02-16T00:04:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-16T00:52:46.000Z (over 1 year ago)
- Last Synced: 2025-02-16T01:18:43.420Z (over 1 year ago)
- Topics: react, spring-boot
- Homepage: https://imperviousdeveloper.github.io/url-shortner-react/
- Size: 767 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ URL Shortener Application
## ๐ Introduction
The **URL Shortener Application** is a sleek and modern web solution built with **React** on the frontend and **Spring Boot** on the backend. This application allows users to shorten long URLs into more manageable links and track the number of visits for each shortened URL.
## โจ Features
- ๐ Generate short URLs instantly
- ๐ Track the number of clicks on shortened URLs
- ๐งโ๐ป REST API for URL shortening and analytics
- ๐ Customizable short links (optional feature)
- ๐๏ธ Lightning-fast performance with React & Spring Boot
## ๐ ๏ธ Tech Stack
### Frontend
- React
- React Router
- Axios
- TailwindCSS
### Backend
- Spring Boot
- Spring Data JPA
- Hibernate
- PostgreSQL (or H2 for local development)
- Lombok
## ๐ฆ Installation & Setup
### Prerequisites
- Java 17+
- Node.js & npm
- PostgreSQL (or Docker if preferred)
### Backend Setup
```bash
cd backend
./mvnw clean install
./mvnw spring-boot:run
```
### Frontend Setup
```bash
cd frontend
npm install
npm start
```
## ๐งโ๐ป API Endpoints
| Method | Endpoint | Description |
|--------|------------------------|----------------------------------|
| POST | /api/v1/shorten | Shorten a URL |
| GET | /api/v1/{shortCode} | Redirect to the original URL |
| GET | /api/v1/stats/{shortCode} | Get visit count for a short URL |
## โ๏ธ Environment Variables
Create a `.env` file in both `backend` and `frontend` directories:
### Backend `.env`:
```env
DATABASE_URL=jdbc:postgresql://localhost:5432/url_shortener
DATABASE_USERNAME=your_db_user
DATABASE_PASSWORD=your_db_password
```
### Frontend `.env`:
```env
REACT_APP_API_BASE_URL=http://localhost:8080/api/v1
```
## ๐ผ๏ธ Screenshots


## ๐งช Testing
- Frontend Unit Tests with Jest & React Testing Library
- Backend Tests with JUnit & MockMVC
## ๐ Future Enhancements
- โ
User Authentication for personalized URL tracking
- โ
Custom domain support for short URLs
- โ
QR code generation for short links
- โ
Expiry dates for short URLs
## ๐ค Contributing
Contributions are welcome! Feel free to fork the repository and open a pull request.
## ๐ซ Contact
- **Email:** [mr.sharmajeerajan@gmail.com](mailto:mr.sharmajeerajan@gmail.com)
- **LinkedIn:** [LinkedIn Profile](https://www.linkedin.com/in/rajan-kumar-sharma-709a17229/)
---
> "Great software is built by passionate developers."