sotaaaaa / otasoft-api

🚪 API Gateway Booking Engine for Online Travel Agencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Otasoft Logo

Otasoft API - Booking engine for Online Travel Agencies

Report Bug · Request Feature

CI

About The Project

Otasoft Core is a Nest.js based booking engine for Online Travel Agencies (OTA's). Thanks to the microservice architecture, business logic is separated into different services allowing for greater scallability, extensibility, and separation of concerns. Otasoft Core can be configured in many ways to suit your business needs:

  • Databases, message brokers, authentication methods, and many more can all be configured to connect to the new or existing infrasctructure
  • Works great with both REST and GraphQL
  • Each microservice is a separate project(repo) that allows distributed development teams to work seamlessly
  • Modules are separate entities, so you can choose which services you would like to use in your system
  • Connect any modern frontend application. By default, we have Nuxt (Vue.js) and Next.js (React.js) frontends already implemented and ready to use.

Otasoft projects are and always will be open source (MIT Licence). Anyone can use and support the project. The project is currently in the development phase.

Table of Contents

Getting Started

To start developing the project please check if you have these tools installed on your machine:

Installation

  1. Clone the repo
git clone https://github.com/otasoft/otasoft-core
  1. Install all projects dependencies
sh scripts/install.sh
  1. Copy .env.example file as .env and fill it with your environment variables
cp .env.example .env
  1. Run docker-compose for all projects or for each individual project
docker-compose up
  1. Run project
yarn start:dev

When running graphql playground remember to add "request.credentials": "same-origin" line to your playground settings. This way, you will be able to use cookie based authentication in GQL playground.

Documentation

To generate REST Swagger documentation just run the following script:

yarn docs

To generate GraphQL schema and docs just run the project with:

yarn start:dev

And go to:

http://localhost:3000/graphql

or

https://api.otasoft.org/graphql -> If you have Nginx Reverse Proxy running and HTTPS certificate

Architecture

The Otasoft API acts as a gateway/proxy for the different microservices it exposes. The GraphQL resolvers and REST controllers make calls to the RabbitMQ microservices through client-server communication. All elements of the Otasoft Core system are packed into docker images and can be run as containers.

Architecture Diagram

This architecture implements the following Microservice Design Patterns:

  1. Microservice Architecture
  2. Subdomain Decomposition
  3. Externalized Configuration
  4. Remote Procedure Invocation
  5. API Gateway
  6. Database per Service
  7. CQRS

Layers

API Layer

Otasoft API built using NestJS acts as the API Layer for the architecture. It takes care of listening for client requests and calling the appropriate back-end microservice to fulfill them.

Microservice Layer

NestJS + RabbitMQ was chosen as the framework for the creation of the microservices. Each service has its own database and thanks to that, microservices can work independently. All microservices are closed for any connection except the one that is coming from API Gateway.

Persistence Layer

PostgreSQL and MySQL are used as the databases and TypeOrm is used as the Object-Relational Mapper (ORM).

Core Team

Founder -> Jakub Andrzejewski

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

You are welcome to contribute to Otasoft projects. Please see contribution tips

How to support?

Otasoft projects are and always will be Open Source.

Core team and contributors in the Otasoft ecosystem spend their free and off work time to make this project grow. If you would like to support us you can do so by:

  • contributing - it does not matter whether it is writing code, creating designs, or sharing knowledge in our e-books and pdfs. Any help is always welcome!
  • evangelizing - share a good news about Otasoft projects in social media or during technology conferences ;)

License

Distributed under the MIT licensed. See LICENSE for more information.

About

🚪 API Gateway Booking Engine for Online Travel Agencies

License:MIT License


Languages

Language:TypeScript 96.6%Language:Shell 1.5%Language:JavaScript 1.2%Language:Dockerfile 0.6%