Giter VIP home page Giter VIP logo

mern-auth's Introduction

mern-auth

Secure Authentication Service for MERN Stack using ReactJs and NestJs

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

React · GitHub license npm version CircleCI Status PRs Welcome

React is a JavaScript library for building user interfaces.

MongoDB

MongoDB is an open source, nonrelational database management system (DBMS)

Simple & Basic MERN AUTH APP

This is a very basic example of signIn and signUp in Node.js and NestJs framework . I have applied REST based API recommendations .

From front-end i have used ReactJs starter setup . Check images in docs.

Database Used : Mongodb And ORM as Mongoose .

Have used eslint | prettier modules for finding and fixing problems/linting issues in my code .

For Authentication I have used Passport jwt strategy.

For validation : Express validation

As per business needs i have used winston logger for logs.

Test cases will be written in Upcoming days using testing framework Jest https://jestjs.io/ .

Built With :

NodeJs , NestJs , winston, Postman, ReactJs, Typescript, Javascript, PassportJs, MongoDb, Mongoose, Eslint, etc

Getting Started :

i have use node version v16.15.0 & npm verion 8.5.5 .

Prerequisites:

npm, MongoDb

Clone the repo take git pull .(Master branch is the final one)

Install NPM packages

npm install ( npm i ) for both modules separately (We can move modules in different cloud services)

For Backend :

#cd ./nest-js-auth/ then 
npm i 

#type in terminal
 npm run start:dev 

open your postman(preferred)

And type:

localhost:8000

My Postman API collection public link below : https://www.postman.com/gladiator-dev/workspace/anzar-dev/collection/5511458-440a63fb-80ba-4a65-96c1-ec3e48b373c9?action=share&creator=5511458

API's :

Below is a list of the required API's for the application.

  1. POST /auth/signup - for Sign up

  2. POST /auth/signin - for sign In

  3. GET /auth-dev-testing - It was just to check working of JWT authentication .

For UI front-end :

#cd ./react-js-auth/
#type in terminal
npm i
npm start

if you want to change environment variables <here i have pushed my .env file too>

mern-auth's People

Contributors

anzarmalik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.