Monorepo for the OOPS! senior thesis project.
oops/
├── frontend/ # Angular 21 (standalone, SCSS, signals)
├── backend/ # Express + Mongoose + MongoDB Atlas (TypeScript)
└── api/ # Vercel serverless wrapper around the Express app
| # | Feature | Status |
|---|---|---|
| 1 | Dictionary check (rockyou.txt subset) | ✓ |
| 2 | Entropy calculation | ✓ |
| 3 | GPU Attack crack-time estimate | ✓ |
| 4 | Register + Email-OTP + Google Authenticator (TOTP) | ✓ |
| 5 | Vault — AES-256-GCM client-side, zero-knowledge | ✓ |
| 6 | Image upload for vault entries | ✓ |
| 7 | Admin / SuperAdmin user management | TODO |
- No login — checker only, menu clicks redirect to /register
- Member — checker + own vault (CRUD)
- Admin — manage members (delete/disable)
- SuperAdmin — manage admins, cannot delete self
cd backend
npm install
cp .env.example .env # then fill in MONGO_URI + JWT_SECRET + email provider
npm run devcd frontend
npm install --legacy-peer-deps
npm startOpen http://localhost:4321 — Angular proxies /api/* to backend on 3100.
-
Push this repo to GitHub.
-
Go to https://vercel.com/new → Import your GitHub repo → keep all defaults.
-
Project Settings → Environment Variables — add these:
Name Example Required MONGO_URImongodb+srv://user:pass@cluster.mongodb.net/oops✅ JWT_SECRETopenssl rand -hex 32✅ EMAIL_PROVIDERgmailorresendorconsole✅ GMAIL_USERyou@gmail.comif EMAIL_PROVIDER=gmailGMAIL_APP_PASSWORD16-char app password if EMAIL_PROVIDER=gmailRESEND_API_KEYre_xxxif EMAIL_PROVIDER=resendEMAIL_FROMOOPS! <you@example.com>recommended CORS_ORIGINhttps://your-app.vercel.appoptional (defaults *) -
Hit Deploy. Vercel will:
- Install root deps (backend libs)
- Run
vercel-build→ installs and builds the Angular frontend - Detect
api/[...slug].tsas a serverless function (catches all/api/*) - Configure rewrites:
/api/*→ function, everything else →index.html(SPA fallback)
- The serverless function wraps the full Express app. First request after a cold start is slow (~1 s) because Mongo connects then; subsequent requests reuse the cached connection.
MONGO_URImust allow connections from anywhere (Atlas → Network Access →0.0.0.0/0) since Vercel functions run from rotating IPs.
- Vault encryption: AES-256-GCM with key derived client-side via PBKDF2 (200k iters, SHA-256). The server stores only opaque ciphertext + IV — even with full DB access, an admin cannot read user secrets.
- Auth: JWT (
jose) for sessions, argon2 for admin passwords, TOTP (otplib) for Google Authenticator. - Email: pluggable provider —
console(dev),resend(API),gmail(SMTP).