This is the API for Tormentum app.
The API has a 3 layer architecture:
- Application Layer: Has the files that controls the application. Routes, Controllers and I/O objects come here.
- Domain Layer: Where are all the business rules. Here are the Use Cases, Entities and Repositories.
- Infra Layer: Connection with external services. Database, External APIs and Server configs come here.
Before running any command you need to install packages using:
$ yarn install
To set environment variables and to be able to run the project, you must run first:
$ yarn setup
This will run scripts/setup.sh
script and set .env
file.
Tests use MongoDB memory server. So, it's simple to run, you just need:
$ yarn test
To run the API locally, you have first to start MongoDB through Docker:
$ docker compose up -d mongo
Then, you can start the app:
$ yarn start