/DrivenPass

Primary LanguageTypeScript

DrivenPass

An easy and safe way to save your private information. Safely store your credentials, notes, and cards, so you never forget your information and can access it quickly and clearly whenever you need. All this, just with a master password.

Try it out now in back-end at https://drivenpass-api.onrender.com

About this Project

DrivenPass is a robust REST API designed to serve as your ultimate password manager. With DrivenPass, you gain the ability to securely create and access all the information you need through a single master password.

This powerful tool allows you to manage credentials for specific websites, create freeform notes, and store card information with ease. The standout feature? All your data, including passwords, is encrypted, ensuring maximum security and user-centric decryption.

  • Health (/health)

    • Route to check the application's status.
  • Users (/users)

    • Account Creation:
      • Users can create accounts by providing a valid email and a secure password.
    • Account Access:
      • Users can log in using their email and password.
      • After successful login, they receive a JWT token for authentication in all future requests.
  • Credentials (/credentials) 🔒

    • Credential Creation:
      • Users can store login information for websites and services.
    • Credential Retrieval:
      • Users can list all their credentials or retrieve a specific one by ID.
    • Credential Deletion:
      • Users can delete a credential by ID.
  • Secure Notes (/notes) 🔒

    • Secure Note Creation:
      • Users can create secure notes.
    • Secure Note Retrieval:
      • Users can list all their notes or retrieve a specific one by ID.
    • Secure Note Deletion:
      • Users can delete a note by ID.
  • Cards (/cards) 🔒

    • Card Creation:
      • Users can create secure cards.
    • Card Retrieval:
      • Users can list all their cards or retrieve a specific one by ID.
    • Card Deletion:
      • Users can delete a card by ID.
  • Erase (/erase) 🔒

    • Erases all information belonging to the user and then the record itself.

Why

This project has been a tremendous source of motivation for me due to its comprehensive nature. It encompasses a fully-fledged API structure built in Nest.js, a highly relevant and powerful technology. This endeavor has afforded me a profound understanding of this technology and the intricate art of crafting a robust REST API.

What truly sets this project apart are its well-crafted protected routes and the intricacies of the user registration process. Notably, it goes beyond the basics by featuring a rich array of endpoints and intricate business rules that add depth and complexity to the application.

In summary, this project has provided me with a learning experience, enabling me to delve deep into Nest.js, grasp the nuances of securing routes, and navigate the complexities of user registration and business logic in the context of an API.

Technologies

The following badges are the tools and technologies used in the construction of the project:

  • NestJS

  • TypeScript

  • PostgreSQL

  • Prisma

  • Supertest

  • bcrypt

  • cryptr

  • JWT

  • Swagger

How to run for development

  1. Clone this repository
  2. Install all dependencies
$ npm i
  1. Create a PostgreSQL database with whatever name you want
  2. Configure the .env file using the .env.example file (see "Running application locally or inside docker section" for details)
  3. Run all prisma migrations
$ npm run prisma:prod
  1. Run the back-end in a development environment:
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

How to run tests

  1. Follow the steps in the last section
  2. Configure the .env.test file using the .env.example file (see "Running application locally or inside docker" section for details)
  3. Run all prisma tests migrations:
$ npm run test:prisma
  1. Run test:
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.