Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated readme file #583

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 53 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,34 @@ Try it!! I am happy to hear your feedback or any kind of new features.
## Common Features

- Quick start
- Integrated eslint, prettier and husky
- Global Error & Response Handler
- Simple and Standard scaffolding
- Based on Typescript Syntax
- Simple & Global Enviroment Configuration
- Request/Response Encryption & Decryption Implementation
- Easily Add new feature
- Integrated winston Logger
- Production Ready Skeleton
- Follwed Production Ready Best Practices: Security
- Added only used npm modules
- Swagger Documentation Support
- Unit & Integration Test Cases
- Simple and Standard scaffolding
- Based on Typescript Syntax
- Simple & Global Enviroment Configuration
- Global Error & Response Handler
- Easily Add new feature
- Request/Response Encryption & Decryption Implementation

- Contiuous Integration
- Added Github Action Workflow
- [sonarcloud.io](https://sonarcloud.io/summary/new_code?id=santoshshinde2012_node-boilerplate)
- [snyk.io](https://app.snyk.io/org/santoshshinde2012/project/c040efe4-a06a-451d-9b01-be0be90ee42c)
- [CodeQL](https://codeql.github.com/)
- [njsscan](https://opensecurity.in/#engineering) is a static application testing (SAST) tool that can find insecure code patterns in your node.js applications

- Documentation Standards
- Swagger Documentation Support
- Postman Collections
- Readme with instructions

- Test Coverage Maintenance
- Integrated eslint, prettier and husky
- Added Unit Test cases and Intgration Test Cases
- 80% + Code Coverage

- Prodcution Ready Setup
- Follwed Production Ready Best Practices: Security
- Integrated winston Logger
- Added only used npm modules

## Core NPM Module

Expand Down Expand Up @@ -61,19 +76,19 @@ Try it!! I am happy to hear your feedback or any kind of new features.

## Project Structure

| Name | Description |
| --------------------------------- | ----------- |
| **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/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|
| Name | Description |
| ---------------------------- | ----------------------------------------------------------- |
| **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/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 |

## Workflow

Expand Down Expand Up @@ -137,4 +152,15 @@ chmod ug+x .git/hooks/*

<hr/>

### Please connect with me on Twitter [@shindesan2012](https://twitter.com/shindesan2012) & [https://blog.santoshshinde.com](https://blog.santoshshinde.com/)
### Connect with me on
<div id="badges">
<a href="https://twitter.com/shindesan2012">
<img src="https://img.shields.io/badge/shindesan2012-black?style=for-the-badge&logo=twitter&logoColor=white" alt="Twitter Badge"/>
</a>
<a href="https://www.linkedin.com/in/shindesantosh/">
<img src="https://img.shields.io/badge/shindesantosh-blue?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn Badge"/>
</a>
<a href="https://blog.santoshshinde.com/">
<img src="https://img.shields.io/badge/Blog-black?style=for-the-badge&logo=medium&logoColor=white" alt="Medium Badge"/>
</a>
</div>
42 changes: 21 additions & 21 deletions test-report.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<testExecutions version="1">
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/unit-tests/dummy.spec.ts">
<testCase name="Dummy Test Cases Verify Jest is working" duration="3"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/unit-tests/lib/logger.spec.ts">
<testCase name="Logger Lib should create a new log directory if one doesn&apos;t already exist" duration="5"/>
<testCase name="Dummy Test Cases Verify Jest is working" duration="2"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/unit-tests/lib/crypto.spec.ts">
<testCase name="Crypto Lib (Encryption/Decryption) Testing for text" duration="5"/>
<testCase name="Crypto Lib (Encryption/Decryption) Testing for array" duration="2"/>
<testCase name="Crypto Lib (Encryption/Decryption) Testing for object" duration="2"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/unit-tests/middleware/error-handler.spec.ts">
<testCase name="ErrorHandler middleware with 0 status code" duration="6"/>
<testCase name="ErrorHandler middleware with 200 status code" duration="1"/>
<testCase name="ErrorHandler middleware with 200 status code" duration="0"/>
<testCase name="ErrorHandler middleware with 200 status code and updated env variables" duration="2"/>
<testCase name="Crypto Lib (Encryption/Decryption) Testing for object" duration="7"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/unit-tests/components/SystemStatusController.spec.ts">
<testCase name="System Status Controller test getError method" duration="2"/>
<testCase name="System Status Controller test getSystemInfo method" duration="4"/>
<testCase name="System Status Controller test getSystemInfo method with updated env variables" duration="2"/>
<testCase name="System Status Controller test getSystemInfo method" duration="3"/>
<testCase name="System Status Controller test getSystemInfo method with updated env variables" duration="1"/>
<testCase name="System Status Controller test getSystemInfo method with exception" duration="1"/>
<testCase name="System Status Controller test getServerTime method" duration="1"/>
<testCase name="System Status Controller test getServerTime method with exception" duration="1"/>
<testCase name="System Status Controller test getResourceUsage method" duration="1"/>
<testCase name="System Status Controller test getResourceUsage method with exception" duration="1"/>
<testCase name="System Status Controller test getServerTime method" duration="0"/>
<testCase name="System Status Controller test getServerTime method with exception" duration="0"/>
<testCase name="System Status Controller test getResourceUsage method" duration="0"/>
<testCase name="System Status Controller test getResourceUsage method with exception" duration="0"/>
<testCase name="System Status Controller test getProcessInfo method" duration="1"/>
<testCase name="System Status Controller test getProcessInfo method with exception" duration="0"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/unit-tests/lib/logger.spec.ts">
<testCase name="Logger Lib should create a new log directory if one doesn&apos;t already exist" duration="8"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/unit-tests/middleware/error-handler.spec.ts">
<testCase name="ErrorHandler middleware with 0 status code" duration="4"/>
<testCase name="ErrorHandler middleware with 200 status code" duration="1"/>
<testCase name="ErrorHandler middleware with 200 status code" duration="0"/>
<testCase name="ErrorHandler middleware with 200 status code and updated env variables" duration="2"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/integration-tests/app.integration.spec.ts">
<testCase name="status integration tests can get default route success" duration="15"/>
<testCase name="status integration tests can get default route success" duration="18"/>
<testCase name="status integration tests can get default web route success" duration="2"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/node-boilerplate/tests/integration-tests/status.integration.spec.ts">
<testCase name="status integration tests can get server time" duration="16"/>
<testCase name="status integration tests can get server system info" duration="9"/>
<testCase name="status integration tests can get server system usage" duration="2"/>
<testCase name="status integration tests can get server time" duration="21"/>
<testCase name="status integration tests can get server system info" duration="4"/>
<testCase name="status integration tests can get server system usage" duration="3"/>
<testCase name="status integration tests can get server system process info" duration="1"/>
<testCase name="status integration tests should get the error" duration="4"/>
</file>
Expand Down