Skip to content

An URL shortener application developed using Java, Spring Boot, and MongoDB.

License

Notifications You must be signed in to change notification settings

myzticbean/URL-Shortener

Repository files navigation

URL Shortener

The URL Shortener project is a web application developed using Java, Spring Boot, and MongoDB. Its main purpose is to provide a service that allows users to shorten long URLs into shorter, more manageable links. This project aims to simplify the sharing and tracking of URLs, making them easier to remember and share across various platforms.

Key Features:

  • URL Shortening: Users can input long URLs and generate shortened links that are easier to share and remember.
  • Expiration and Tracking: Shortened URLs can be set with an expiration date, after which they will no longer be accessible. Additionally, the system tracks the number of visits and provides analytics for each shortened URL.
  • Duplicate URL Handling: The system checks for duplicate URLs and ensures that multiple shortcodes are not generated for the same URL.
  • Error Handling: The project includes robust error handling mechanisms to handle various scenarios, such as shortcode collisions.

Feature Roadmap 🛣️

URL Shortener Service

  • Setup call to metrics-service via Kafka every time the URL is visited
  • Handle invalid URLs
  • Custom short codes
  • Activate deactivated shortcode if new add-url-request comes for existing deactivated url

DB Service

  • Setup endpoint to process add-metrics
  • Add logic to save URL metrics to DB

Metrics Service

  • Setup metrics service
  • Setup Kafka service to consume add-metrics messages from url-shortener-service
  • Setup Feign client calling DB service
  • Setup metrics logic for URL visit

Future

  • Add swagger
  • Enable caching
  • Implement service discovery and load balancing
  • Implement circuit breaker using Resilience4J
  • Implement API security

Kafka Installation using Brew on MacOS

Run this command in terminal:

$ brew install kafka

This will install Zookeeper and then Kafka. To start Kafka, Zookeeper must be running. Run below commands:

$ brew services start zookeeper
$ brew services start kafka

To stop the services, run below commands:

$ brew services stop kafka
$ brew services stop zookeeper

About

An URL shortener application developed using Java, Spring Boot, and MongoDB.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published