Giter Site home page Giter Site logo

microservice-url-shortener's Introduction

Introduction

This web app is a url shortening application, a user needs to register and login before URL shortening can be performed. A user put in a supposedly long URL and short one will be generated by the application that will redirect to the long URL.

It keeps track of each url uploaded for reference sake.

There are five folders in this repo

Client

The client folder contains client side angular app written in latest Angular 15

Url-management-service

This folder contains Java Spring Microservice application that handles authentication and url data management

Url-redirect-service

This folder contains Java Spring Microservice application that handles redirection of generated url to the original url

Event-bus

This folder contains Docker resources for bootstraping Kafka that we use to handle service to service communication. The architecture is event driven and event broker like Kafka is needed to build the whole communication frameworks.

Infra

This folder contains Kubernetes resource for provisioning of the infrastructures in easy to scale manner.

The diagram below shows how architecture procedure of the whole application.

architecture diagram

How to run

There two ways to run this application, scalable and non scalable way

Non Scalable Way

  1. Start client app [required applications; node, npm]

    • cd into client folder
    • run npm i to install npm dependencies
    • run npm install -g @angular/cli
    • run ng serve this will start application on port 4200
  2. Start event bus, from the root folder [required applications; docker, docker-compose]

    • cd into event-bus folder
    • run docker-compose up
  3. Start url-management-service, from the root folder [required applications; Java SDK]

    • cd into url-management-service folder
    • run ./mvnw spring-boot:run
  4. Start url-redirect-service, from the root folder [required applications; Java SDK]

    • cd into url-redirect-service folder
    • run ./mvnw spring-boot:run

Hurray!!!

Non Scalable Way

This setup requires docker, skaffold and kubernetes on your machine, this way give opportunity to scale each service up down according to number of nodes available and number of replicas we need to deploy.

  1. Create irembo-url-shortener.com in your computer host file, point it to 127.0.0.1
  2. Create irembo-url-redirect.com in your computer host file, also point it to 127.0.0.1
  3. From the root folder run skaffold dev

microservice-url-shortener's People

Contributors

dayo-aderemi avatar

Watchers

Aderemi Dayo Owolabi 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.