Files
pwned/package.json
T
codinget fee254e7e6 Scaffold Pwned Passwords clone: React/wouter frontend, Koa/pg backend, import CLI
- Backend: Koa + @koa/router serving the HIBP-style /range/:prefix k-anonymity
  API, backed by Postgres via pg, with migrate/seed scripts run through tsx.
- Frontend: React + wouter, bundled with webpack (dev server + prod build),
  thin client that hashes passwords locally and only sends the hash prefix.
- Import package: CLI to bulk-load a wordlist or hash list into the database,
  plus a separate script to pull the full dataset from the HIBP range API.
  Both support parallelism (worker threads for wordlist hashing, concurrency
  limiter for DB/HTTP fan-out).
- Dev tooling: docker compose for a local Postgres, .env.local/.env.example,
  DATABASE_URL support as an alternative to discrete PG* vars.
2026-07-01 21:35:19 +00:00

24 lines
754 B
JSON

{
"name": "pwned",
"version": "0.1.0",
"description": "A simple validator that checks if a password is known to be pwned",
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"dev": "concurrently -n backend,frontend -c blue,green \"npm:dev -w backend\" \"npm:dev -w frontend\"",
"build": "npm run build -w backend && npm run build -w frontend",
"db:up": "docker compose --env-file .env.local up -d",
"db:down": "docker compose --env-file .env.local down",
"db:seed": "npm run seed -w backend",
"import": "npm run start -w import --",
"import:hibp": "npm run import-hibp -w import --"
},
"devDependencies": {
"concurrently": "^10.0.3",
"tsx": "^4.22.4",
"typescript": "^6.0.3"
}
}