This project structure is inspired in clean architecture code structure, by Uncle Bob. The main purpose of clean architecture is creating a strong project structure, splitting all the application in layers. The best advantages of using it, is create a application independent of any frameworks, tool, database or technology, being easy to handle the code, create a new features, fix any issue, or change some framework, thanks to the adapters and ports.
root
โโโ .github - Github setup files
โ โโโ assets
โ โโโ workflow
โโโ src - Application main code
โ โโโ app - Composition layer, entry point code
โ โ โโโ routes - routes files
โ โ โโโ setup - server config (middlewares, cors, body-parser)
โ โ โโโ builds - classes instances
โ โ โโโ adapters - components adapters
โ โโโ config - Some global config files (.env, path alias, logger)
โ โโโ domain - Business rules definition
โ โ โโโ entities
โ โ โโโ usecases
โ โโโ infra - External frameworks and libs implementation
โ โโโ presentation - External api communication layer (controllers, presenters, validators)
โ โโโ useCases - Usecases implementation
โโโโ tests - Components tests
โโโ e2e
โโโ unit
All controllers unexpected errors are stored in the database, becoming available for future analysis and corrections. Having a console available, the errors and the requests data can be logged on console, for faster viewing while running the application.
To run this project locally, you will have to install Nodejs and PostgreSQL on the machine, or run everything with Docker. After run the project, go to .env.example file, on project root, and rename it to .env, filling all the properties in the file with your information.
git clone https://github.com/gabriellopes00/help-women.git
or
git clone [email protected]:gabriellopes00/help-women.git
docker-compose up
npm install
npm run build
npm run start
- All โฏ
yarn test
- Coverage โฏ
yarn test:ci
- Unit โฏ
yarn test:unit
- e2e โฏ
yarn test:e2e
- Lint(eslint) โฏ
yarn lint
- Style(prettier) โฏ
yarn style
Following the standard of the Conventional Commits.
- feature commits(amount) โฏ
git shortlog -s --grep feat
- test commits(amount) โฏ
git shortlog -s --grep test
- refactor commits(amount) โฏ
git shortlog -s --grep refactor
- chore commits(amount) โฏ
git shortlog -s --grep chore
- docs commits(amount) โฏ
git shortlog -s --grep docs
- build commits(amount) โฏ
git shortlog -s --grep build