Description: A simple RESTful API for booking and reservation hotel rooms.
A Golang web-based restful api hotel reservation system, that acts a broker between hotels and customers.
Application architecture:
The architecture used in this program is multitenancy, for each new hotel(tenant), a new separate database is created, all of its tables are separate, and the information of each hotel(tenant) is stored separately in its own database.
This pattern uses a multi-tenant application with many databases, all being single-tenant databases. A new database is provisioned for each new tenant.
- PostgreSql
- Rabbitmq
- Redis
- Minio
- Docker
- DockerCompose
To run this program, you can easily use DockerCompose, all required dependencies such as Postgres, Redis, etc. are listed in the
docker-compose file.
First of all, install Docker and Docker Compose on your machine and after run the docer-compose up -d
command, the program is executed, the default database It is made and also all the seeds are done.
If for any reason you don't want to run the program with Docker and just want to run and compile the code, follow the steps below:
- install postgresql on your machine
- install rabbitmq on your machine
- install redis on your machine
- install minio on your machine
- go to resorecess directory and override the config.yml with following steps:
- add your postgres port and ip address
- add your redis client port and ip address
- add your rabbitmq address
- add your minio conenction
- in the last step, go to the cmd directory and run the
make build
command to compile, you can also run thego run ./cmd/main.go
command to execute application in application's root directory.