Git Product home page Git Product logo

amanastel / hotel-management-microservices Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 4.0 228 KB

Welcome to our Microservices Project! ๐Ÿš€ Explore a modern architecture for a hotel management system, built using Spring Boot and Spring Cloud.

Home Page: https://drive.google.com/file/d/1uJX7_nho_3pQEkUiB2cj8MjbvNscRZou/view?usp=sharing

License: MIT License

Java 100.00%
eureka-client eureka-server gateway-api hibernate java maven microservice mongodb mysql netlify-plugin postgresql spring-boot spring-security springcloud webflux

hotel-management-microservices's Introduction

Hotel Management Microservices

Welcome to the Hotel Management Microservices project. This application is designed to manage various aspects of a hotel, including booking rooms, adding hotels, and handling user ratings.

Table of Contents

Features

This application provides the following features:

User Service

  • User registration and authentication.
  • User can book hotel rooms.
  • User can cancel bookings.
  • Wallet system to track all transactions for users.

Hotel Service

  • Add hotels with details.
  • Add rooms to hotels.
  • Get hotel details by ID or name.
  • Get a list of all available rooms in a hotel.
  • Get a list of all booked rooms in a hotel.

Booking Service

  • Book rooms in hotels.
  • Get booking details by booking ID.
  • Get a list of all bookings.

Rating Service

  • Add ratings and reviews for hotels.
  • Get all ratings.
  • Get ratings by user ID or hotel ID.

Service Registry

  • Register and discover microservices.

Configuration Server

  • Manage centralized configurations for microservices.

API Gateway

  • Gateway for accessing microservices.

Tech Stack

  • Java
  • Spring Boot
  • Spring Cloud
  • Spring Cloud Eureka
  • Spring Cloud Config
  • Spring Security
  • OAuth 2.0
  • Spring Data JPA
  • Spring Web
  • Spring Data MongoDB
  • Spring Data REST
  • Spring Cloud Gateway
  • Netflix Eureka
  • Thymeleaf
  • MySQL
  • MongoDB
  • Okta
  • Git

Getting Started

To get started with the project, make sure you have the required tools and dependencies installed.

Installation

  1. Clone this repository: git clone https://github.com/Amanastel/Hotel-Management-Microservices.git
  2. Navigate to the project directory: cd Hotel-Management-Microservices

Configuration

  • Configure the properties of each microservice according to your requirements.

Usage

  • Run each microservice individually to start the Hotel Management system.

Checking Service Status

  • Eureka Server:
    • Eureka Dashboard: http://localhost:8761
      • You can check the status of all registered microservices here. It will show which services are up and running and their corresponding instances.

Instances currently registered with Eureka:

  • API-GATEWAY:

    • Availability Zones: UP (1) - 192.168.1.4:API-GATEWAY:8086
  • CONFIG-SERVER:

    • Availability Zones: UP (1) - 192.168.1.4:CONFIG-SERVER:8085
  • HOTELS-SERVICE:

    • Availability Zones: UP (1) - 192.168.1.4:hotels-service:8082
  • RATING-SERVICE:

    • Availability Zones: UP (1) - 192.168.1.4:rating-service:8083
  • USERS-SERVICE:

    • Availability Zones: UP (1) - 192.168.1.4:users-service:8081
  • API Gateway Default URL: http://localhost:8086

User Service Routes

  • User login: http://localhost:8086/auth/login
    • Login on this URL to obtain an access token. You can use this access token to make authenticated requests to other service endpoints.
  • Fetch all users: http://localhost:8086/users/all
  • User registration: http://localhost:8086/users/register
  • User login: http://localhost:8086/users/login
  • Book a hotel room: http://localhost:8086/users/addBooking
  • Complete a Booking hotel: http://localhost:8086/users/completeBooking/{bookingId}
  • Cancel a booking: http://localhost:8086/users/cancelBooking/{bookingId}
  • Add wallet Balance transactions: http://localhost:8086/users/wallet/addMoney/{email}?amount=00.0
  • View wallet Balance transactions: http://localhost:8086/users/wallet/getBalance/{email}
  • View wallet transactions: http://localhost:8086/users/wallet/getTransactions/{email}

Hotel Service Routes

  • Fetch all hotels: http://localhost:8086/hotels/all
  • Fetch hotel by ID: http://localhost:8086/hotels/{hotelId}
  • Add a hotel: http://localhost:8086/hotels/add
  • Add a room to a hotel: http://localhost:8086/hotels/{hotelId}/rooms/add
  • Book a room in a hotel: http://localhost:8086/hotels/{hotelId}/bookings/add
  • Get all bookings in a hotel: http://localhost:8086/hotels/{hotelId}/bookings/all

Rating Service Routes

  • Fetch all ratings: http://localhost:8086/ratings/all
  • Add a rating: http://localhost:8086/ratings/add
  • Fetch ratings by user ID: http://localhost:8086/ratings/user/{userId}
  • Fetch ratings by hotel ID: http://localhost:8086/ratings/hotel/{hotelId}

Contributing

Contributions are welcome. Please create an issue or pull request if you'd like to contribute to this project.

License

This project is licensed under the MIT License.

hotel-management-microservices's People

Contributors

amanastel avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.