Skip to content

epaitoo/hotel-booking-microservice

Repository files navigation

Hotel Booking Microservice

This is the backend for the hotel booking application which utilizes the microservice architecture. Users can create their profile, register their Hotel and users can book for rooms which are available in the hotel.

Features

  • Users Service with its own Database (More info here)
  • Hotel Service with ite own Database (More info here)
  • Booking Service with its own Database (More info here)
  • Service Registration and Discovery Server using Spring Cloud Netflix - Eureka. More Details here
  • Api Gateway which acts a Load Balancer to route request coming from the client to a specific service. See more details here.
  • Cloud Config Server: A central git repository on Github to store configurations and make them available for each service
  • Circuit Breaker with Resilience4j for rate limiting, fallback methods, load reduction and retry request in case of temporal failure
  • Distributed Tracing with Zipkin to trace request across microservices
  • Containerization of Microservices with Docker and Docker Compose
  • Container Orchestration with Kubernetes. See K8s yaml files here
  • Amazon Elastic Kubernetes Service (Amazon EKS) is used to deploy, manage and scale Kubernetes in the cloud

Image of Hotel Booking Microservice Architecture

Hotel Booking Microservice Architecture

API Documentation & Live Preview

Try out the API Endpoint:

Run in Postman

API Documentation here

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Application Setup with Docker & Docker Compose

  • Click on the 'Clone or download' button and select 'Download Zip.'
  • At the root of the project is the docker-compose.yaml file which contains all the images for each service and its environment variables
  • Run the docker-compose up command in the terminal to get the project up and running.

Application Setup without Docker

  • Click on the 'Clone or download' button and select 'Download Zip.'
  • Make sure you have mysql installed your local machine. see how to install here
  • Open your fav IDE and navigate to hotel-booking-service-registry Folder and install dependancies from the pom.xml (NB: The Service Registry must be run first so that it can register other services which will be run later)
  • Navigate to the other services for instance, spring-cloud-config folder and install its dependacies and run. Do the same for all the remaining services.