drivenpass-api

DrivenPass - Server

This project is a sensitive data management application, developed with the goal of providing functionalities to create, access, and delete user account information, credentials, secure notes, cards, and Wi-Fi passwords. It is designed to ensure data security and user privacy.

Sumary

  1. API Documentation
  2. Project Main Stacks
  3. How to Run
  4. Testing
  5. Routes and Functionalities
  6. Contributions

Documentation

Project Main Stacks:

![NestJS](https://img.shields.io/badge/nestjs-%23E0234E.svg?style=for-the-badge&logo=nestjs&logoColor=white) ![Prisma](https://img.shields.io/badge/Prisma-3982CE?style=for-the-badge&logo=Prisma&logoColor=white) ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white) ![ESLint](https://img.shields.io/badge/ESLint-4B3263?style=for-the-badge&logo=eslint&logoColor=white) ![Prettier](https://img.shields.io/badge/-Prettier-blue?style=for-the-badge) ![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white) ![supertest](https://img.shields.io/badge/-supertest-orange?style=for-the-badge) ![JWT](https://img.shields.io/badge/JWT-black?style=for-the-badge&logo=JSON%20web%20tokens) ![bcrypt](https://img.shields.io/badge/-bcrypt-green?style=for-the-badge) ![cryptr](https://img.shields.io/badge/-cryptr-green?style=for-the-badge)

How to Run

To run this application, follow these steps:

  1. Clone the repository to your local machine.

    git clone https://github.com/wesleymichael/drivenpass-api.git
    
  2. Install project dependencies:

    npm install
    
  3. Configure environment variables:
    • Make a copy of the .env.example file and configure the environment variable for development as .env.development.
  4. Apply database migrations using Prisma in a development environment:
    npm run dev:migration:generate
    npm run dev:migration:run
    
  5. Start the application:
    npm run start:dev
    
  6. Documentation
    • After running the application at http://localhost:4000, the documentation will be available at http://localhost:4000/api
    • Ensure you configure the database and other settings as appropriate before using the application in a production environment. Refer to the documentation for more details on configurations and additional features.

Testing

  1. Configure environment variables:
    • Make a copy of the .env.example file and configure the environment variable for testing as .env.test.
  2. Apply database migrations using Prisma in a test environment:

     npm run test:migration:generate
     npm run test:migration:run
    
  3. Run the following commands:
     # e2e tests
     $ npm run test:e2e
    
     # test coverage
     $ npm run test:e2e:cov
    


Routes and Functionalities

❤️ Health (/health)

👤 Users (/users)

🔑 Credentials (/credentials)

✏️ Secure Notes (/notes)

💳 Cards (/cards)

📶 Wi-Fi (/wifi)

🗑️ Delete Account and All User Data (/erase)

Contributions

Contributions are welcome! Feel free to open issues and send pull requests to improve this project.