Table of Contents
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.
- Book Service : Add and modify information about books.
- Inventory Service : Update availability of books.
- Loan Service : Lend and receive books from users.
- Notification Service : To send notifications about books and loans.
- Discovery Server : Eureka service discovery server.
- API Gateway : API Gateway to route requests to microservices.
Each of the microservice has its own README
file with detailed information about the service.
This section shows the screenshots of some of the additional tools and services used in the application.
-
Make a copy of the
.env.example
file and rename it to.env
. Fill in the environment variables in the file.cp .env.example .env
-
Run the following command to run the docker-compose file.
docker-compose up -d
-
Now you can start each of the microservice using the following command inside each of the microservice directory.
./mvnw spring-boot:run
- Microservices:
Book Service
: 8282Inventory Service
: 8383Loan Service
: 8484Notification Service
: 8585Discovery Server
: 8761API Gateway
: 8080Apache Kafka
: 9092
- Metrics and Monitoring:
Keycloak
: 8181Zipkin
: 9411Prometheus
: 9090Grafana
: 3000
- Databases:
Cassandra
: 9042MongoDB
: 27017PostgreSQL
: 5432
This section shows how to use the services provided by the application.
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.
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.
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.
- 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.
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 theenhancement
tag.
- Fork the Project
- Create your Feature Branch
git checkout -b feature/new_feature
- Commit your Changes
git commit -m 'Add new_feature'
- Push to the Branch
git push origin feature/new_feature
- Open a Pull Request