- The purpose of the app is to store sensitive data, like online account credentials, secure notes, document numbers, etc
- The data is server-side encrypted and decrypted via the API
- The supported item models are:
Credentials- username, password and url for a websiteNotes- simple encrypted text notesCards- credit or debit card informationWifi- wifi network name and passwordDocuments- personal document numbers
-
The fundamentals of Vue 3
-
Composition API, setup function, refs and reactivity, events
-
Slots and templates, provide/inject, suspense API, dynamic routing
-
More Prisma data modeling features
-
Issues of response and error handling consistency when scaling an API ๐ฅฒ
- The default responses are:
200- Successful GET request201- Successful POST request204- Successful DELETE request401- Auth errors404- Resource not found409- Resource conflict on POST requests422- Body validation error on POST requests
POST /signup
- Route for creating a new user
- body:{
"email": "[email protected]",
"password": "DonJoe27"
}
- response: {"token": "JWT_TOKEN"}POST /signin
- Route for signing an existing user
- body:{
"email": "[email protected]",
"password": "DonJoe27"
}
- Response: {"token": JWT_TOKEN}POST /auth/check
- Route for validating cached jwt tokens
- headers: {"Authorization": "Bearer TOKEN"}POST /credentials
- Route for creating new encrypted credential
- headers: {"Authorization": "Bearer TOKEN"}
- body: {
"title": "Website account",
"email": "[email protected]",
"password": "DonJoe27",
"url": "http://website.com"
}GET /credentials
- Route for finding all user credentials
- headers: {"Authorization": "Bearer TOKEN"}
- Response: array of credentialsGET /credentials/:id
- Route for finding one user credential
- headers: {"Authorization": "Bearer TOKEN"}
- Response: credentialDELETE /credentials/:id
- Route for deleting one user credential
- headers: {"Authorization": "Bearer TOKEN"}POST /notes
- Route for creating new encrypted note
- headers: {"Authorization": "Bearer TOKEN"}
- body: {
"title": "My important note",
"content": "Important things to store",
}GET /notes
- Route for finding all user notes
- headers: {"Authorization": "Bearer TOKEN"}
- Response: array of notesGET /notes/:id
- Route for finding one user note
- headers: {"Authorization": "Bearer TOKEN"}
- Response: noteDELETE /notes/:id
- Route for deleting one user note
- headers: {"Authorization": "Bearer TOKEN"}POST /cards
- Route for creating new encrypted card
- headers: {"Authorization": "Bearer TOKEN"}
- body: {
"title": "Mustercard credit",
"number": "1234 5678 8765 4321",
"cardholderName": "Jon Doe Full Name Jr",
"securityCode": "123",
"expirationDate": "07/28",
"password": "1234",
"type": "CREDIT | DEBIT"
}GET /cards
- Route for finding all user cards
- headers: {"Authorization": "Bearer TOKEN"}
- Response: array of cardsGET /cards/:id
- Route for finding one user card
- headers: {"Authorization": "Bearer TOKEN"}
- Response: cardDELETE /cards/:id
- Route for deleting one user card
- headers: {"Authorization": "Bearer TOKEN"}POST /wifi
- Route for creating new encrypted wifi
- headers: {"Authorization": "Bearer TOKEN"}
- body: {
"title": "Home network",
"network": "network2.4",
"password": "password123",
}GET /wifi
- Route for finding all user wifi
- headers: {"Authorization": "Bearer TOKEN"}
- Response: array of wifiGET /wifi/:id
- Route for finding one user wifi
- headers: {"Authorization": "Bearer TOKEN"}
- Response: wifiDELETE /wifi/:id
- Route for deleting one user wifi
- headers: {"Authorization": "Bearer TOKEN"}POST /docs
- Route for creating new encrypted documents
- headers: {"Authorization": "Bearer TOKEN"}
- body: {
"title": "Home network",
"network": "network2.4",
"password": "password123",
}GET /docs
- Route for finding all user documents
- headers: {"Authorization": "Bearer TOKEN"}
- Response: array of docsGET /docs/:id
- Route for finding one user documents
- headers: {"Authorization": "Bearer TOKEN"}
- Response: documentDELETE /docs/:id
- Route for deleting one user documents
- headers: {"Authorization": "Bearer TOKEN"}