All Projects → santoshshinde2012 → node-boilerplate

santoshshinde2012 / node-boilerplate

Licence: Apache-2.0 License
Node Typescript Boilerplate for Microservices. Skeleton for Node.js Apps written in TypeScript (with Setup Instructions for ESLint, Prettier, and Husky)

Programming Languages

typescript
32286 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-boilerplate

Node Typescript Boilerplate
Minimalistic project template to jump start a Node.js back-end application in TypeScript. ESLint, Jest and type definitions included.
Stars: ✭ 1,061 (+1053.26%)
Mutual labels:  eslint, backend, prettier, starter-template, node-js
nest-boilerplate
Nest.js boilerplate with CircleCI, Commitizen, Commitlint, Docker-Compose, ESLint, GitHub Actions, Husky, Lint-staged, OpenAPI, Prettier, PostGreSQL, Travis CI, TypeORM
Stars: ✭ 16 (-82.61%)
Mutual labels:  eslint, prettier, husky
Serverless Typescript Starter
🗄🙅‍♀️ Deploy your next serverless JavaScript function in seconds
Stars: ✭ 653 (+609.78%)
Mutual labels:  eslint, prettier, starter-kit
Vue Skeleton Mvp
VueJs, Vuetify, Vue Router and Vuex skeleton MVP written on JavaScript using async/await built to work with API REST skeleton: https://github.com/davellanedam/node-express-mongodb-jwt-rest-api-skeleton
Stars: ✭ 406 (+341.3%)
Mutual labels:  eslint, skeleton, prettier
generator-bunny
🐰 Jumpstart node module, like a bunny!
Stars: ✭ 13 (-85.87%)
Mutual labels:  eslint, prettier, starter-kit
React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (+148.91%)
Mutual labels:  eslint, prettier, starter-kit
Nodejs Api Boilerplate
A boilerplate for kickstart your nodejs api project with JWT Auth and some new Techs :)
Stars: ✭ 364 (+295.65%)
Mutual labels:  eslint, prettier, node-js
Next Js Blog Boilerplate
🚀 Nextjs Blog Boilerplate is starter code for your blog based on Next framework. ⚡️ Made with Nextjs, TypeScript, ESLint, Prettier, PostCSS, Tailwind CSS.
Stars: ✭ 134 (+45.65%)
Mutual labels:  eslint, starter-template, starter-kit
example-typescript-package
Example TypeScript Package ready to be published on npm & Tutorial / Instruction / Workflow for 2021
Stars: ✭ 71 (-22.83%)
Mutual labels:  starter-template, starter-kit, typescript-boilerplate
website
Personal website and blog built with Next.js, Preact, MDX, Tailwind CSS and hosted on Vercel.
Stars: ✭ 17 (-81.52%)
Mutual labels:  eslint, prettier, husky
react16-seed-with-apollo-graphql-scss-router4-ssr-tests-eslint-prettier-docker-webpack3-hot
Seed to create your own project using React with Apollo GraphQL client
Stars: ✭ 19 (-79.35%)
Mutual labels:  eslint, prettier
nextjs-baseweb
Slightly opinionated scaffold of Next.js and Base Web.
Stars: ✭ 46 (-50%)
Mutual labels:  eslint, prettier
eslint-config-adjunct
A reasonable collection of plugins to use alongside your main esLint configuration
Stars: ✭ 39 (-57.61%)
Mutual labels:  eslint, prettier
react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (-40.22%)
Mutual labels:  eslint, prettier
KotlinMvpTemplateGenerator
Android Studio template for Kotlin with MVP + Dagger2 + Retrofit2
Stars: ✭ 65 (-29.35%)
Mutual labels:  starter-template, clean-architecture
cloudflare-worker-app-kit
☁✨ A handy set of tools for creating a Cloudflare Worker app.
Stars: ✭ 75 (-18.48%)
Mutual labels:  eslint, starter-kit
node-backend-template
A template for NodeJS backend projects
Stars: ✭ 19 (-79.35%)
Mutual labels:  eslint, prettier
vite-react-ts-tailwind-firebase-starter
Starter using Vite + React + TypeScript + Tailwind CSS. And already set up Firebase(v9), Prettier and ESLint.
Stars: ✭ 108 (+17.39%)
Mutual labels:  eslint, prettier
OSAPI
👋 OSAPI 是依靠通用性后台管理平台搭建的API管理平台,基于 vue3、Nestjs 技术栈实现,包含 RBAC 角色权限模块、数据展示、编辑等模块。
Stars: ✭ 32 (-65.22%)
Mutual labels:  eslint, prettier
gatsby-starter-antoine
My opinionated Gatsby.js starter
Stars: ✭ 17 (-81.52%)
Mutual labels:  eslint, prettier

Node-Typescript-Boilerplate

Skeleton for Node.js applications written in TypeScript

Purpose

Our main purpose with this Skeleton is to start server application with node js and typescript.

Try it!! I am happy to hear your feedback or any kind of new features.

Common Features

  • Quick start
  • Integrated eslint, prettier and husky
  • Common Error Handler
  • Common Response Handler
  • Simple and Standard scaffolding
  • Followed SOLID Principles
  • Based on Typescript Syntax
  • Simple Enviroment Configuration
  • Global Enviroment Object
  • 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
  • Unit & Integration Test Cases

Core NPM Module

  • express, @types/express
  • @types/node
  • typescript
  • dotenv
  • cors
  • helmet
  • http-status-codes
  • winston, @types/winston

Start The application in Development Mode

  • Clone the Application git clone https://github.com/santoshshinde2012/node-boilerplate.git
  • Install the dependencies npm install
  • Start the application npm start

Start The application in Production Mode

  • Install the dependencies npm install
  • Create the build npm run build
  • Start the application npm run start:production
  • Before starting make sure to creat prod environment .env.prod file

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/environments Application Environments Handling utility
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

Workflow

Encryption

Set the APPLY_ENCRYPTION environment variable to true to enable encryption.

Global Environment Object

You can directly access the environment attributes in any component/file using global environment object. For more details please check file src/global.ts.

Example

To access the applyEncryption attribute from Envionment class to Response Handler, write environment.applyEncryption;

Default System Health Status API

  • ${host}/api/status/system - Return the system information in response
  • ${host}/api/status/time - Return the current time in response
  • ${host}/api/status/usage - Return the process and system memory usage in response
  • ${host}/api/status/process - Return the process details in response
  • ${host}/api/status/error - Return the error generated object in response

Refrences

Notes

1. Why is my git pre-commit hook not executable by default?

  • Because files are not executable by default; they must be set to be executable.
chmod ug+x .husky/*
chmod ug+x .git/hooks/*

2. Production Best Practices: Security

  • Don’t use deprecated or vulnerable versions of Express
  • Use TLS
  • Use Helmet
  • Use cookies securely
  • Prevent brute-force attacks against authorization
  • Ensure your dependencies are secure
  • Avoid other known vulnerabilities
  • Additional considerations

Please connect with me on Twitter @shindesan2012 & https://blog.santoshshinde.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].