All Projects → watscho → Express Mongodb Rest Api Boilerplate

watscho / Express Mongodb Rest Api Boilerplate

Licence: mit
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Express Mongodb Rest Api Boilerplate

Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (+88.24%)
Mutual labels:  api, scratch, redis, mongodb, express, authentication, authorization, token, boilerplate, verification, docker-compose
Node Express Mongodb Jwt Rest Api Skeleton
This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
Stars: ✭ 603 (+294.12%)
Mutual labels:  api, redis, mongodb, express, jwt, jwt-authentication, token
Securing Restful Apis With Jwt
How to secure a Nodejs RESTful CRUD API using JSON web tokens?
Stars: ✭ 301 (+96.73%)
Mutual labels:  api, mongodb, express, authentication, jwt, authorization
Mern Boilerplate
Fullstack boilerplate with React, Redux, Express, Mongoose, Passport Local, JWT, Facebook and Google OAuth out of the box.
Stars: ✭ 112 (-26.8%)
Mutual labels:  mongodb, express, authentication, jwt, authorization, boilerplate
Rest Api Nodejs Mongodb
A boilerplate for REST API Development with Node.js, Express, and MongoDB
Stars: ✭ 672 (+339.22%)
Mutual labels:  api, mongodb, express, jwt-authentication, boilerplate
Express Jwt
An example API for creating/verifying json web tokens
Stars: ✭ 105 (-31.37%)
Mutual labels:  express, authentication, jwt, authorization
Github Create Token
Create a Github OAuth access token.
Stars: ✭ 6 (-96.08%)
Mutual labels:  api, authentication, authorization, token
Spring Webmvc Pac4j
Security library for Spring Web MVC: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 110 (-28.1%)
Mutual labels:  mongodb, authentication, jwt, authorization
Access
Ponzu Addon to manage API access grants and tokens for authentication
Stars: ✭ 13 (-91.5%)
Mutual labels:  authentication, jwt, authorization, token
Express Rest Api Boilerplate
Express REST API with JWT Authentication and support for sqlite, mysql, and postgresql
Stars: ✭ 384 (+150.98%)
Mutual labels:  express, authentication, jwt, boilerplate
Express Boilerplate
🚀 Starter project for a RESTful API in Node with Express & mongoose component-based
Stars: ✭ 9 (-94.12%)
Mutual labels:  mongodb, express, jwt-authentication, boilerplate
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (-4.58%)
Mutual labels:  api, express, jwt, jwt-authentication
Appy Backend
A user system to bootstrap your app.
Stars: ✭ 96 (-37.25%)
Mutual labels:  api, mongodb, authentication, authorization
Buji Pac4j
pac4j security library for Shiro: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 444 (+190.2%)
Mutual labels:  mongodb, authentication, jwt, authorization
Authentication Server
A simple authentication service to deliver JWT with Hasura claims, based on users with multiples roles stored in a Postgres database.
Stars: ✭ 48 (-68.63%)
Mutual labels:  authentication, jwt, jwt-authentication, boilerplate
Jwt Node Vue
Repositório responsável pelo primeiro projeto da série de vídeos: Coding Stuff.
Stars: ✭ 29 (-81.05%)
Mutual labels:  mongodb, express, jwt, jwt-authentication
Aclify
🔒 Node Access Control Lists (ACL).
Stars: ✭ 49 (-67.97%)
Mutual labels:  api, redis, mongodb, express
Angular Full Stack
Angular Full Stack project built using Angular, Express, Mongoose and Node. Whole stack in TypeScript.
Stars: ✭ 1,261 (+724.18%)
Mutual labels:  mongodb, express, jwt, boilerplate
Nodejs Api Boilerplate
A boilerplate for kickstart your nodejs api project with JWT Auth and some new Techs :)
Stars: ✭ 364 (+137.91%)
Mutual labels:  mongodb, express, boilerplate, docker-compose
Play Pac4j
Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 375 (+145.1%)
Mutual labels:  mongodb, authentication, jwt, authorization

express-mongodb-rest-api-boilerplate

Also express-graphql-mongodb-boilerplate - GraphQL API Boilerplate

GitHub license

Authentication from scratch

Sign In, Sign Up, Reset Password, Change Password, Update User

E-mail verification, Multi language, Redis for token blacklisting

Package list

Package Description
bcryptjs Optimized bcrypt in JavaScript with zero dependencies. Compatible to the C++ bcrypt binding on node.js and also working in the browser.
cors CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options.
crypto-random-string Generate a cryptographically strong random string
dotenv Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology.
ejs Embedded JavaScript templates
email-templates Create, preview, and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more! Made for sending beautiful emails with Lad.
express Fast, unopinionated, minimalist web framework for node.
http-status-codes Constants enumerating the HTTP status codes.
i18next i18next is a very popular internationalization framework for browser or any other javascript environment (eg. node.js).
i18next-express-middleware This is a middleware to use i18next in express.js.
ioredis A robust, performance-focused and full-featured Redis client for Node.js.
jsonwebtoken This was developed against draft-ietf-oauth-json-web-token-08. It makes use of node-jws
module-alias Create aliases of directories and register custom module paths in NodeJS like a boss!
moment A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
mongoose Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Mongoose supports both promises and callbacks.
nodemailer Send e-mails from Node.js – easy as cake!
validator A library of string validators and sanitizers.
winston A logger for just about everything.

Redis

Mac (using homebrew):

brew install redis

Linux:

sudo apt-get install redis-server

First, we use yarn - workspaces with lerna

Introducing Yarn Workspaces

cd workspaces/api

COPY .env.example to .env

cp .env.example .env

Note: I highly recommend installing nodemon.

nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected. nodemon does not require any additional changes to your code or method of development. nodemon is a replacement wrapper for node, to use nodemon replace the word node on the command line when executing your script. yarn global add nodemon.

API Start

yarn start
yarn start:local # with nodemon

Docker compose

docker-compose up -d --build
docker-compose -f docker-compose.dev.yml up --build # with nodemon

ESlint Start

yarn lint
yarn lint:write # with prefix --fix

API Structure

├─ src
│  ├─ i18next
│  │  ├─ locales
│  │  │  ├─  en.json
│  │  │  └─  ge.json
│  │  └─ index.js
│  ├─ middleware
│  │  ├─ authentication.js
│  │  ├─ authMiddleware.js
│  │  └─  index.js
│  ├─ module
│  │  ├─ auth
│  │  │  ├─ mail
│  │  │  │  ├─ index.js
│  │  │  │  └─ userMail.js
│  │  │  ├─ service
│  │  │  │  ├─ index.js
│  │  │  │  └─ userService.js
│  │  │  ├─ authController.js
│  │  │  ├─ index.js
│  │  │  └─ user.js
│  │  └─ index.js
│  ├─ route
│  │  ├─ auth.js
│  │  └─ index.js
│  ├─ service
│  │  ├─ logger.js
│  │  └─ nodemailer.js
│  ├─ validator
│  │  ├─ index.js
│  │  └─ userValidator.js
│  ├─ view
│  │  └─ template
│  │     ├─ reset-password
│  │     │  └─ html.ejs
│  │     ├─ verify
│  │     │  └─ html.ejs
│  │     └─ verify-request
│  │        └─ html.ejs
│  ├─ index.js
│  ├─ mongoose.js
│  └─ redis.js
├─ .dockerignore
├─ .env.example
├─ .eslintignore
├─ .eslint
├─ .gitignore
├─ Dockerfile
├─ Dockerfile.dev
├─ LICENSE
├─ README.md
├─ docker-compose.dev.yml
├─ docker-compose.yml
└─ package.json

API Endpoints

Note: For any question issues

License

This project is an open-source with an MIT License

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