GitHunt
MA

manishdait/url-shortner

A URL shortener built with Spring Boot

URL Shortener

This is a Spring Boot application for URL shortening. It allows users to submit long URLs and receive a shortened version for easy sharing.

Technologies Used

  • Spring Boot
  • PostgreSQL

Setup

Prerequisites

  • Java Development Kit (JDK) 17 or later
  • Maven
  • Docker

Building and Running with Maven

  1. Clone the repository:

    git clone https://github.com/manishdait/url-shortner
  2. Navigate to the project directory:

    cd url-shortener
  3. Setup Postgres Container:

     docker compose up -d 
  4. Run SpringBoot application:

    mvn spring-boot:run

Usage

Accessing UI

Once the application is running, the user interface is accessible at:
http://localhost:8080/url-shortner

Shortening URLs

  1. Open the URL in your web browser (http://localhost:8080/url-shortner).
  2. Enter the long URL you want to shorten in the provided input field.
  3. Click the "Shorten URL" button.
  4. The application will generate a shortened URL and display it on the page.
    • If the entered URL is invalid, an appropriate error message will be shown.
  5. Visiting a shortened URL will redirect you to the original long URL

Result

Demo Image

Demo Image

Languages

Java80.6%HTML11.7%CSS7.7%

Contributors

Created January 27, 2025
Updated November 28, 2025
manishdait/url-shortner | GitHunt