Welcome to the URL Shortener and QR Code Generator, a full-stack application built with Vanilla JavaScript for the front end and Spring Boot, MySQL, Maven, and Hibernate JPA for the backend.
URL Shortener and QR Code Generator is a web application that allows users to shorten long URLs and generate QR codes for easy sharing. The application features a simple and intuitive user interface for shortening URLs and retrieving them.
- URL Shortening: Shorten long URLs into compact, shareable links.
- QR Code Generation: Generate QR codes for shortened URLs and any text.
- Backend Storage: Store and manage URLs in a MySQL database using Spring Boot and Hibernate JPA.
- Full Stack: Utilizes Vanilla JavaScript for the frontend and Spring Boot for the backend.
Before you begin, ensure you have the following installed:
- Java Development Kit (JDK) 17 or later
- Apache Maven
- MySQL Database
- Node.js and npm (for the frontend)
Follow the steps below to set up and run the URL Shortener and QR Code Generator on your local machine.
-
Clone the repository:
git clone [email protected]:navmeetsekhon/urlShortner.git
-
Navigate to the server directory:
cd server
-
Update the application.properties file with your database connection details:
spring.datasource.url=jdbc:mysql://localhost:3306/urlShortnerDb spring.datasource.username=your_username spring.datasource.password=your_password spring.jpa.generate-ddl=true spring.jpa.hibernate.ddl-auto=update short-url.allowed-characters=${ALLOWED_CHARS:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789} short-url.key-length=${KEY_LENGTH:6}
-
Run the application:
mvn spring-boot:run
The backend will be accessible at http://localhost:8080.
-
Navigate to the client directory:
cd client
-
Open
index.html
in any browser.
Visit the frontend application index.html
to start shortening URLs and generating QR codes. The backend API endpoints are available at http://localhost:8080/api.
We welcome contributions! If you'd like to contribute to the project, please follow our contribution guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you to the Spring Boot, Hibernate, and Node.js communities for their excellent tools and documentation. Special thanks to contributors and collaborators who have helped improve the project.