Sakura is an application for tracking your favourite Manga series last released chapters and chapters you read, and automatically updating your dashboard with the latest info
The project is a typical client server application implemented using the following technologies:
-
-
Angluar 12: JavaScript framework for developing SPA
-
TailwindCSS: CSS framework
-
-
Back-end:
- Spring boot: Framework for Java-based enterprise applications.
The back-end part was split into multiple microservices using Eureka service registration and discovery offered by the Spring Cloud module:
-
User service: Responsible for managing users information, including tracked manga series
-
Manga Info service: Responsible for fetching the latest Manga details from a third party API
-
Manga tracker: Exposes the back-end API endpoints and manages security for private endpoints.
In this approach we will be using Docker compose to deploy the application.
Clone the project:
$ git clone https://github.com/hamzanaciri99/sakura-manga-tracker.git
Open the project folder and checkout the commit "deploy locally" on the "deploy" branch:
$ git checkout deploy
First, we have to build our docker images. Open the terminal and:
Go the discovery-server folder:
$ cd discovery-server
Then build the project:
$ mvn clean install -DskipTests
Now that the jar files are ready, we need to build our docker image (Note that a Dockerfile already exists for each project in this branch):
$ docker image build . -f Dockerfile -t sakura/discovery-server
Repeat the same steps on each of the folders: user-service, manga-info-service, manga-tracker and db
Note that the images name are sakura/<folder-name> and sakura/mariadb for db folder, you can change that but you'll have to change the image property in the docker-compose.yml file.OU
You can check images using:
$ docker images
Build image for the front-end application (mangatracker folder):
$ docker image build . -f Dockerfile -t sakura/mangatracker-ng
You should have all the 5 images:
Navigate back to the root folder and run the docker-compose:
$ docker-compose up
Wait for the back-end services to run and register themselves on the discovery server, you can check the status and number of services on: http://localhost:8761/
Finally, you can access the application via: http://localhost/
You can stop the application with:
$ docker-compose down
We'll integrate our application (using spring boot actuator) with a monitoring system called Prometheus and a graphing solution called Grafana.
PS: Metrics are yet to be added in the deploy branch, if you want to test it you'll have to deploy project from the master branch and run Prometheus server with prometheus.yml file then add it to the data-source of Grafana. THERE WILL BE A SECTION ABOUT THE STEPS SOON
Prometheus Alertmanager handles alerts sent by Prometheus server and notifies end user through various method, We will set it up with Gmail to send notifications through email:
Home Page:
Dashboard:
Profile settings: