The URL Shortener API is a Java-based Spring Boot application integrated with a React front end, allowing users to shorten long URLs, set expiration dates, update existing URLs, and redirect to original URLs. It uses a MySQL database for persistence and stores URL mappings, with functionality to handle URL expiration. The entire application is containerized using Docker for simplified deployment and scalability, ensuring consistent environments for both the Spring Boot API and MySQL database, making it efficient and practical for real-world use.
Backend Code Link : https://github.com/Ragulakarthik/URL-Shortner
This is how data base looks like
Create MYSQL docker image and conatiner
Build the docker image for spring boot application
Create Network for connecting MySql to spring boot
Run the Command to run the docker image
For frontend : Add docker file and run these commands
docker build -t urlshortenerfrontend:dev .
docker run -p 3000:3000 urlshortenerfrontend:dev
- Shorten URLs: 🔗 Convert long URLs into short, user-friendly links.
- Set Expiration Dates: ⏳ Specify an expiration date for short URLs.
- Update URLs: 🔄 Update the original URL for existing short URLs.
- Redirect Short URLs: 🔄 Redirect users from short URLs to their original long URLs.
- Database Integration: 🗄️ Store URL data in a SQL database.
- Exception Handling: 🚫 Handles cases for expired URLs and non-existent short URLs with appropriate error responses.
- Java 17: ☕ Programming language used for the application.
- Spring Boot: 🚀 Framework for building the RESTful API.
- SQL: 🗄️ Relational database for storing URL data.
- React: ⚛️ Front-end library for building user interfaces.
- Maven: 📦 Build tool for managing dependencies and building the project.
- **Docker:**🛳️ Used for containerizing.
- Java 17 ☕
- Maven 📦
- SQL database (MySQL, MariaDB, etc.) 🗄️