- BFF Pattern
- Modular Monolith
- GraphQL
- Filters
- Dependency Injection
- Swagger
- Docker
- Docker compose
- REDIS Queue
- Observability
- Calling another APIs
This is architecture design journey
The construction of the application
Node version used is v16.20.0
, so in your terminal run the follow:
npm install
or yarn
To start the project
npm run start:dev
Once the application is running you can visit http://localhost:3000/api to see the Swagger interface.
See here for more information.
Once the application is running you can visit http://localhost:3000/graphql to see the GraphQL Playground interface.
See here for more information.
Create
mutation createTest {
create(
data: {
name: "test"
age: 1
breed: "raca"
photo: "https://example-image.jpg"
}
) {
name
age
breed
photo
}
}
Get
query test {
findOne(id: 0) {
name,
age,
photo
}
}
Generate image
docker build -t bff-example-image .
Run container
docker run --name bff-example-container -dp 127.0.0.1:3000:3000 bff-example-image
Up
docker-compose up
Down
docker-compose down