Node boilerplate with secure code analysis and quality checks
-
Quick start
- Simple scaffolding based on Typescript syntax
- Easy global environment configuration and error handling
- Flexible for adding new features
-
Continuous Integration
- Added Github Action Workflow
- sonarcloud.io
- snyk.io
- CodeQL
- njsscan is a static application testing (SAST) tool that can find insecure code patterns in your node.js applications
- Codeclimate
- Added Github Action Workflow
-
Documentation Standards
- Swagger documentation support and Postman collections
- Clear instructions in the readme file
-
Test Coverage Maintenance
- Comprehensive test coverage with eslint, prettier, and husky integration
-
Production Ready Setup
- Followed best practices for security and efficiency
- Integrated Winston Logger and included only necessary npm modules
-
express,@types/express -
@types/node -
typescript -
dotenv -
cors -
helmet -
http-status-codes -
winston -
sequelize,pg,pg-hstore
- Clone the Application
git clone https://github.com/santoshshinde2012/node-ts-sequelize-pg-boilerplate.git - Install the dependencies
npm install - Start the application
npm run dev - To run the test cases
npm run test
- To run this app on a local machine, make sure the PostgreSQL database is set up and running. If not, you can use Docker and execute the following command to run the database:
npm run db:up
- Install the dependencies
npm install - Create the build
npm run build - Start the application
npm run start - Before starting make sure to update your
.envvalues for your refrence just check.env.example
| Name | Description |
|---|---|
| docker/ | Docker related config for postgresql db |
| wiki/ | You can add project documentation and insructions file here |
| src/ | Source files |
| src/abstractions | Abstarct classes and Interfaces |
| src/components | REST API Components & Controllers |
| src/database | Database config and models |
| src/lib | Reusable utilises and library source code like a logger |
| src/middleware/ | Express Middlewares like error handler feature |
| build/ | Compiled source files will be placed here |
| tests/ | Test cases will be placed here |
| tests/helpers/ | Helpers for test cases will be placed here |
| tests/unit-tests/ | Unit Test cases will be placed here |
| tests/integration-tests/ | API routes (Integration) Test cases will be placed here |
The Postman Collections is available in public workspace.
The swagger documentation is available at the following url ${host}/docs:
- How to Use Sequelize with TypeScript, Node.js, and PostgreSQL
- Skeleton for Node.js Apps written in TypeScript (with Setup Instructions for ESLint, Prettier, and Husky)
- Global Error and Response Handler in Node JS with Express and Typescript
- Testing with Jest in TypeScript and Node.js for Beginners
- Static Code Analysis for Node.js and TypeScript Project using SonarQube
- Visualization of Node.js Event Emitter
- NodeSeQ Demo

