A GraphQL API consumed in two applications, one mobile and the other web. In which the main purpose is to control the cases of Aedes aegypti mosquitoes in the city of Bagé in Rio Grande do Sul, Brazil.
TypeScript
Description
A GraphQL API consumed in two applications, one mobile and the other web. In which the main purpose is to control the cases of Aedes aegypti mosquitoes in the city of Bagé in Rio Grande do Sul, Brazil.
I know that folder structure is not important for architectural reasons. But in this case will be easier to understand the architecture.
Architecture and folder structure
Following clean architecture principles, developing the layers separately from each other.
Domain: The "domain" layer.
Application: The "application" layer.
Infra: The "infrastructure" layer.
Controllers: The "presentation" layer.
Installation
$ nvm install 18.15
$ nvm use
$ npm install
Running the app
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Test
# unit tests
$ npm run test# e2e tests1
$ npm run test:e2e
# test coverage
$ npm run test:cov
Migrations && seeds
# Generates a new migration based on changes detected in your Prisma schema and applies it to the database
$ npm run prisma:migrate:dev
# Reset all the database migrations based on schema and then run all migrations
$ npm run prisma:migrate:reset
# Run all seeds
$ npm run prisma:seed
# Run all migrations and seeds, verifying schema again
$ npm run reset-db