A modern URL shortening service that transforms long, messy, and unprofessional web addresses into short, clean, and professional links that are easy to share and look great. Built with Spring Boot, React.js, and MySQL, this application uses JWT-based authentication for security and is containerized with Docker for simple deployment and scalability.
Imagine you have a long web address that's hard to share because it's filled with random letters and numbers. This URL shortener is like a magic tool that turns that messy link into a short, neat one like short.link/abc123. It makes your links look professional and easy to share on social media, emails, or anywhere else. When someone clicks the short link, they’re taken straight to the original webpage. It’s secure, user-friendly, and works on any device, with features to keep your links safe and organized.
- Converts long URLs into short, professional-looking links.
- Secure user accounts with JWT authentication. (authorized people can create short links).
- Stores all links and user data safely in a MySQL database.
- Clean, responsive interface built with React.js for a great user experience.
- Easy deployment with Docker, making it simple to run anywhere.
- RESTful API for creating and accessing short links.
- Planned support for OAuth 2.0 to log in with services like Google or GitHub.
- Backend: Spring Boot, Spring Security(JWT for authentication)
- Frontend: React.js, Tailwind CSS(for styling)
- Database & Caching: MySQL and Redis
- Containerization: Docker
- Tools: Maven(backend build), Axios(frontend HTTP requests)
To run this project, you'll need:
- Java 17 or higher
- Node.js 22 or higher
- MySQL 8.0 or higher
- Docker
- Maven (for building the backend)
- Clone the Repository
- Download the project code to your computer:
git clone https://github.com/FernandesReon/url-shortener.git cd url-shortener - Backend Setup (Spring Boot)
- Go to the backend folder
cd backend- Create a MySQL database:
CREATE DATABASE url_shortener;- Set up MySQL in the configuration file: src/main/resource/application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/url_shortener spring.datasource.username=your_username spring.datasource.password=your_password spring.jpa.hibernate.ddl-auto=update
- Build and start the backend
mvn spring-boot:run
- Frontend Setup (React.js)
- Go to the frontend folder:
cd frontend- Install the required packages:
npm install
- Run the project:
npm run dev