Files
pwned/packages/backend/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

29 lines
751 B
JSON

{
"name": "backend",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "dist/index.js",
"scripts": {
"dev": "tsx watch --env-file=../../.env.local src/index.ts",
"build": "tsc -p tsconfig.json",
"start": "node --env-file=../../.env.local dist/index.js",
"migrate": "tsx --env-file=../../.env.local src/migrate.ts",
"seed": "tsx --env-file=../../.env.local src/seed.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@koa/router": "^15.6.0",
"koa": "^3.2.1",
"pg": "^8.22.0"
},
"devDependencies": {
"@types/koa": "^3.0.3",
"@types/koa__router": "^12.0.5",
"@types/pg": "^8.20.0"
}
}