Giter Club home page Giter Club logo

19-drivenpass's Introduction

Logo

Password and encryption manager


TypeScript Vue.js SASS

Node.js Express.js Prisma Postgres

Summary

  • 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 website
    • Notes - simple encrypted text notes
    • Cards - credit or debit card information
    • Wifi - wifi network name and password
    • Documents - personal document numbers

What I Learned

  • 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 ๐Ÿฅฒ

๐Ÿš€ Routes

  • The default responses are:
    • 200 - Successful GET request
    • 201 - Successful POST request
    • 204 - Successful DELETE request
    • 401 - Auth errors
    • 404 - Resource not found
    • 409 - Resource conflict on POST requests
    • 422 - Body validation error on POST requests

Auth

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"}

Credentials

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 credentials
GET /credentials/:id
    - Route for finding one user credential
    - headers: {"Authorization": "Bearer TOKEN"}
    - Response: credential
DELETE /credentials/:id
    - Route for deleting one user credential
    - headers: {"Authorization": "Bearer TOKEN"}

Notes

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 notes
GET /notes/:id
    - Route for finding one user note
    - headers: {"Authorization": "Bearer TOKEN"}
    - Response: note
DELETE /notes/:id
    - Route for deleting one user note
    - headers: {"Authorization": "Bearer TOKEN"}

Cards

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 cards
GET /cards/:id
    - Route for finding one user card
    - headers: {"Authorization": "Bearer TOKEN"}
    - Response: card
DELETE /cards/:id
    - Route for deleting one user card
    - headers: {"Authorization": "Bearer TOKEN"}

Wifi

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 wifi
GET /wifi/:id
    - Route for finding one user wifi
    - headers: {"Authorization": "Bearer TOKEN"}
    - Response: wifi
DELETE /wifi/:id
    - Route for deleting one user wifi
    - headers: {"Authorization": "Bearer TOKEN"}

Documents

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 docs
GET /docs/:id
    - Route for finding one user documents
    - headers: {"Authorization": "Bearer TOKEN"}
    - Response: document
DELETE /docs/:id
    - Route for deleting one user documents
    - headers: {"Authorization": "Bearer TOKEN"}

19-drivenpass's People

Contributors

celsobenedetti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.