DrivenPass API, a password manager built with TypeScript, Node.js, Express, Prisma and Postgres.
DrivenPass is the API of a password manager.
- Create account;
- Access an account;
- Create credential;
- Search credentials;
- Delete credential;
- Create safe note;
- Search safe notes;
- Delete safe note;
- Create card;
- Search cards;
- Delete card;
- Create a wi-fi log;
- Search wi-fi logs;
- Delete a wi-fi log.
POST /sign-up| Body | Type | Description |
|---|---|---|
email |
string |
Required. User mail. |
password |
string |
Required. User password. |
Password must be at least 10 characters
POST /sign-in| Body | Type | Description |
|---|---|---|
email |
string |
Required. User mail |
password |
string |
Required. User password |
Password must be at least 10 characters
{
"token": 11111111111
}POST /credentials| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
| Body | Type | Description |
|---|---|---|
title |
string |
Required. Credential name. |
url |
string |
Required. Valid url. |
username |
string |
Required. Username. |
password |
string |
Required. Password. |
Cannot create two different credentials with the same title
{
"id": 1,
"title": "Credential name",
"url": "url",
"username": "username",
"password": "password",
"userId": 1
}GET /credentialsTo search all user credentials
GET /credentials?credentialId={id}To search a specific credential
| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
[
{
"id": 1,
"title": "Credential name",
"url": "url",
"username": "username",
"password": "password",
"userId": 1
},
{
...
}
]{
"id": 1,
"title": "Credential name",
"url": "url",
"username": "username",
"password": "password",
"userId": 1
}DELETE /credentials/${credentialId}| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
POST /notes| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
| Body | Type | Description |
|---|---|---|
title |
string |
Required. Note name. |
note |
string |
Required. Note. |
Title cannot be longer than 50 characters
The annotation no longer than 1000 characters
Cannot create two different annotations with the same title
{
"id": 1,
"title": "Annotation name",
"note": "My annotation",
"userId": 1
}GET /notesTo search all user notes
GET /notes?noteId={id}To search a specific note
| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
[
{
"id": 1,
"title": "Annotation name",
"note": "My annotation",
"userId": 1
},
{
...
}
]{
"id": 1,
"title": "Annotation name",
"note": "My annotation",
"userId": 1
}DELETE /notes/${noteId}| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
POST /cards| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
| Body | Type | Description |
|---|---|---|
title |
string |
Required. Name given to the card. |
cardNumber |
string |
Required. Card number. |
cardholderName |
string |
Required. Card name. |
securityCode |
string |
Required. Card security code. |
expirationDate |
string |
Required. Card expiration date. |
password |
string |
Required. Card password. |
isVirtual |
boolean |
Required. Whether the card is virtual or not. |
type |
string |
Required. Card type. |
The card can only be of the following types: credit, debit, credit_debit
Cannot create two different cards with the same title
{
"id": 1,
"title": "Name given to the card",
"cardNumber": "1111111111111111",
"cardholderName": "MY NAME",
"securityCode": "111",
"expirationDate": "DD/MM",
"password": "My password",
"isVirtual": false,
"type": "credit",
"userId": 1
}GET /cardsTo search all user cards
GET /cards?cardId={id}To search a specific card
| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
[
{
"id": 1,
"title": "Name given to the card",
"cardNumber": "1111111111111111",
"cardholderName": "MY NAME",
"securityCode": "111",
"expirationDate": "DD/MM",
"password": "My password",
"isVirtual": false,
"type": "credit",
"userId": 1
},
{
...
}
]{
"id": 1,
"title": "Name given to the card",
"cardNumber": "1111111111111111",
"cardholderName": "MY NAME",
"securityCode": "111",
"expirationDate": "DD/MM",
"password": "My password",
"isVirtual": false,
"type": "credit",
"userId": 1
}DELETE /cards/${cardId}| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
POST /wi-fi| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
| Body | Type | Description |
|---|---|---|
title |
string |
Required. Name given to the wi-fi network record. |
networkName |
string |
Required. Network name. |
password |
string |
Required. Wi-fi password. |
{
"id": 1,
"title": "Name given to the wi-fi network record",
"networkName": "Network name",
"password": "My password",
"userId": 1
}GET /wi-fiTo search all user wi-fi
GET /wi-fi?wifiId={id}To search a specific wi-fi
| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
[
{
"id": 1,
"title": "Name given to the wi-fi network record",
"networkName": "Network name",
"password": "My password",
"userId": 1
},
{
...
}
]{
"id": 1,
"title": "Name given to the wi-fi network record",
"networkName": "Network name",
"password": "My password",
"userId": 1
}DELETE /wi-fi/${wifiId}| Headers | Type | Description |
|---|---|---|
Authorization |
string |
Required. User token. |
The Authorization field must have the following format: Bearer ${token}
To run this project, you will need to add the following environment variables to your .env file
PORT = number Recommended:5000
DATABASE_URL = postgres://UserName:Password@Hostname:5432/DatabaseName
JWT_SECRET = any string
CRYPTR_SECRET = any string
Clone the project
git clone https://github.com/lugablima/projeto19-drivenpassGo to the project directory
cd projeto19-drivenpass/Install dependencies
npm installStart the server
npm run startThe API deploy link is: https://back-projeto19-drivenpass.herokuapp.com/