Browsing the internet can be a very fun activity, but at the same time, very dangerous. Numerous studies and surveys (national and international) show that the number of virtual scams continues to grow. Which raises the question: how to protect ourselves? This API allows you to securely store your credit card information, websites, wifi credentials, notes and more.
- REST APIs
- JWTs & refresh tokens
- Node.js
- TypeScript
- ORM
- SQL
POST /signup
- Route to register a new user
- headers: {}
- body:{
"email": "[email protected]",
"senha": "loremipsum"
}
POST /signin
- Route to sign in
- headers: {}
- body: {
"email": "[email protected]",
"password": "loremipsum"
}
POST /credential (authenticated)
- Route to create a credential
- headers: { "Authorization": "Bearer $token" }
- body: {
"email": "[email protected]",
"password": "ipsumlorem",
"title": "My beautiful instagram credentials",
"url": "https://instagram.com/
}
GET /credential/:credentialId (authenticated)
- Get specific credential of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
GET /credential/= (authenticated)
- Get all credentials of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
DELETE /credential/:credentialId (authenticated)
- Delete specific credential of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
POST /wifi (authenticated)
- Route to create a wi-fi credential
- headers: { "Authorization": "Bearer $token" }
- body: {
"ssid": "Pergasus",
"password": "ipsumlorem",
"title": "Personal hotspot"
}
GET /wifi/:wifiId (authenticated)
- Get specific wi-fi credential of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
GET /wifi/= (authenticated)
- Get all wi-fi credentials of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
DELETE /wifi/:wifiId (authenticated)
- Delete specific wi-fi credential of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
POST /safenote (authenticated)
- Route to create a safe note
- headers: { "Authorization": "Bearer $token" }
- body: {
"title": "My lovely secret",
"content": "Lorem ipsum dolor set"
}
GET /safenote/:safenoteId (authenticated)
- Get specific safe note of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
GET /safenote/= (authenticated)
- Get all safe notes of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
DELETE /safenote/:safenoteId (authenticated)
- Delete safe note credential of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
POST /credit-card (authenticated)
- Route to create a safe note
- headers: { "Authorization": "Bearer $token" }
- body: {
"name": "Coleman R C Gallant",
"number": "1494-2313-1244-11",
"expiry": "07/2030",
"cvv": 289,
"password": 1984,
"isVirtual": false,
"type": "Credit",
"title": "My purple MasterCard CC"
}
GET /credit-card/:creditCardId (authenticated)
- Get specific credit card of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
GET /credit-card/= (authenticated)
- Get all credit cards of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
DELETE /credit-card/:creditCardId (authenticated)
- Delete credit card credentials of an authenticated user
- headers: { "Authorization": "Bearer $token" }
- body: {}
This project was initialized with Create React App, so make sure you have the latest stable version of [Node.js](https:/ /nodejs.org/en/download/) and npm running locally.
git clone https://github.com/f7lipe/projeto19-drivenpass
โ๏ธ Create a .env file in the root of your project folder and configute it to look something like this
PORT = 5000
DATABASE_URL = postgres://postgres:password6@database_url/database_name
MODE = DEV
JWT_SECRET = "secret"
CRYPT_KEY = "secret"
๐ป Inside the folder, run the following command to install the dependencies.
npm install
๐๏ธ Build the database
npx prisma db push
๐ Finished the process, just start the server
npm run dev
If you are using Thunder Client, import the thunder_client_template.json to your Thunder Client extension and enjoy the benefits of all routes already configured.