From 4ee720d3a0bbfde26da327594aeecb7048adf8e5 Mon Sep 17 00:00:00 2001 From: Amit Kumar Nandi <11887616+aamitn@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:50:52 +0530 Subject: [PATCH 1/7] Create README.md --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b3ad09 --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# Enterprise-Grade URL Shortener and Bio Page Application + +[![Build Status](https://travis-ci.org/yourusername/your-repo.svg?branch=main)](https://travis-ci.org/yourusername/your-repo) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) + +A powerful and scalable URL shortener with integrated bio pages built using Spring Boot. + +## Table of Contents + +- [Overview](#overview) +- [Features](#features) +- [Getting Started](#getting-started) + - [Prerequisites](#prerequisites) + - [Local Setup](#local-setup) + - [Deployment](#deployment) +- [Usage](#usage) +- [Contributing](#contributing) +- [License](#license) + +## Overview + +This project is an enterprise-grade URL shortener and bio page application developed with Spring Boot. It provides a robust solution for shortening URLs and creating bio pages for users. The application is designed for scalability and includes features such as analytics, user management, and subscription plans. + +## Features + +- Shorten URLs and create custom short URLs +- Integrated bio pages for users +- Analytics tracking for each shortened URL +- User management with registration, login, and profile updates +- Subscription plans for premium features +- Rate limiting to prevent abuse +- Forgot password and username recovery functionality +- ... + +## Getting Started + +### Prerequisites + +Before you begin, ensure you have the following installed: + +- Java (JDK 11 or later) +- Maven +- MySQL +- Your favorite IDE (IntelliJ, Eclipse, etc.) + +### Local Setup + +1. Clone the repository: + + ```bash + git clone https://github.com/yourusername/your-repo.git From e299fc6eafaa789ec1c8c89b123b76b476d217a0 Mon Sep 17 00:00:00 2001 From: Amit Kumar Nandi <11887616+aamitn@users.noreply.github.com> Date: Fri, 2 Feb 2024 00:13:15 +0530 Subject: [PATCH 2/7] Update README.md --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/README.md b/README.md index 2b3ad09..9655586 100644 --- a/README.md +++ b/README.md @@ -49,3 +49,53 @@ Before you begin, ensure you have the following installed: ```bash git clone https://github.com/yourusername/your-repo.git + +2. Create a MySQL database: + + ```sql + CREATE DATABASE url_shortener_db; + +2. Update the application.properties file: + +>Update the application.properties file in the src/main/resources directory with your database configuration. + + +4. Build and run the application: + + ```bash + Ccd your-repo + mvn spring-boot:run + +5. Access the application at http://localhost:8080 + +### Deployment + +1. Build a deployable JAR: + + ```bash + mvn clean install + +2. Deploy the JAR: + +>Deploy the generated JAR file to your cloud provider of choice (AWS, GCP, Azure, etc.). + +3.Configure environment variables: + +>Set environment variables for cloud-specific settings. + + +4. Start the application on the cloud server: + + ```bash + java -jar your-repo.jar + +### Usage +1. Shorten URLs by visiting the URL Shortener page. +2. Access analytics for each shortened URL. +3. Create and manage bio pages in the Bio section. + +### Contributing +Contributions are welcome! Please follow the contribution guidelines. + +### License +This project is licensed under the MIT License - see the LICENSE.md file for details. From 4e0db68a981959326d429766a263009fe5992387 Mon Sep 17 00:00:00 2001 From: Amit Kumar Nandi <11887616+aamitn@users.noreply.github.com> Date: Fri, 2 Feb 2024 00:17:54 +0530 Subject: [PATCH 3/7] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9655586..39b4264 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ [![Build Status](https://travis-ci.org/yourusername/your-repo.svg?branch=main)](https://travis-ci.org/yourusername/your-repo) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) +[![GitHub last commit](https://img.shields.io/github/last-commit/aamitn/URLShortener.svg)](https://github.com/aamitn/URLShortener/commits/main) +[![GitHub issues](https://img.shields.io/github/issues/aamitn/URLShortener.svg)](https://github.com/aamitn/your-repo/issues) +[![GitHub pull requests](https://img.shields.io/github/issues-pr/aamitn/URLShortener.svg)](https://github.com/aamitn/URLShortener/pulls) + A powerful and scalable URL shortener with integrated bio pages built using Spring Boot. From 9174948645c53d6048d7cd0dd9037b2a5a5389eb Mon Sep 17 00:00:00 2001 From: Amit Kumar Nandi <11887616+aamitn@users.noreply.github.com> Date: Fri, 2 Feb 2024 00:19:10 +0530 Subject: [PATCH 4/7] Update README.md --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 39b4264..6d70337 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,12 @@ [![Build Status](https://travis-ci.org/yourusername/your-repo.svg?branch=main)](https://travis-ci.org/yourusername/your-repo) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) -[![GitHub last commit](https://img.shields.io/github/last-commit/aamitn/URLShortener.svg)](https://github.com/aamitn/URLShortener/commits/main) -[![GitHub issues](https://img.shields.io/github/issues/aamitn/URLShortener.svg)](https://github.com/aamitn/your-repo/issues) -[![GitHub pull requests](https://img.shields.io/github/issues-pr/aamitn/URLShortener.svg)](https://github.com/aamitn/URLShortener/pulls) +[![GitHub last commit](https://img.shields.io/github/last-commit/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/commits/main) +[![GitHub issues](https://img.shields.io/github/issues/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/issues) +[![GitHub pull requests](https://img.shields.io/github/issues-pr/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/pulls) +[![GitHub contributors](https://img.shields.io/github/contributors/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/graphs/contributors) +[![Twitter](https://img.shields.io/twitter/url/https/github.com/yourusername/your-repo.svg?style=social)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Fyourusername%2Fyour-repo&text=Check%20out%20this%20awesome%20URL%20Shortener%20and%20Bio%20Page%20Application&via=yourtwitterhandle) + A powerful and scalable URL shortener with integrated bio pages built using Spring Boot. From a20c6f24b885ad9499b1192fd20c79562523e1d5 Mon Sep 17 00:00:00 2001 From: Amit Kumar Nandi <11887616+aamitn@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:40:09 +0530 Subject: [PATCH 5/7] Update README.md --- README.md | 173 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 102 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index 6d70337..91182c8 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,21 @@ -# Enterprise-Grade URL Shortener and Bio Page Application +## Enterprise-Grade URL Shortener and Bio Page Application -[![Build Status](https://travis-ci.org/yourusername/your-repo.svg?branch=main)](https://travis-ci.org/yourusername/your-repo) -[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) -[![GitHub last commit](https://img.shields.io/github/last-commit/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/commits/main) -[![GitHub issues](https://img.shields.io/github/issues/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/issues) -[![GitHub pull requests](https://img.shields.io/github/issues-pr/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/pulls) -[![GitHub contributors](https://img.shields.io/github/contributors/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/graphs/contributors) +[![Build Status](https://travis-ci.org/yourusername/your-repo.svg?branch=main)](https://travis-ci.org/yourusername/your-repo)[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)[![GitHub last commit](https://img.shields.io/github/last-commit/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/commits/main)[![GitHub issues](https://img.shields.io/github/issues/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/issues)[![GitHub pull requests](https://img.shields.io/github/issues-pr/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/pulls)[![GitHub contributors](https://img.shields.io/github/contributors/yourusername/your-repo.svg)](https://github.com/yourusername/your-repo/graphs/contributors) [![Twitter](https://img.shields.io/twitter/url/https/github.com/yourusername/your-repo.svg?style=social)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Fyourusername%2Fyour-repo&text=Check%20out%20this%20awesome%20URL%20Shortener%20and%20Bio%20Page%20Application&via=yourtwitterhandle) - - A powerful and scalable URL shortener with integrated bio pages built using Spring Boot. ## Table of Contents -- [Overview](#overview) -- [Features](#features) -- [Getting Started](#getting-started) - - [Prerequisites](#prerequisites) - - [Local Setup](#local-setup) - - [Deployment](#deployment) -- [Usage](#usage) -- [Contributing](#contributing) -- [License](#license) +* [Overview](#overview) +* [Features](#features) +* [Getting Started](#getting-started) + * [Prerequisites](#prerequisites) + * [Local Setup](#local-setup) + * [Deployment](#deployment) +* [Usage](#usage) +* [Contributing](#contributing) +* [License](#license) ## Overview @@ -30,14 +23,14 @@ This project is an enterprise-grade URL shortener and bio page application devel ## Features -- Shorten URLs and create custom short URLs -- Integrated bio pages for users -- Analytics tracking for each shortened URL -- User management with registration, login, and profile updates -- Subscription plans for premium features -- Rate limiting to prevent abuse -- Forgot password and username recovery functionality -- ... +* Shorten URLs and create custom short URLs +* Integrated bio pages for users +* Analytics tracking for each shortened URL +* User management with registration, login, and profile updates +* Subscription plans for premium features +* Rate limiting to prevent abuse +* Forgot password and username recovery functionality +* ... ## Getting Started @@ -45,64 +38,102 @@ This project is an enterprise-grade URL shortener and bio page application devel Before you begin, ensure you have the following installed: -- Java (JDK 11 or later) -- Maven -- MySQL -- Your favorite IDE (IntelliJ, Eclipse, etc.) +* Java (JDK 11 or later) +* Maven +* MySQL +* Your favorite IDE (IntelliJ, Eclipse, etc.) ### Local Setup -1. Clone the repository: +1. Clone the repository: + + ```plaintext + git clone https://github.com/yourusername/your-repo.git + ``` + +2. **Apply the Database Schema:** + + Execute the provided **db\_schema.sql** file to set up the necessary tables and schema for the application. This script will also create the required database. + +3. ```plaintext + mysql -u your_username -p < path/to/db_schema.sql + ``` + +4. Update the application.properties file: - ```bash - git clone https://github.com/yourusername/your-repo.git - -2. Create a MySQL database: +> Update the application.properties file in the src/main/resources directory with your database configuration. - ```sql - CREATE DATABASE url_shortener_db; - -2. Update the application.properties file: - ->Update the application.properties file in the src/main/resources directory with your database configuration. - - -4. Build and run the application: - - ```bash - Ccd your-repo - mvn spring-boot:run - -5. Access the application at http://localhost:8080 +1. Build and run the application: + + ```plaintext + Ccd your-repo + mvn spring-boot:run + ``` + +2. Access the application at http://localhost:8080 ### Deployment -1. Build a deployable JAR: - - ```bash - mvn clean install - -2. Deploy the JAR: - ->Deploy the generated JAR file to your cloud provider of choice (AWS, GCP, Azure, etc.). - -3.Configure environment variables: - ->Set environment variables for cloud-specific settings. - - -4. Start the application on the cloud server: - - ```bash - java -jar your-repo.jar +1. **Build a deployable WAR:** + + ```plaintext + mvn clean install + ``` + +2. **Deploy the WAR:** + * **Option 1: Manual Deployment** + + Deploy the generated WAR file to your Tomcat server. Copy the WAR file to the `webapps` directory of your Tomcat installation. + + ```plaintext + cp target/shorten.war /path/to/tomcat/webapps/ + ``` + + * **Option 2: Web Interface Upload** + + Alternatively, if your Tomcat server provides a web interface for WAR file deployment, follow these steps: + + * Access the Tomcat Manager web interface at `http://localhost:8080/manager/html` (replace with your Tomcat server address). + * Log in with your Tomcat manager credentials. + * Navigate to the "WAR file to deploy" section. + * Choose the `shorten.war` file using the file upload button. + * Click the "Deploy" button. +3. **Configure environment variables:** + + Set environment variables for cloud-specific settings. + +4. **Adjust Tomcat Configuration (Important):** + + To ensure proper functionality, it's important to run the application on the root of the servlet container. If you're using Tomcat, add the following line to your `server.xml` configuration file within the `` section: + + ```xml + + ``` + + This ensures that the application runs on the root context path. Adjust the `docBase` attribute according to your deployment directory. + +5. **Start Tomcat:** + + Start your Tomcat server. + + ```plaintext + /path/to/tomcat/bin/startup.sh # for Linux + /path/to/tomcat/bin/startup.bat # for Windows + ``` + + Access the application at `http://localhost:8080/`. + ### Usage -1. Shorten URLs by visiting the URL Shortener page. -2. Access analytics for each shortened URL. -3. Create and manage bio pages in the Bio section. + +1. Shorten URLs by visiting the URL Shortener page. +2. Access analytics for each shortened URL. +3. Create and manage bio pages in the Bio section. ### Contributing + Contributions are welcome! Please follow the contribution guidelines. ### License + This project is licensed under the MIT License - see the LICENSE.md file for details. From c0dd3a47abaeb401f8ae307645d001b1d4610dbc Mon Sep 17 00:00:00 2001 From: Amit Kumar Nandi <11887616+aamitn@users.noreply.github.com> Date: Wed, 14 Feb 2024 21:50:00 +0530 Subject: [PATCH 6/7] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 91182c8..50b089a 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,12 @@ Before you begin, ensure you have the following installed: Access the application at `http://localhost:8080/`. +6. **Adjust Configuration (Optional):** If you need to customize the application configuration after deployment, you can find the **application.properties** file within the deployed WAR file. THe file can be accesses as : + + ```plaintext + vi /path/to/tomcat/webapps/your-app/WEB-INF/classes/application.properties + ``` + ### Usage From 123cc75f75d959ce28d17b155048cd0b6b1ab9b7 Mon Sep 17 00:00:00 2001 From: Amit Kumar Nandi <11887616+aamitn@users.noreply.github.com> Date: Wed, 14 Feb 2024 21:54:30 +0530 Subject: [PATCH 7/7] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 50b089a..e0373db 100644 --- a/README.md +++ b/README.md @@ -48,29 +48,29 @@ Before you begin, ensure you have the following installed: 1. Clone the repository: ```plaintext - git clone https://github.com/yourusername/your-repo.git + git clone https://github.com/aamitn/URLShortener.git ``` 2. **Apply the Database Schema:** Execute the provided **db\_schema.sql** file to set up the necessary tables and schema for the application. This script will also create the required database. -3. ```plaintext + ```plaintext mysql -u your_username -p < path/to/db_schema.sql ``` -4. Update the application.properties file: - -> Update the application.properties file in the src/main/resources directory with your database configuration. - -1. Build and run the application: +3. Update the application.properties file: + +  Update the application.properties file in the src/main/resources directory with your database configuration. + +4. Build and run the application: ```plaintext - Ccd your-repo + cd URLShortener mvn spring-boot:run ``` -2. Access the application at http://localhost:8080 +5. Access the application at http://localhost:8080 ### Deployment