/orderly-api

Project to manage an online cafeteria. Designed with DDD, Architectural Concepts. Powered by node.js, typescript and nest.js.

Primary LanguageTypeScript

Orderly

Orderly is a cutting-edge web system designed to streamline operations for restaurant and food businesses (RMS). It draws from the principles of Domain-Driven Design (DDD) and Architectures to ensure scalability, maintainability, and a robust integration capability.


GitHub


How to run the application

Running on docker

# up with build
$ docker compose up --build

# up with detached mode 
$ docker compose up -d

# down the app
$ docker compose down

Running on kubernetes

# create namespace orderly
$ kubectl apply -f k8s/namespaces.yaml

# set orderly namespace to default
$ kubectl config set-context --current --namespace=orderly

# message-broker
$ kubectl apply -f k8s/message-broker/

# database
$ kubectl apply -f k8s/db/

# api
$ kubectl apply -f k8s/api/

# api-gateway
$ kubectl apply -f k8s/api-gateway/

# proxy
$ kubectl apply -f k8s/proxy/

# to watch all pods running
$ watch -n1 kubectl get pods

Domain Driven Design

Context Map

DDD Context Map


Use cases

- Check-in flow

Create order Usecase

- Create order-payment flow

Create order Usecase

- approve/cancel payment and prepare/withdrawn orders

Pay order Usecase

- Complete flow

Prepare order Usecase


Kubernetes Diagram - Infrastructure

Kubernetes diagram



Cloud Diagram - Infrastructure

Kubernetes diagram

Kubernetes diagram

Kubernetes diagram

Kubernetes diagram


Clean Architecture

Legend


Resources

- Message Broker

Legend

- Events

Legend

- Entity Relationship Diagram - Database

Entity Relationship Diagram