Skip to content

bkk07/urlshortner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener

This project is a URL shortening service built using a microservices architecture. It is designed to be scalable, resilient, and maintainable.

Architecture

The following diagram illustrates the overall architecture of the system:

Architecture

Flows

Redirect Flow

This diagram shows the flow of a user being redirected from a shortened URL to the original URL.

Redirect Flow

Sequence Diagram

This diagram shows the sequence of interactions between the services when a new URL is shortened.

Sequence Diagram

Services

The system is composed of the following microservices:

  • api-gateway: The single entry point for all client requests. It routes requests to the appropriate downstream service.
  • eureka-server: The service registry and discovery server. All other services register with Eureka, allowing them to find and communicate with each other.
  • command-service: Handles commands to create and update data, such as creating a new shortened URL.
  • query-service: Handles queries for data, such as retrieving the original URL for a given short URL.
  • analytics-service: Collects and processes analytics data, such as the number of times a URL has been accessed.
  • common: A shared library containing common code and data models used by the other services.

Getting Started

To get started with this project, you will need to have the following installed:

  • Java 11 or higher
  • Maven
  • Docker (optional)

To run the project, you can start each of the services individually. It is recommended to start them in the following order:

  1. eureka-server
  2. command-service
  3. query-service
  4. analytics-service
  5. api-gateway

Technologies Used

  • Spring Boot: For creating the microservices.
  • Spring Cloud: For service discovery (Eureka) and API gateway.
  • Maven: For dependency management.
  • CQRS: The project follows the Command Query Responsibility Segregation pattern.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages