Skip to content

Comprehensive Node.js starter kit powered by MVC design and bunch of notes! (Under development!)

License

Notifications You must be signed in to change notification settings

femresirvan/node.js-starter-template

Repository files navigation

node.js-starter-template

Turkçe (Hazırlanıyor...) - English

Be aware of that is incomplete documentation!

Table of Contents

🎀 Introduction

Comprehensive Node.js starter kit powered by MVC design and bunch of notes!

Features

  • ...
  • ..
  • ..

🛣️ Roadmap

  • Install dependencies, configure eslint.js etc.
  • Complete express.js configurations.
  • Install swagger-ui-express.
  • Complete mongoose.js configurations.
  • Make email auth and user schemas with passport-jwt passport-local.
  • Make google auth with passport-google-oauth2
  • Extend with swagger.
  • Implement test environment.
  • And many more..

🏢 Project Structure

This will be replace.

Dependencies

  • Helmet (Security Middleware)
  • Swagger (API Documentation)
  • Express.js (a back end web application framework for Node.js)
  • Mongoose (creates a connection between MongoDB and Node.js)
  • dotenv (to integrate .env files)
  • HTTP
  • Chalk (String coloring for console)
  • ESLint with Airbnb style
  • Prettier
  • Morgan (Logger for requests)
  • Passport.js (for Authentication&Authorization)
  • Passport local
  • Passport Google Oauth

Prerequisite

👨‍💻 Installation

Clone repository

$ git clone https://github.com/femresirvan/node.js-starter-template.git
$ cd node.js-starter-template

Install dependencies

$ npm i

Configure .env

~./env
PORT=PORT_NUMBER
NODE_ENV='dev' #Not prepared yet.
MONGODB_URI="NOT COMPLETED"
GOOGLE_ID="NOT COMPLETED"
GOOGLE_SECRET="NOT COMPLETED"

✔️ MongoDB&Mongoose Notes

MongoDB has very flexible structure so database models can be updated during the development phase.

MongoDB Database Creation Steps

  • Specify key points and entities.
  • Make ER Diagram to specify relationship between entities.
  • Choose a specific design pattern to create database.
  • Keep update the database schemas on issues while developing.

What to do to optimize MongoDB performance?

  • Create spesific indexes
  • Use complex aggregations

Most common design patterns used in Mongodb

  • Approximation
  • Attribute
  • Bucket
  • Computed
  • Document Versioning
  • Extended Reference
  • Outlier
  • Pre-allocation
  • Polymorphic
  • Schema Versioning
  • Subset
  • Tree

Documentations

Quick Start with Mongoose

MongoDB Design Patterns Documentation

MongoDB Documentation

Mongoose Documentation

Mongodb Aggregation Framework Book

Other Documentations

JS Book

🤝 Contributes&Donates

😊 Give me any advice by sending email!

Email: [email protected]

About

Comprehensive Node.js starter kit powered by MVC design and bunch of notes! (Under development!)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published