Git Product home page Git Product logo

url-shortener's Introduction

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

url-shortener's People

Contributors

myzticbean avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.