All Projects → ngduc → Node Rem

ngduc / Node Rem

Licence: mit
Node REM - NodeJS Rest Express MongoDB and more: typescript, passport, JWT, socket.io, HTTPS, HTTP2, async/await, nodemailer, templates, pagination, docker, etc. Live Demo: https://node-rem-ngduc.vercel.app

Programming Languages

typescript
32286 projects
es6
455 projects
es2017
19 projects

Projects that are alternatives of or similar to Node Rem

Express Rest Boilerplate
⌛️ Express starter for building RESTful APIs
Stars: ✭ 1,794 (+834.38%)
Mutual labels:  rest-api, microservices, mongoose, mongodb, express, boilerplate
Node Express Boilerplate
A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose
Stars: ✭ 890 (+363.54%)
Mutual labels:  rest-api, mongoose, mongodb, express, boilerplate
Express Boilerplate
🚀 Starter project for a RESTful API in Node with Express & mongoose component-based
Stars: ✭ 9 (-95.31%)
Mutual labels:  rest-api, mongoose, mongodb, express, boilerplate
Koa Restful Boilerplate
Koa 2 RESTful API boilerplate
Stars: ✭ 146 (-23.96%)
Mutual labels:  rest-api, mongoose, mongodb, boilerplate
Saas
Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
Stars: ✭ 2,720 (+1316.67%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (+50%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Express Mongoose Es6 Rest Api
💥 A boilerplate application for building RESTful APIs Microservice in Node.js using express and mongoose in ES6 with code coverage and JsonWebToken Authentication
Stars: ✭ 2,811 (+1364.06%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Node Easy Notes App
A simple Note-Taking app built using Node.js, Express and Mongoose
Stars: ✭ 148 (-22.92%)
Mutual labels:  rest-api, mongoose, mongodb, express
Bulletproof Nodejs
Implementation of a bulletproof node.js API 🛡️
Stars: ✭ 4,369 (+2175.52%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Node Express Mongo Api
Starter project for a REST API with Node.js, Express & MongoDB 🔋
Stars: ✭ 148 (-22.92%)
Mutual labels:  rest-api, mongoose, mongodb, express
Angular Full Stack
Angular Full Stack project built using Angular, Express, Mongoose and Node. Whole stack in TypeScript.
Stars: ✭ 1,261 (+556.77%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Nodejs Api Boilerplate
A boilerplate for kickstart your nodejs api project with JWT Auth and some new Techs :)
Stars: ✭ 364 (+89.58%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Rest Api Nodejs Mongodb
A boilerplate for REST API Development with Node.js, Express, and MongoDB
Stars: ✭ 672 (+250%)
Mutual labels:  rest-api, mongodb, express, boilerplate
Mern Boilerplate
Fullstack boilerplate with React, Redux, Express, Mongoose, Passport Local, JWT, Facebook and Google OAuth out of the box.
Stars: ✭ 112 (-41.67%)
Mutual labels:  mongoose, mongodb, express, boilerplate
Rest
REST API generator with Node.js, Express and Mongoose
Stars: ✭ 1,663 (+766.15%)
Mutual labels:  rest-api, mongoose, mongodb, boilerplate
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (+1000%)
Mutual labels:  mongoose, mongodb, boilerplate
Node Elm
基于 node.js + Mongodb 构建的后台系统
Stars: ✭ 11,224 (+5745.83%)
Mutual labels:  mongoose, mongodb, express
Fastify Api
A blazing fast REST APIs with Node.js, MongoDB, Fastify and Swagger.
Stars: ✭ 138 (-28.12%)
Mutual labels:  rest-api, mongoose, mongodb
Nodejs Rest Api Project Structure Express
Nodejs project structure practices for building RESTful APIs using Express framework and MongoDB.
Stars: ✭ 134 (-30.21%)
Mutual labels:  mongoose, mongodb, express
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (-23.96%)
Mutual labels:  rest-api, mongoose, express

Node REM

NodeJS Rest Express MongoDB (REM) - a production-ready lightweight backend setup.

Build Status Maintainability

Live Demo (login with a test user: [email protected], user111 - inspect API calls to learn more)

🌟 It rains cats and dogs features:

  Typescript      Express   CORS     Helmet    DotEnv   joi (validation)   forever
  Mongoose        Passport  JWT      Await
  Tslint          Apidoc    Docker   Husky    Morgan    Travis   Unix/Mac/Win (Powershell)
  Tests
            Mocha  Chai     Sinon    istanbul
  MORE:
            HTTPS           HTTP2 (spdy)      Socketio 2.1       Init DB Data
            Slack message   Nodemailer        Mailgun            Email Templates    Forgot Password
            VSCode Debug    Dependabot        Codacy             File upload (multer)
      API
            API response    (data, meta: limit, offset, sort)    Transform res
            apiJson         Pagination query
            Regex query     Whitelist fields in response         Populate deep fields
            mstime          API response time     Stack trace in Response
      UI Example
            CRA, Typescript, React-router, Axios, PostCSS, Tailwind. Components: Login, Home, ItemView.

📦 Installation

Require: MongoDB and NodeJS v8.12.0 +

Clone this project:

git clone https://github.com/ngduc/node-rem.git your-app
cd your-app
rm -rf .git   (remove this github repo's git settings)
yarn
  • Update package.json and .env file with your information.
  • Run yarn dev, it will create a new Mongo DB "node-rem"
  • Verify yarn test can run all unit tests.
  • Verify: use Postman to POST http://localhost:3009/api/v1/auth/register to create a new user. (set payload to have email, password)
curl -k -d '{"email": "[email protected]", "password": "testpsw"}' -H "Content-Type: application/json" -X POST http://localhost:3009/api/v1/auth/register

🔧 Commands

- Start MongoDB first. Verify .env variables.

yarn dev      launch DEV mode
yarn start    launch PROD mode
yarn stop

yarn test     Run tests   (requires MongoDB)

Frontend Example - uses this node-rem backend:

- First, start the Backend with: yarn dev

- Then, start UI:
cd ./ui
yarn
yarn start    (then open http://localhost:3000 - login with a test user: [email protected], user111)

📖 Features

Your simple API Route Handler will have a nice syntax like this: (packed with vitamins cool stuffs)

exports.list = async (req: Request, res: Response, next: NextFunction) => {
  try {
    const data = (await User.list(req)).transform(req); // query & run userSchema.transform() for response
    apiJson({ req, res, data, model: User }); // return standard API Response
  } catch (e) {
    next(e);
  }
};

API Response is similar to JSON API standard:

GET http://localhost:3009/api/v1/users?fields=id,email&email=*user1* (get id & email only in response)
GET http://localhost:3009/api/v1/users?page=1&perPage=20 (query & pagination)
GET http://localhost:3009/api/v1/users?limit=5&offset=0&sort=email:desc,createdAt
{
    "meta": {
        "limit": 5,
        "offset": 0,
        "sort": {
            "email": -1,
            "createdAt": 1
        },
        "totalCount": 4,
        "timer": 3.85,
        "timerAvg": 5.62
    },
    "data": [
        {
            "id": "5bad07cdc099dfbe49ef69d7",
            "name": "John Doe",
            "email": "[email protected]",
            "role": "user",
            "createdAt": "2018-09-27T16:39:41.498Z"
        },
        // more items...
    ]
}

Example of generated API Docs (using apidoc) - https://node-rem.netlify.com

📖 Documentation

🙌 Thanks

All contributions are welcome!

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].