A starter boilerplate for scalable nodejs application.

Overview

NodeJS-Boilerplate-with-Prisma

This boilerplate is a good to go start for any kind of project. Its follows all standard practices, secure and it is very much scalable.

Features

  • Database: any database is configurable with Prisma/ORM
  • Validation: request data validation using Joi
  • Locales: support multi-language out of box using i18n
  • Pathing: absolute pathing for clean coding experience (module-alias)
  • Process management: advanced production process management using PM2
  • Error handling: centralized error handling mechanism
  • Dependency management: with Npm
  • CORS: Cross-Origin Resource-Sharing enabled using cors
  • Security: set security HTTP headers using helmet
  • Santizing: sanitize request data against xss and query injection
  • Code quality: with eslint
  • Git hooks: with husky
  • Linting: with ESLint and Prettier
  • Editor config: consistent editor configuration using EditorConfig

Installation

  • clone the project
  • npm install
  • change .env with your database credentials, currently it is set for mysql. if you intent to your other db, lets say postgres, you need to change provider in schema.prisma file as well.
  • npx prisma migrate dev
  • nodemon src/app.js

Project Structure

src\
 |--controllers\    # Route controllers (controller layer)
 |--middlewares\    # Custom express middlewares
 |--routes\         # Routes
 |--services\       # Business logic (service layer)
 |--locales\        # Multilanguage translations
 |--prisma\         # Prisma schema, migrations and configurations (db layer)
 |--utils\          # Utility classes and functions
 |--validators\     # Request data validation schemas
 |--app.js          # Express app

Linting

Linting:

# run ESLint
npm lint

# fix ESLint errors
npm lint:fix

# run prettier
npm prettier

# fix prettier errors
npm prettier:fix

Contributing

Contributions are more than welcome!

You might also like...

This project is based on my nodejs starter kit. Simple CRUD project.

nodejs-crud-project Author - Akhil Sharma This project uses the nodeJS-starter project on my github. Just a demo to show you could build any project w

Dec 16, 2022

Simple shopping cart prototype which shows how React components and Redux can be used to build a friendly user experience with instant visual updates and scalable code in e-commerce applications.

Simple shopping cart prototype which shows how React components and Redux can be used to build a friendly user experience with instant visual updates and scalable code in e-commerce applications.

This simple shopping cart prototype shows how React components and Redux can be used to build a friendly user experience with instant visual updates a

Feb 8, 2022

Fast, deep, scalable object cloning for JavaScript

A new approach to deep cloning. A simple library with no external dependencies gives you the opportunity to customize the cloning strategy.

Mar 10, 2022

Inferrd makes Machine Learning deployment easy and scalable.

Inferrd makes Machine Learning deployment easy and scalable.

Introduction ML Deployment made simple, scalable and collaborative The new open-source standard to deploy, monitor and secure Machine Learning service

Dec 16, 2022

Set up and build a Node.js REST API using Typescript, Express, Mongoose with a maintainable and scalable structure.

Introduction Create a maintainable and scalable Node.js REST API with TypeScript, Express and Mongoose. The project structure is based on MVC and foll

Nov 18, 2022

Toolkit for building scalable web applications with TypeScript, React, Redux and Apollo-Client

Toolkit for building scalable web applications with TypeScript, React, Redux and Apollo-Client

TsToolbox Toolkit for building scalable web applications with TypeScript, React, Redux and Apollo-Client (inspired by ReKit) ⚠ ⚠ ⚠ Work in Progress ⚠

Apr 14, 2022

A socially-scalable music NFT indexer.

neume-network-core installation Prerequsites neume-network-core is dependent on an Ethereum full node JSON-RPC interface. Consider running your own no

Nov 17, 2022

Create a maintainable and scalable Node.js GraphQL API with TypeScript, Express, Mongoose and Apollo Server.

Set up and build a Node.js GraphQL API using Typescript, Express, Mongoose with a maintainable and scalable structure

Nov 4, 2022

Scalable Backend Framework for Node.Js

Scalable Backend Framework for Node.Js

Promethium A Backend Web Framework for TypeScript/Node.js This project was generated using Nx. 🔎 Smart, Fast and Extensible Build System Adding capab

Nov 4, 2022
Owner
Kaleem Qasim
I like to solve trickiest problems in a most efficient way as possible in cutting edge technologies, using monolith/microservices.
Kaleem Qasim
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A boilerplate for ExpressJs projects configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses Mongodb.

ExpressJs-Boilerplate An ExpressJs boilerplate configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses

Hammas bin Farrukh 4 Mar 8, 2023
Boilerplate and Starter for Next JS 12+

Boilerplate and Starter for Next JS 12+ ?? Made with developer experience first: How to Use npx create-next-app --example https://github.com/Strapazz

Getúlio Strapazzon 5 May 18, 2022
Boilerplate starter template for a new TON blockchain project - FunC contracts, JS tests, compilation and deployment scripts

TON Starter Template - Contracts Starter template for a new TON project - FunC contracts, JS tests, compilation and deployment scripts Overview This p

TON DeFi Ecosystem 44 Dec 17, 2022
NFT Game Starter Project: https://github.com/buildspace/buildspace-nft-game-starter

Running React on Repl.it React is a popular JavaScript library for building user interfaces. Vite is a blazing fast frontend build tool that includes

Zahuis 2 Feb 11, 2022
Starter-gatsby-blog - Gatsby starter for a Contentful project from the community.

Contentful Gatsby Starter Blog Create a Gatsby blog powered by Contentful. Static sites are scalable, secure and have very little required maintenance

Priya Chakraborty 0 Jan 29, 2022
Node-cli-starter - Basic starter kit for building Node CLI applications with TypeScript.

node-cli-starter Minimal starter kit for building Node CLI applications with TypeScript. Getting Started To get started clone repo locally and run npm

Cory Rylan 7 May 17, 2022
GitHub starter project link: https://github.com/buildspace/waveportal-starter-project

Running React on Repl.it React is a popular JavaScript library for building user interfaces. Vite is a blazing fast frontend build tool that includes

MD Rafi Uddin 0 Jun 5, 2022
This is a full-stack exercise tracker web application built using the MERN (MongoDB, ExpressJS, ReactJS, NodeJS) stack. You can easily track your exercises with this Full-Stack Web Application.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

WMouton 2 Dec 25, 2021