Skip to content

pecampelo/login-api

Repository files navigation

Login and Password Storage API


This application will be one that is going to store user data that can be accessed through a log-in page. It is being done as part of the selective process for a brazilian enterprise called DataSprints.

Installation

First, clone this repository:

git clone https://github.com/pecampelo/login-api.git

npm install

npm run build OR npm run build-t (build + tests)

npm start

Endpoints

/signup

  • stores a new user's chosen username, password, e-mail, full name, age and address.

/signin:

  • allows authentication to a previously set user by only receiving an e-mail and a password. It will return a Bearer Token as a response.

Features

  • NodeJS as a scalable development environment.
  • Typescript to clean up data coming from the front-end.
  • Mocha to apply unit testing to a somewhat full capacity.
  • PostgreSQL as a database that can increase in size and make use of foreign keys when scaling the project's size.
  • Prisma.io as a modern ORM that can facilitate database usage and querying.
  • Docker to avoid dependency changes and to run independent containers for scalability in the future.
  • JWT to provide a Bearer Token for Single Signn Login.

Development Steps

  • Create schemata for all tests
  • Server is online
  • Tests for Router
  • Router
  • Tests for Body Parser
  • Body Parser
  • Create route handler
  • Tests for Sign-Up Controller
  • Create Sign-Up Controller (which handle business rules)
  • Tests for Sign-In Controller
  • Create Sign-In Controller (which handle business rules)
  • Dockerize application
  • Dockerize database
  • Tests for Database
  • Tests for migrations for Users with Prisma
  • Create database connection

About

a simple login API with native NodeJS server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published