{"id":21174460,"url":"https://github.com/vinicamposdev/advanced-node","last_synced_at":"2025-03-14T18:19:20.000Z","repository":{"id":123028243,"uuid":"386963108","full_name":"vinicamposdev/advanced-node","owner":"vinicamposdev","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-04T21:04:51.000Z","size":913,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T11:22:02.399Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinicamposdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-17T14:43:01.000Z","updated_at":"2023-03-09T00:08:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8de9af2-c340-4fde-8ad0-0c83ccf99ae2","html_url":"https://github.com/vinicamposdev/advanced-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fadvanced-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fadvanced-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fadvanced-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fadvanced-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinicamposdev","download_url":"https://codeload.github.com/vinicamposdev/advanced-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243624103,"owners_count":20321029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T16:54:42.347Z","updated_at":"2025-03-14T18:19:19.981Z","avatar_url":"https://github.com/vinicamposdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Up \u0026 Running\n\n1. Install local dependencies:\n\n```terminal\nnpm install\n```\n\n2. Tests run with sufix unit or integration depending on what will be tested:\n\n```terminal\nnpm test:unit\nnpm test:integration\n```\n\n## Scripts\n\n\n\n| Script                        | Description                                                   |\n| ----------------------------- | ------------------------------------------------------------- |\n| `npm run start`               | Run production server                                         |\n| `npm run debug`               | Run dev server                                                |\n| `npm run build`               | Generates production build                                    |\n| `npm run build:watch`         | Run unit tests in watch mode                                  |\n| `npm run up`                  | Run container with development env                            |\n| `npm run down`                | Stop containers                                               |\n| `npm run test`                | Run all tests                                                 |\n| `npm run test:unit`           | Run unit tests                                                |\n| `npm run test:integration`    | Run integration tests                                         |\n| `npm run test:staged`         | Run unit and integration tests once (great to be used in CI)  |\n| `npm run test:ci`             | Run Covererage test (great to be used in CD)                  |\n| `npm run test:coveralls`      | Run coveralls to publish coverage                             |\n\n## Tree structure\n\nThis project uses Clean Architecture and some ideas from Domain Driven Desing with Object Oriented Programming.\n\n### Layer Diagram\n\n![Layer Diagram](documentation/clean-arquitecture-layer.png)\n\n### Dependencies Diagram\n\n![Dependencies Diagram](documentation/dependencies.png)\n\n### Folder Structure\n\n```terminal\n.\n├── src\n│   ├── domain\n│   │   ├── contracts\n│   │   ├── entities\n│   │   ├── errors\n│   │   └── use-cases\n│   ├── infra\n│   │   ├── apis\n│   │   ├── crypto\n│   │   ├── http\n│   │   └── postgres\n│   ├── application\n│   │   ├── controllers\n│   │   ├── errors\n│   │   ├── helpers\n│   │   └──  validation\n│   ├── main\n│   │   ├── adapters\n│   │   ├── config\n│   │   ├── factories\n│   │   ├── routes\n│   │   └── index.ts\n├── tests\n```\n\n\n| Directory / File             | Description                                                                                                                    |\n| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| `src`                        | All source code write in TypeScript must be in this directory                                                                  |\n| `tests`                      | All test files must be in this directory                                                                                       |\n| `src/main/index.ts`         | Main entry point for initial configuration of the project. .                 |\n| `src/main/config/env.ts`     | List of Environment Variables.                                                                                                 |\n| `jest-integration-config.js` | Jest configuration file for integration tests                                                                                  |\n| `jest-unit-config.js`        | Jest configuration file for unit tests                                                                                         |\n| `jest.config.js`             | Main Jest configuration file                                                                                                   |\n\n## Important usage information\n\n### Developer workflow\n\nFrom Clean Architecture recommendations, there is a layer order to develop. The rule is:\n\n1. Domain\n - 1.1 entities\n - 1.2 contracts\n - 1.3 usecases\n - 1.4 errors\n3. Infra\n4. Application\n6. Main\n - 6.1 adapters routes\n - 6.2 factories controllers\n - 6.3 factories usecases\n - 6.4 adapters\n - 6.4 config\n\n### Environment Variables\n\nJust put all your env vars on file `src/main/config/env.ts`.\n\n### Global import\n\nAll files and dirs inside `src` directory can be imported using `@/`.\nPrefer using this way over local import (`../../`).\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinicamposdev%2Fadvanced-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinicamposdev%2Fadvanced-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinicamposdev%2Fadvanced-node/lists"}