19th project project at Driven Education.

Overview

DrivenPass

19th project project at Driven Education.

A password manager API.

Technologies


🏁 Running this project

Before starting, you will need to have the following tools installed on your machine: Postgres, Node.js.

Besides, it's good to have an editor to work with the code like VSCode.

	
# First, clone this repository.
$ git clone https://github.com/emilynakano/drivenpass-back.git

# Acces this repository.
$ cd drivenpass-back

# Go to the '.env.example' in your code editor.
	
# Put your DATABASE_URL, which must be a url of an empty database made with postgres.
# Put your PORT, which must be a port of the aplication.
# Put your JWT_SECRET_KEY, which is a key that must be a string.
# Put your CRYPT_SECRET_KEY, which is a key that must be a string.
	
# Finally, make a copy of '.env.example' to '.env'.
$ cp .env.example .env

# Install dependencies.
$ npm i -y

# Build.
$ npm run build
	
# Run the project in the developer mode.
$ npm run dev	
	

NOTE: There is a Thunder Client collection in this project's folder, it contains all the project routes with an example request body. To use it you will need to import it into your Thunder Client and put the url you are using.


🧑🏻‍🏭 Working Flow

  1. User creates a login (name, email, password).

  2. User logs in and receives a token.

  3. User creates a register using one of the categories (credentials/networks/cards/notes).

  4. User can access the register according to the category, either searching all or one in specific.


demo-web

🚀 Routes

User Registration

POST /sign-up

Send a request body in this format:

{
    name: Fulano,
    email: [email protected],
    password: 1234567890,
    checkPassword: 1234567890
}

User Login

POST /sign-in

Send a request body in this format

{
    email: [email protected],
    password: 1234567890
}

The server will respond with an object in this format:

{
    token: jyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
}

Credential Creation

POST /credentials

Send a Authorization Header with format Bearer Token, and a Request Body in this format:

{
  "title": "twitter"
  "url": "https://mobile.twitter.com/" , 
  "username": "twitterUser", 
  "password": "twitterPassword"
}

Get User Credentials

GET /credentials

Send a Authorization Header with format Bearer Token.

The server will respond with an array in this format:

[
  {
    "id": 1,
    "title": "twitter"
    "url": "https://mobile.twitter.com/" , 
    "username": "twitterUser", 
    "password": "twitterPassword"
  }
] 

Get Credential By Id

GET /credentials/:id

Send a Authorization Header with format Bearer Token.

Replace ":id" to desired id

The server will respond with an object in this format:

{
  "id": 1,
  "title": "twitter"
  "url": "https://mobile.twitter.com/" , 
  "username": "twitterUser", 
  "password": "twitterPassword"
}

Delete Credential

DELETE /credentials/:id

Send a Authorization Header with format Bearer Token.

Replace ":id" to desired id

The server will respond with status 200 if the request is successful.


Network Creation

POST /networks

Send a Authorization Header with format Bearer Token, and a Request Body in this format:

{
  "title": "neighbor's wifi"
  "networkName": "5g-Net" , 
  "password": "neighborPassword"
}

Get User Networks

GET /networks

Send a Authorization Header with format Bearer Token.

The server will respond with an array in this format:

[
 {
   "id": 1,
   "title": "neighbor's wifi"
   "networkName": "5g-Net" , 
   "password": "neighborPassword"
 }
] 

Get Network By Id

GET /networks/:id

Send a Authorization Header with format Bearer Token.

Replace ":id" to desired id

The server will respond with an object in this format:

{
  "id": 1,
  "title": "neighbor's wifi"
  "networkName": "5g-Net" , 
  "password": "neighborPassword"
}

Delete Network

DELETE /networks/:id

Send a Authorization Header with format Bearer Token.

Replace ":id" to desired id

The server will respond with status 200 if the request is successful.


Card Creation

POST /cards

Send a Authorization Header with format Bearer Token, and a Request Body in this format, with the type field valid for "debit", "credit" and "both":

{
  "number": "1234567892345678",
  "title": "card to buy snacks",
  "holderName": "Fulano S Oliveira",
  "securityCode": "123",
  "expirationDate": "04/21",
  "password": "passwordCard",
  "isVirtual": true,
  "type": "debit"
}

Get User Cards

GET /cards

Send a Authorization Header with format Bearer Token.

The server will respond with an array in this format:

[
 {
  "id": 1,
  "number": "1234567892345678",
  "title": "card to buy snacks",
  "holderName": "Fulano S Oliveira",
  "securityCode": "123",
  "expirationDate": "04/21",
  "password": "passwordCard",
  "isVirtual": true,
  "type": "debit"
 }
] 

Get Card By Id

GET /cards/:id

Send a Authorization Header with format Bearer Token.

Replace ":id" to desired id

The server will respond with an object in this format:

 {
  "id": 1,
  "number": "1234567892345678",
  "title": "card to buy snacks",
  "holderName": "Fulano S Oliveira",
  "securityCode": "123",
  "expirationDate": "04/21",
  "password": "passwordCard",
  "isVirtual": true,
  "type": "debit"
 }

Delete Card

DELETE /cards/:id

Send a Authorization Header with format Bearer Token.

Replace ":id" to desired id

The server will respond with status 200 if the request is successful.


Note Creation

POST /notes

Send a Authorization Header with format Bearer Token, and a Request Body in this format:

{
  "title": "secret tought",
  "note": "I want to break the diet and eat a lot of ice cream" , 
}

Get User Notes

GET /notes

Send a Authorization Header with format Bearer Token.

The server will respond with an array in this format:

[
 {
  "id": 1,
  "title": "secret tought",
  "note": "I want to break the diet and eat a lot of ice cream" , 
 }
] 

Get Note By Id

GET /notes/:id

Send a Authorization Header with format Bearer Token.

Replace ":id" to desired id

The server will respond with an object in this format:

{
  "id": 1,
  "title": "secret tought",
  "note": "I want to break the diet and eat a lot of ice cream" , 
}

Delete Note

DELETE /notes/:id

Send a Authorization Header with format Bearer Token.

Replace ":id" to desired id

The server will respond with status 200 if the request is successful.

You might also like...

17ᵗʰ Project developed as assessment practice during Driven's Full Stack Develpment course

17ᵗʰ Project developed as assessment practice during Driven's Full Stack Develpment course

Linkr | Front end WIP Full Stack Development Project Browse JSX code» - Back end code» Built With Study Playlist In this section I included all Youtub

Jun 20, 2022

14th project from Driven Full-Stack Web Dev Bootcamp

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Sep 3, 2022

Backend Stack of Project #19 from Driven's Fullstack Bootcamp

SISTEMA DRIVENPASS Introdução O projeto consiste em um serviço de armazenamento seguro de credenciais: Os tipos de credenciais que podem ser guardados

Sep 13, 2022

Backend stack of Project #20 from Driven's Fullstack Developer bootcamp

SISTEMA REPO PROVAS Inicialização O sistema será montado a partir do comando npm i, que fará a instalação das bibliotecas e dependências do projeto. T

Oct 21, 2022

Backend Stack of Project #18 from Driven Fullstack Bootcamp, coded in TypeScript

SISTEMA VALEX Introdução O projeto consiste em um serviço de emissão de cartões (vales) para empresas. O sistema permite as seguintes funcionalidades

Sep 6, 2022

Gatsby-starter-minimal-blog - Typography driven, feature-rich blogging theme with minimal aesthetics.

Gatsby-starter-minimal-blog - Typography driven, feature-rich blogging theme with minimal aesthetics. Includes tags/categories support and extensive features for code blocks such as live preview, line numbers, and line highlighting.

Jan 29, 2022

io-ts Typed Event Bus for the runtime of your Node.js application. A core for any event-driven architecture based app.

Typed Event Bus Based on io-ts types, this bus provides a handy interface to publish and consume events in the current runtime of the Node.js process.

May 23, 2022

Dynamic web app 'presentations', driven by user scrolling, inspired by the NYT

Museé A small Typescript-based web app, inspired by the NYT Close Reading of Auden's Museé des Beaux Arts. Introduction I loved the NYT Close Reading

Mar 13, 2022

An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve and modify the bot state, respectively.

An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve and modify the bot state, respectively.

CQRS Wechaty An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve

Mar 23, 2022
Owner
Emily Nakano
Emily Nakano
20th project project at Driven Education.

RepoProvas 20th project project at Driven Education. A system for sharing tests between students. Technologies ????‍?? Working Flow User creates a log

Emily Nakano 6 Sep 19, 2022
Projeto 20° da Driven Education - RepoProvas (front)

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Daniel Lucas Ederli 4 Sep 26, 2022
Projeto 20° da Driven Education - RepoProvas (Back)

RepoProvas 20th Project of Driven Education An API to manage and storage yout tests Built With Project Guide Features Auth (sign-in/sign-up) Create te

Daniel Lucas Ederli 2 Sep 26, 2022
'event-driven' library aims to simplify building backends in an event driven style

'event-driven' library aims to simplify building backends in an event driven style(event driven architecture). For message broker, light weight Redis Stream is used and for event store, the well known NoSQL database, MongoDB, is used.

Sihoon Kim 11 Jan 4, 2023
Microverse Module 02 Project: This is education project that allow user to add desire books to the list and also delete books. It makes use of local storage to preserve the data on the web browser.Built with HTML, CSS, JavaScript

Project Demo Live Demo AWESOME BOOK PROJECT Project allow user to add desire books to the list and also delete books. It makes use of local storage to

Ajayi Ridwan 8 Dec 3, 2022
Kustomizegoat - Vulnerable Kustomize Kubernetes templates for training and education

KustomizeGoat - Vulnerable by design Kustomize deployment Demonstrating secure a

Bridgecrew 38 Nov 1, 2022
ZxCDDoS for education with LAYER 7, LAYER 4, AMP METHODS

?? ZxCDDoS: Release v1.0 - Free DDoS Panel ?? Terminal only accepts ANSI color. Username: admin Password: admin Language Logs Fixed L7 methods (crash,

zxcr9999 151 Jan 3, 2023
This is for homework submission of Filecoin Chinese Education Series - Coding with Filecoin.

Coding-with-Filecoin-Homework 课程简介 随着互联网和大数据技术的发展,我们正愈发依赖中心化的服务来存储和处理相关数据。但这背后有两个潜在的问题:用户不能完全控制自身数据的使用与传播,且很难验证公开数据的完整性与可靠性。为了解决这两个问题,新一代的协议和点对点网络已经问世

IPFS & Filecoin 15 Jul 14, 2022
Proyecto de encriptasion, echo para el curso de Oracle Next Education 2022

Encriptador Proyecto de Encriptador, echo para el curso de Oracle Next Education 2022. Link directo al proyecto desplegado Link al Encriptador Instruc

Bernardo Abel Lopez 14 Dec 28, 2022
17ᵗʰ Project developed as assessment practice during Driven's Full Stack Develpment course

Linkr | Back end WIP Full Stack Development Project Browse Nodejs code» - Front end code» Built With Study Playlist In this section I included all You

Nivaldo Farias 2 Aug 23, 2022