Giter VIP home page Giter VIP logo

adilsonfuxe / auth-microservice Goto Github PK

View Code? Open in Web Editor NEW
45.0 1.0 14.0 680 KB

Authentication microservice built with Node.js that follows Clean Architecture + TDD + SOLID + DDD + functional programming principles

License: MIT License

Shell 0.10% TypeScript 99.80% Dockerfile 0.11%
typescript nodejs tdd clean-architecture ddd solid docker-compose docker swagger nodemailer kubernetes k8s stateful-components

auth-microservice's Introduction

Build Status Coverage Status Auth Microservice License


Node.js Authentication Microservice

A simple API built with Node.js that follows Clean Architecture + TDD + SOLID + DDD principles

Table of Contents

About The Project

Built With

Getting Started

to run the project you need to have npm installed on your machine and the mongo DB

Prerequisites

to get the npm https://www.npmjs.com/get-npm

Installation

  1. Clone the repo
git clone https://github.com/AdilsonFuxe/clean-auth-microservice.git
  1. Server configuration

Enter into the server folder

cd clean-auth-microservice
  1. inside the server folder run the following command to install all dependencies
npm install or yarn
  1. to generate the build of the project run
npm run build or yarn build
  1. to run the server
npm start or yarn start
  1. to run the unit tests and the integration tests
npm test or yarn test

Endpoints


SignUp

POST https:/localhost/api/v1/signup

output example
// POST https:/localhost/api/v1/signup

// Request Body
{
  "firstName": "any_name",
  "lastName": "any_name",
  "email": "[email protected]",
  "password": "any_password",
  "passwordConfirmation": "any_password"
}

// Response Body
{
  "accessToken": "any_access_token"
}

SignIn

POST https:/localhost/api/v1/signin

output example
// POST https:/localhost/api/v1/signin

// Request Body
{
  "email": "[email protected]",
  "password": "any_password"
}

// Response Body
{
  "accessToken": "any_access_token"
}

Me

GET https:/localhost/api/v1/me

output example
// Get https:/localhost/api/v1/me
// HEADER x-access-token = any_access_token

// Response Body
{
  "id": "any_id",
  "firstName": "any_name",
  "lastName": "any_name",
  "email": "[email protected]"
}

Forgot Password

Patch https:/localhost/api/v1/forgot

output example
// Patch https:/localhost/api/v1/forgot

// Request Body
{
  "email": "[email protected]"
}

Reset Password

Patch https:/localhost/api/v1/reset-password

output example
// Patch https:/localhost/api/v1/reset-password

// Request Body
{
  "email": "[email protected]",
  "accessToken": 092498,
  "password": "new_password"
}

Signout

Delete https:/localhost/api/v1/signout

output example
// Delete https:/localhost/api/v1/signout
// HEADER x-access-token = any_access_token

// Request Body
Status Code 204
{}

auth-microservice's People

Contributors

adilsonfuxe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

auth-microservice's Issues

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.