Shortify is a robust URL shortening service built with Spring Boot and React. This application transforms long, unwieldy URLs into concise, shareable links while providing detailed analytics on usage patterns. The modern React frontend delivers an intuitive user experience, while the secure Spring Boot backend implements JWT authentication and leverages MySQL for data persistence.
- SpringBoot, Spring Security with JWT implementation
- React
- MySQL
- Create shortened URLs with custom expiration dates
- Secure registration and login using JWT
- RESTful API for programmatic access to all features
- Automatic redirection from shortened URLs to original targets
POST /api/auth/register
- Register a new userPOST /api/auth/login
- Authenticate and receive JWT token
POST /api/urls
- Create a new shortened URLGET /api/urls
- Get all URLs (for authenticated users)GET /api/urls/{shortCode}
- Get information about a specific URLGET /s/{shortCode}
- Redirect to the original URLGET /not-found
- Error page for invalid or expired URLs
- Clone the repository
- Configure application properties in
application.properties
:spring.datasource.url=jdbc:mysql://localhost:3306/your_db spring.datasource.username=your_username spring.datasource.password=your_password spring.jpa.hibernate.ddl-auto=update app.base-url=http://localhost:8080
- Build the backend using Maven:
mvn clean install
- Run the Spring Boot application:
mvn spring-boot:run
- Navigate to the frontend directory
- Install dependencies:
npm install
- Start the Vite development server:
npm run dev
- Access the application at
http://localhost:5173