Go to Project Presentation Video
The Dine Experience Application is a comprehensive project developed for the N11 TalentHub Backend Bootcamp. This application is built using a microservices architecture and consists of five main modules: discovery-server, api-gateway, user-service, restaurant-service, and logging-service. The Discovery Server serves as a service registry that enables effective communication between microservices. The API Gateway serves as the single entry point for all client requests and forwards them to the appropriate service. The User Service manages users and their reviews for restaurants, providing functions such as user registration, posting reviews, and personalized restaurant recommendations based on user location and restaurant ratings. The Restaurant Service manages all operations related to restaurants, including restaurant registration and listing, and stores all restaurant data in Apache Solr. The Logging Service is a logging service for a Spring Boot application. It uses Apache Kafka for message consumption and MongoDB for data storage. The service is designed to consume error logs from Kafka, store them in MongoDB, and provide an API for retrieving the logs. Each service in this repository has its own README.md file, providing detailed information about the project.
-
Discovery Server: A Spring Boot application that provides service discovery and registration. It uses Netflix Eureka to register and discover services. The Discovery Service is the single entry point for all clients. It forwards requests to the appropriate service.
-
API Gateway: A Spring Boot application that provides a RESTful API for managing users and restaurants. It includes operations for creating, retrieving, updating, and deleting users and restaurants. The API Gateway is the single entry point for all clients. It forwards requests to the appropriate service. It also provides a way to authenticate and authorize users.
-
User Service: A Spring Boot application that provides a RESTful API for managing users and user reviews. It includes operations for creating, retrieving, updating, and deleting users and user reviews. Each user has associated latitude and longitude values. User reviews have a score between 1 and 5.
-
Restaurant Service: A Spring Boot application that provides a RESTful API for managing restaurants. It includes operations for creating, retrieving, updating, and deleting restaurants. Each restaurant has associated latitude and longitude values. The data for the restaurants is stored in Apache Solr and queries are also made to Solr. The service also provides an API for recommending restaurants to users based on their location and the restaurant's score.
-
Logging Service: This is a logging service for a Spring Boot application. It uses Apache Kafka for message consumption and MongoDB for data storage. The service is designed to consume error logs from Kafka, store them in MongoDB, and provide an API for retrieving the logs.
This project uses Docker to run each microservice and the databases they depend on. This allows the project to be easily run on any platform. Below are the steps to run the Dockerized version of the project.
- Ensure Docker and Docker Compose are installed. For instructions on how to install Docker and Docker Compose, refer to the official Docker documentation.
-
Clone or download the project to your local machine.
-
Open a terminal and navigate to the root directory of the project.
-
Run the following command:
docker-compose up -d
This command starts all services and databases defined in the Docker Compose file.
-
To check that all containers are running properly, run the following command:
docker ps
This command gives a list of all running Docker containers. You should see a container running for each microservice and database.
You can use the docker ps
command to check the status of each container. This command gives a list of all running Docker containers. You should see a container running for each microservice and database.
Each microservice is made accessible over a specific port. Below is a list of which port each microservice runs on:
discovery-server
: 8761api-gateway
: 8080restaurant-service
: 8081user-service
: 8082logging-service
: 8083
Additionally, the databases and other services can be accessed over the following ports:
postgres_db
: 5432mongo_db
: 27017solr
: 8983zipkin
: 9411kafka
: 9092zookeeper
: 2181
You can use the following command to stop all containers:
docker-compose down