Skip to content
Baburam Adhikari logoBaburam Adhikari
All projects
Software Development

Secure Password Manager

Full-stack password manager: a Next.js and TypeScript client over a Django REST Framework API with JWT authentication (simplejwt). Saved passwords are stored per user in PostgreSQL, listing them requires a one-time code generated with pyotp and sent by email, and face verification runs server-side with face_recognition.

01Problem

A password manager concentrates every credential a person owns behind a single login. That makes the login a single point of failure, and it makes keeping each user's entries strictly separate from everyone else's the core job of the API.

02Objective

Build a complete application (client, API, and database) where each user can only reach their own saved passwords, showing them takes a second step beyond the login, and face verification is available as an extra check.

03Architecture

  1. Next.js
  2. REST API
  3. Django REST Framework
  4. PostgreSQL
Request path from browser to the credential store

04Technology

  • Next.js
  • TypeScript
  • Django REST Framework
  • simplejwt
  • PostgreSQL
  • pyotp
  • face_recognition
  • OpenCV

05Implementation

Key technical decisions

  1. 01Used token-based authentication (JWT via djangorestframework-simplejwt, with a refresh endpoint) so the Next.js client talks to a stateless API.
  2. 02Scoped every saved-password query to the signed-in user (filter(user=request.user)), so one account cannot list another's entries.
  3. 03Put a second check in front of the saved-password list: a time-based one-time code generated with pyotp and sent to the user's email.
  4. 04Kept face recognition as an optional extra check rather than a required factor, so the vault stays usable when conditions are poor.
  5. 05Ran face verification server-side, so the check cannot be bypassed by a modified client.
  6. 06Validated input in DRF serializers (minimum password length, normalized email) and hashed account passwords with Django's password hashers.

What was built

  • REST endpoints for signup, login, token refresh, adding a password, emailing and verifying a one-time code, and face image upload and verification.
  • JWT authentication with djangorestframework-simplejwt.
  • Email one-time code (pyotp TOTP) required before the saved-password list is returned.
  • Server-side face verification with face_recognition.
  • PostgreSQL storage for users and their saved passwords, with schema changes tracked in Django migrations.
  • Next.js 15 / TypeScript / Tailwind CSS frontend.

06Data

What PostgreSQL stores

  • User accounts
  • Saved-password records (site, password, link), each owned by a single user
  • Reference face data used for server-side verification

07What I'd change next

  • Field-level encryption for stored credentials, so secrets are not held as plaintext in the database.
  • An access/audit log recording who read or changed each credential, and when.
  • Authenticator-app TOTP as an alternative to receiving the one-time code by email.
  • Automated tests covering the login flow, ownership checks, and credential CRUD.