{"id":21174463,"url":"https://github.com/vinicamposdev/clean-ts-api","last_synced_at":"2025-10-09T18:05:04.841Z","repository":{"id":123028322,"uuid":"331976051","full_name":"vinicamposdev/clean-ts-api","owner":"vinicamposdev","description":"NodeJs API using Typescript, TDD, DDD, Clean Architecture, Design Patterns, and SOLID principles","archived":false,"fork":false,"pushed_at":"2023-04-21T17:42:33.000Z","size":861,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T15:45:58.557Z","etag":null,"topics":["clean-architecture","ddd","design-patterns","mongodb","solid","tdd","typescript"],"latest_commit_sha":null,"homepage":"","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,"zenodo":null}},"created_at":"2021-01-22T14:52:05.000Z","updated_at":"2024-08-06T16:20:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"63301153-8d9d-4b8d-b2e5-f2b16c268520","html_url":"https://github.com/vinicamposdev/clean-ts-api","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/vinicamposdev/clean-ts-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fclean-ts-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fclean-ts-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fclean-ts-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fclean-ts-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinicamposdev","download_url":"https://codeload.github.com/vinicamposdev/clean-ts-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicamposdev%2Fclean-ts-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001911,"owners_count":26083225,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["clean-architecture","ddd","design-patterns","mongodb","solid","tdd","typescript"],"created_at":"2024-11-20T16:54:42.850Z","updated_at":"2025-10-09T18:05:04.824Z","avatar_url":"https://github.com/vinicamposdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/vinicamposdev/clean-ts-api.svg?branch=main)](https://travis-ci.com/vinicamposdev/clean-ts-api)\n[![Coverage Status](https://coveralls.io/repos/github/vinicamposdev/clean-ts-api/badge.svg?branch=main)](https://coveralls.io/github/vinicamposdev/clean-ts-api?branch=main)\n\n## 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```terminal\n.\n├── src\n│   ├── data\n│   │   ├── protocols\n│   │   └── usecases\n│   ├── domain\n│   │   ├── models\n│   │   └── usecases\n│   ├── infra\n│   │   ├── cryptography\n│   │   ├── db\n│   │   └── validators\n│   ├── main\n│   │   ├── adapters\n│   │   ├── config\n│   │   ├── factories\n│   │   │   └── controllers\n│   │   └── server.ts\n│   ├── presentation\n│   └── validation\n├── tests\n├── jest-integration-config.js\n├── jest-unit-config.js\n└── jest.config.js\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/server.ts`         | Main entry point for initial configuration of the project. **Do not edit this file.** Start with `src/app.ts`.                 |\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 models\n - 1.2 usecases\n2. Data\n  - 2.1 usecases\n  - 2.2 protocols\n3. Infra\n - 3.1 db repositories\n - 3.2 criptography / validators\n4. Presentation\n - 4.1 controllers\n5. Validation\n6. Main\n - 6.1 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%2Fclean-ts-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinicamposdev%2Fclean-ts-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinicamposdev%2Fclean-ts-api/lists"}