{"id":15400336,"url":"https://github.com/rafaelgss/node-architeture-project-design","last_synced_at":"2025-04-16T02:25:10.121Z","repository":{"id":135256322,"uuid":"175900038","full_name":"RafaelGSS/node-architeture-project-design","owner":"RafaelGSS","description":":bookmark_tabs: A Node.js service structure  - Package CLI (napd)","archived":false,"fork":false,"pushed_at":"2019-08-12T19:13:04.000Z","size":208,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T04:11:18.174Z","etag":null,"topics":["nodejs-api-boilerplate","nodejs-boilerplate","nodejs-starterpack","starter-kit"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RafaelGSS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-03-15T22:39:13.000Z","updated_at":"2024-09-26T21:32:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b7c4953-d5b5-4f4e-b533-26f50b028ccc","html_url":"https://github.com/RafaelGSS/node-architeture-project-design","commit_stats":{"total_commits":28,"total_committers":3,"mean_commits":9.333333333333334,"dds":0.1428571428571429,"last_synced_commit":"7dba02db92427208860ba5a770704dce0ab64bdd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafaelGSS%2Fnode-architeture-project-design","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafaelGSS%2Fnode-architeture-project-design/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafaelGSS%2Fnode-architeture-project-design/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafaelGSS%2Fnode-architeture-project-design/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RafaelGSS","download_url":"https://codeload.github.com/RafaelGSS/node-architeture-project-design/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183948,"owners_count":21226275,"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":["nodejs-api-boilerplate","nodejs-boilerplate","nodejs-starterpack","starter-kit"],"created_at":"2024-10-01T15:53:35.250Z","updated_at":"2025-04-16T02:25:10.089Z","avatar_url":"https://github.com/RafaelGSS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeJS API Structure\nThe project structure for helping new api using any http server ( Using express for these boilerplate ) \n\n## Install from CLI\n\n[HERE](https://github.com/RafaelGSS/napd)\n\n\n## Structure\n\n```\nbin/\nconfig/\n  routes/\n/src/\n|- data/\n|-- connections/\n|-- repositories/\n|-- structures/    \n|- domain/\n|- handlers/\n|- middlewares/\n|- routes/\n|- services/\n|- utils/\n/tests/\n```\n## Concept of Structure\n\nThis structure, is based on some designs like **DDD**, **Middleware Based NodeJS** and the folders has the follow objectives:\n\n__bin/__ -  Binaries folder, can be used for routines postinstall of npm.\n\n__config/__ -  All of the configurations autoload of the project, like database variables.\n\n__config/routes/__ -  Autoload of routes for less dependency.\n\n__src/data/__ -  Contains the files for manipulating the connection ( repositories, structures, connection )\n\n__src/domain/__ -  Following the concept of DDD, the domain can be a domain of your application.\n\n__src/handlers/__ -  Following the concept of Middleware Based, the handlers manipulate the requests and delegate to your services.\n\n__src/middlewares/__ -  Middleware of routes, can be Auth, Roles...\n\n__src/routes/__ -  All routes for your project ( Obs: The route need has the name like *.route.js inside folder __routes/__ ).\n\n__src/services/__ -  Services for your application.\n\n__src/utils/__ -  Utils for your application, parser, and any util.\n\n__tests/__ -  Tests, actually using JEST.\n\n\n## Tests\n\n```sh\nnpm install\nnpm test\n```\n\n## Dependencies\n\n- [dotenv](https://ghub.io/dotenv): Loads environment variables from .env file\n- [express](https://ghub.io/express): Fast, unopinionated, minimalist web framework\n- [express-rescue](https://ghub.io/express-rescue): A wrapper for async functions which makes sure all async errors are passed to your errors handler\n- [filter-files](https://ghub.io/filter-files): Recursively read directories and return a list of files, filtered to have only the files for which the (optional) filter function returns `true`. Sync and async.\n- [is-directory](https://ghub.io/is-directory): Returns true if a filepath exists on the file system and it\u0026#39;s directory.\n- [lodash](https://ghub.io/lodash): Lodash modular utilities.\n- [mongodb](https://ghub.io/mongodb): The official MongoDB driver for Node.js\n\n## Dev Dependencies\n\n- [@types/dotenv](https://ghub.io/@types/dotenv): TypeScript definitions for dotenv\n- [@types/express](https://ghub.io/@types/express): TypeScript definitions for Express\n- [@types/node](https://ghub.io/@types/node): TypeScript definitions for Node.js\n- [chai](https://ghub.io/chai): BDD/TDD assertion library for node.js and the browser. Test framework agnostic.\n- [mocha](https://ghub.io/mocha): simple, flexible, fun test framework\n- [nodemon](https://ghub.io/nodemon): Simple monitor script for use during development of a node.js app.\n- [tslint](https://ghub.io/tslint): An extensible static analysis linter for the TypeScript language\n- [typescript](https://ghub.io/typescript): TypeScript is a language for application scale JavaScript development\n\n## License\n\nMIT\n\n## CONTRIBUITING\n\nPlease read [CONTRIBUITING.md](CONTRIBUITING.md)\n\n## TODO\n\nPlease read [TODO](TODO.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelgss%2Fnode-architeture-project-design","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafaelgss%2Fnode-architeture-project-design","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelgss%2Fnode-architeture-project-design/lists"}