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
The client folder contains client side angular app written in latest Angular 15
This folder contains Java Spring Microservice application that handles authentication and url data management
This folder contains Java Spring Microservice application that handles redirection of generated url to the original url
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.
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.
There two ways to run this application, scalable and non scalable way
-
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 port4200
-
Start event bus, from the root folder [required applications; docker, docker-compose]
- cd into event-bus folder
- run
docker-compose up
-
Start url-management-service, from the root folder [required applications; Java SDK]
- cd into url-management-service folder
- run
./mvnw spring-boot:run
-
Start url-redirect-service, from the root folder [required applications; Java SDK]
- cd into url-redirect-service folder
- run
./mvnw spring-boot:run
Hurray!!!
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.
- Create
irembo-url-shortener.com
in your computer host file, point it to127.0.0.1
- Create
irembo-url-redirect.com
in your computer host file, also point it to127.0.0.1
- From the root folder run
skaffold dev