{"id":13602780,"url":"https://github.com/santoshshinde2012/node-boilerplate","last_synced_at":"2025-04-08T09:07:10.418Z","repository":{"id":37963600,"uuid":"345620267","full_name":"santoshshinde2012/node-boilerplate","owner":"santoshshinde2012","description":"Node Typescript Boilerplate for Microservices. Skeleton for Node.js Apps written in TypeScript (with Setup Instructions for ESLint, Prettier, and Husky)","archived":false,"fork":false,"pushed_at":"2024-10-22T06:15:01.000Z","size":15490,"stargazers_count":403,"open_issues_count":4,"forks_count":83,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T17:27:46.151Z","etag":null,"topics":["backend","backend-api","boilerplate","clean-architecture","eslint","express","husky","node","node-js","node-typescript","node-typescript-boilerplate","nodejs","prettier","skeleton","starter-kit","starter-template","typescript","typescript-boilerplate"],"latest_commit_sha":null,"homepage":"https://blog.santoshshinde.com/skeleton-for-node-js-apps-written-in-typescript-444fa1695b30","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santoshshinde2012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["santoshshinde2012"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-03-08T10:40:31.000Z","updated_at":"2024-10-25T11:24:30.000Z","dependencies_parsed_at":"2024-01-12T10:33:31.447Z","dependency_job_id":"9aaf7063-e5da-48c5-923a-6ad0254de460","html_url":"https://github.com/santoshshinde2012/node-boilerplate","commit_stats":{"total_commits":375,"total_committers":6,"mean_commits":62.5,"dds":0.3813333333333333,"last_synced_commit":"d48d4b51d12cee5038b3354abf7222af7684b8a3"},"previous_names":[],"tags_count":3,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santoshshinde2012%2Fnode-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santoshshinde2012%2Fnode-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santoshshinde2012%2Fnode-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santoshshinde2012%2Fnode-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santoshshinde2012","download_url":"https://codeload.github.com/santoshshinde2012/node-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809962,"owners_count":20999816,"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":["backend","backend-api","boilerplate","clean-architecture","eslint","express","husky","node","node-js","node-typescript","node-typescript-boilerplate","nodejs","prettier","skeleton","starter-kit","starter-template","typescript","typescript-boilerplate"],"created_at":"2024-08-01T18:01:37.732Z","updated_at":"2025-04-08T09:07:10.396Z","avatar_url":"https://github.com/santoshshinde2012.png","language":"TypeScript","funding_links":["https://github.com/sponsors/santoshshinde2012","https://www.buymeacoffee.com/santoshshin"],"categories":["clean-architecture"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003ca href=\"https://blog.santoshshinde.com/skeleton-for-node-js-apps-written-in-typescript-444fa1695b30\" target=”_blank”\u003eNode-Typescript-Boilerplate\u003c/a\u003e\u003c/h1\u003e\n\n\u003cp align=\"center\"Skeleton for Node.js applications written in TypeScript\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://sonarcloud.io/project/overview?id=santoshshinde2012_node-boilerplate\"\u003e\n     \u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=santoshshinde2012_node-boilerplate\u0026metric=alert_status\" alt=\"Quality Gate Status\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/santoshshinde2012/node-boilerplate/actions/workflows/ci.yml\" target=”_blank”\u003e\n     \u003cimg src=\"https://github.com/santoshshinde2012/node-boilerplate/actions/workflows/ci.yml/badge.svg?branch=master\" alt=\"Github action workflow status\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/santoshshinde2012/node-boilerplate/maintainability\" target=”_blank”\u003e\n    \u003cimg src=\"https://api.codeclimate.com/v1/badges/ad13a11cffa2421a8220/maintainability\" alt=\"maintainability\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/santoshshinde2012/node-boilerplate/test_coverage\" target=”_blank”\u003e\n    \u003cimg src=\"https://api.codeclimate.com/v1/badges/ad13a11cffa2421a8220/test_coverage\" alt=\"test_coverage\" /\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://snyk.io/test/github/santoshshinde2012/node-boilerplate\" target=”_blank”\u003e\n     \u003cimg src=\"https://snyk.io/test/github/santoshshinde2012/node-boilerplate/badge.svg?style=flat-square\" alt=\"\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://libraries.io/github/santoshshinde2012/node-boilerplate\" target=”_blank”\u003e\n     \u003cimg src=\"https://img.shields.io/librariesio/github/santoshshinde2012/node-boilerplate\" alt=\"\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n![Introductions](https://i.ibb.co/VHTZKB6/introductions.png)\n\n\n## Purpose\n\nOur main purpose with this Skeleton is to start server application with node js and typescript.\n\nTry it!! I am happy to hear your feedback or any kind of new features.\n\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=santoshshinde2012/node-boilerplate\u0026type=Date)](https://star-history.com/#santoshshinde2012/node-boilerplate\u0026Date)\n\n## Common Features\n\n- Quick start\n    - Simple scaffolding based on Typescript syntax\n    - Easy global environment configuration and error handling\n    - Flexible for adding new features\n\n- Contiuous Integration\n    - Added Github Action Workflow\n        - [sonarcloud.io](https://sonarcloud.io/summary/new_code?id=santoshshinde2012_node-boilerplate)\n        - [snyk.io](https://app.snyk.io/org/santoshshinde2012/project/c040efe4-a06a-451d-9b01-be0be90ee42c)\n        - [CodeQL](https://codeql.github.com/)\n        - [njsscan](https://opensecurity.in/#engineering) is a static application testing (SAST) tool that can find insecure code patterns in your node.js applications\n        - [Codeclimate](https://codeclimate.com/)\n          - \u003ca href=\"https://codeclimate.com/github/santoshshinde2012/node-boilerplate/maintainability\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/0e53f5d93de102b39641/maintainability\" /\u003e\u003c/a\u003e\n          - \u003ca href=\"https://codeclimate.com/github/santoshshinde2012/node-boilerplate/test_coverage\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/0e53f5d93de102b39641/test_coverage\" /\u003e\u003c/a\u003e\n\n- Documentation Standards\n    - Swagger documentation support and Postman collections\n    - Clear instructions in the readme file\n\n- Test Coverage Maintenance\n    - Comprehensive test coverage with eslint, prettier, and husky integration\n\n- Production Ready Setup \n    - Followed best practices for security and efficiency\n    - Integrated Winston Logger and included only necessary npm modules\n  \n## Core NPM Module\n\n- [x] `express`, `@types/express`\n- [x] `@types/node`\n- [x] `typescript`\n- [x] `dotenv`\n- [x] `cors`\n- [x] `helmet`\n- [x] `http-status-codes`\n- [x] `winston`\n\n# [Start the application](https://blog.santoshshinde.com/skeleton-for-node-js-apps-written-in-typescript-444fa1695b30)\n\n![Workflow](https://github.com/santoshshinde2012/node-boilerplate/blob/master/wiki/environment.jpg?raw=true)\n\n## Start The application in Development Mode\n\n- Clone the Application `git clone https://github.com/santoshshinde2012/node-boilerplate.git`\n- Install the dependencies `npm install`\n- Start the application `npm run dev`\n\n## Start The application in Production Mode\n\n- Install the dependencies `npm install`\n- Create the build `npm run build`\n- Start the application `npm run start`\n- Before starting make sure to update your `.env` values for your refrence just check `.env.example`\n\n\n## Project Structure\n\n| Name                         | Description                                                 |\n| ---------------------------- | ----------------------------------------------------------- |\n| **wiki/**                    | You can add project documentation and insructions file here |\n| **src/**                     | Source files                                                |\n| **src/abstractions**         | Abstarct classes and Interfaces                             |\n| **src/components**           | REST API Components \u0026 Controllers                           |\n| **src/lib**                  | Reusable utilises and library source code like a logger     |\n| **src/middleware/**          | Express Middlewares like error handler feature              |\n| **build/**                   | Compiled source files will be placed here                   |\n| **tests/**                   | Test cases will be placed here                              |\n| **tests/helpers/**           | Helpers for test cases will be placed here                  |\n| **tests/unit-tests/**        | Unit Test cases will be placed here                         |\n| **tests/integration-tests/** | API routes (Integration) Test cases will be placed here     |\n\n## Workflow\n\n![Workflow](https://github.com/santoshshinde2012/node-boilerplate/blob/master/wiki/boilerplate-components.jpg?raw=true)\n\n\n## Encryption\n\nSet the `APPLY_ENCRYPTION` environment variable to `true` to enable encryption.\n\n## Swagger API Documentation\n\nThe swagger documentation is available at the following url `${host}/docs`:  \n\n[http://localhost:8082/docs](http://localhost:8082/docs)\n## Default System Health Status API\n\n- `${host}/api/system/info` - Return the system information in response\n- `${host}/system/time` - Return the current time in response\n- `${host}/system/usage` - Return the process and system memory usage in response\n- `${host}/system/process` -  Return the process details in response\n- `${host}/system/error` - Return the error generated object in response\n\n![Swagger API Documentation](https://github.com/santoshshinde2012/node-boilerplate/blob/master/wiki/swagger-api-documentation.jpg?raw=true)\n\n### [Postman Collections](wiki/postman/node-boilerplate.postman_collection.json)\n\n## Refrences\n\n- [Skeleton for Node.js Apps written in TypeScript](https://javascript.plainenglish.io/skeleton-for-node-js-apps-written-in-typescript-444fa1695b30)\n- [Setup Eslint Prettier and Husky in Node JS Typescript Project](https://gist.github.com/santoshshinde2012/e1433327e5f7a58f98fe3e6651c4d5de)\n\n## Notes\n\n### 1. Why is my git pre-commit hook not executable by default?\n\n- Because files are not executable by default; they must be set to be executable.\n\n```\nchmod ug+x .husky/*\nchmod ug+x .git/hooks/*\n```\n\n### 2. [Production Best Practices: Security](https://expressjs.com/en/advanced/best-practice-security.html)\n\n- Don’t use deprecated or vulnerable versions of Express\n- Use TLS\n- Use Helmet\n- Use cookies securely\n- Prevent brute-force attacks against authorization\n- Ensure your dependencies are secure\n- Avoid other known vulnerabilities\n- Additional considerations\n\n### 3. Tutorials \n- [Skeleton for Node.js Apps written in TypeScript (with Setup Instructions for ESLint, Prettier, and Husky)](https://blog.santoshshinde.com/skeleton-for-node-js-apps-written-in-typescript-444fa1695b30)\n- [Global Error and Response Handler in Node JS with Express and Typescript](https://blog.santoshshinde.com/global-error-and-response-handler-in-node-js-with-express-and-typescript-913ec06d74b3)\n- [Testing with Jest in TypeScript and Node.js for Beginners](https://blog.santoshshinde.com/beginners-guide-to-testing-jest-with-node-typescript-1f46a1b87dad)\n- [Static Code Analysis for Node.js and TypeScript Project using SonarQube](https://blog.santoshshinde.com/static-code-analysis-for-node-js-and-typescript-project-using-sonarqube-8f90799add06)\n- [Visualization of Node.js Event Emitter](https://blog.santoshshinde.com/visualization-of-node-js-event-emitter-4f7c9fe3a477)\n\n\u003chr/\u003e\n\n### Connect with me on\n\u003cdiv id=\"badges\"\u003e\n  \u003ca href=\"https://twitter.com/shindesan2012\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/shindesan2012-black?style=for-the-badge\u0026logo=twitter\u0026logoColor=white\" alt=\"Twitter Badge\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.linkedin.com/in/shindesantosh/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/shindesantosh-blue?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\" alt=\"LinkedIn Badge\"/\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://blog.santoshshinde.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Blog-black?style=for-the-badge\u0026logo=medium\u0026logoColor=white\" alt=\"Medium Badge\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/santoshshin\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-black.png\" alt=\"Buy Me A Coffee\" height=\"28\" width=\"100\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantoshshinde2012%2Fnode-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantoshshinde2012%2Fnode-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantoshshinde2012%2Fnode-boilerplate/lists"}