Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ratnesh2003/book-microservices
This is a microservice application created using Spring Boot and Spring Cloud
https://github.com/ratnesh2003/book-microservices
api-gateway cassandra docker-compose eureka-discovery-service grafana kafka keycloak micrometer microservices mongodb postgresql prometheu resilience4j spring-cloud springboot springboot3 webclient
Last synced: 10 days ago
JSON representation
This is a microservice application created using Spring Boot and Spring Cloud
- Host: GitHub
- URL: https://github.com/ratnesh2003/book-microservices
- Owner: Ratnesh2003
- Created: 2024-03-03T12:13:11.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-03-22T06:44:59.000Z (10 months ago)
- Last Synced: 2025-01-21T02:09:06.746Z (10 days ago)
- Topics: api-gateway, cassandra, docker-compose, eureka-discovery-service, grafana, kafka, keycloak, micrometer, microservices, mongodb, postgresql, prometheu, resilience4j, spring-cloud, springboot, springboot3, webclient
- Language: Java
- Homepage:
- Size: 56.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Table of Contents
## Introduction
This application showcases the use of Spring Cloud for a microservice application. It is a basic application for a bookstore platform. Admins can manage books and their availability in the inventory. They can also lend books to users and facilitate book returns.
### List of microservices
* [Book Service](https://github.com/Ratnesh2003/book-microservices/tree/master/book-service) : Add and modify information about books.
* [Inventory Service](https://github.com/Ratnesh2003/book-microservices/tree/master/inventory-service) : Update availability of books.
* [Loan Service](https://github.com/Ratnesh2003/book-microservices/tree/master/loan-service) : Lend and receive books from users.
* [Notification Service](https://github.com/Ratnesh2003/book-microservices/tree/master/notification-service) : To send notifications about books and loans.
* [Discovery Server](https://github.com/Ratnesh2003/book-microservices/tree/master/discovery-server) : Eureka service discovery server.
* [API Gateway](https://github.com/Ratnesh2003/book-microservices/tree/master/api-gateway) : API Gateway to route requests to microservices.Each of the microservice has its own `README` file with detailed information about the service.
### Built With
* [![SpringBoot][SpringBoot]][SpringBoot-url]
* [![Prometheus][Prometheus]][Prometheus-url]
* [![Grafana][Grafana]][Grafana-url]
* [![Cassandra][Cassandra]][Cassandra-url]
* [![Mongodb][Mongodb]][Mongodb-url]
* [![Postgresql][Postgresql]][Postgresql-url]
* [![Docker][Docker]][Docker-url]## Screenshots
This section shows the screenshots of some of the additional tools and services used in the application.
## Getting Started
### Prerequisites
* [Java 17+](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
* [Docker](https://www.docker.com/)### Installation
- Make a copy of the `.env.example` file and rename it to `.env`. Fill in the environment variables in the file.
```sh
cp .env.example .env
```
- Run the following command to run the docker-compose file.```sh
docker-compose up -d
```
- Now you can start each of the microservice using the following command inside each of the microservice directory.```sh
./mvnw spring-boot:run
```## Services Ports
- Microservices:
* `Book Service` : 8282
* `Inventory Service` : 8383
* `Loan Service` : 8484
* `Notification Service` : 8585
* `Discovery Server` : 8761
* `API Gateway` : 8080
* `Apache Kafka`: 9092
- Metrics and Monitoring:
* `Keycloak` : 8181
* `Zipkin` : 9411
* `Prometheus` : 9090
* `Grafana` : 3000
- Databases:
* `Cassandra` : 9042
* `MongoDB` : 27017
* `PostgreSQL` : 5432## Usage
This section shows how to use the services provided by the application.
### Book Service
This service is used to manage books. Admins can add, modify and delete books from the database. The service uses `MongoDB` as the database.
_Complete documentation [here](https://github.com/Ratnesh2003/book-microservices/tree/master/book-service)._### Inventory Service
This service is used to manage the availability of books. Admins can update the availability of books in the inventory. The service uses `PostgreSQL` as the database.
_Complete documentation [here](https://github.com/Ratnesh2003/book-microservices/tree/master/inventory-service)._### Loan Service
This service is used to lend and receive books from users. Admins can lend books to users and receive books from users. The service uses `Cassandra` as the database.
_Complete documentation [here](https://github.com/Ratnesh2003/book-microservices/tree/master/loan-service)._## Roadmap
- [x] Add documentation for each of the microservices.
- [ ] Add gmail smtp server for sending emails in notification service.
- [ ] Add redis for caching and improving performance.
- [ ] Add rate limiting for the API Gateway.
- [ ] Add more events for the notification service.## Contributing
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the`enhancement`tag.
1. Fork the Project
2. Create your Feature Branch
`git checkout -b feature/new_feature`
3. Commit your Changes
`git commit -m 'Add new_feature'`
4. Push to the Branch
`git push origin feature/new_feature`
5. Open a Pull Request[SpringBoot]: https://img.shields.io/badge/Spring%20Boot-6DB33F?style=for-the-badge&logo=Spring&logoColor=white
[SpringBoot-url]: https://nextjs.org/
[ApacheKafka.js]: https://img.shields.io/badge/Apache%20Kafka-000?style=for-the-badge&logo=apachekafka
[React-url]: https://reactjs.org/
[Prometheus]: https://img.shields.io/badge/Prometheus-grey?style=for-the-badge&logo=prometheus
[Prometheus-url]: https://vuejs.org/
[Grafana]: https://img.shields.io/badge/Grafana-black?style=for-the-badge&logo=grafana
[Grafana-url]: https://angular.io/
[Cassandra]: https://img.shields.io/badge/Apache%20Cassandra-white?style=for-the-badge&logo=apachecassandra
[Cassandra-url]: https://svelte.dev/
[Mongodb]: https://img.shields.io/badge/MongoDB-black?style=for-the-badge&logo=mongodb
[Mongodb-url]: https://laravel.com
[Postgresql]: https://img.shields.io/badge/postgresql-white?style=for-the-badge&logo=postgresql&logoColor=blue
[Postgresql-url]: https://getbootstrap.com
[Docker]: https://img.shields.io/badge/docker-blue?style=for-the-badge&logo=docker&logoColor=white
[Docker-url]: https://jquery.com