New db.js opens data.sqlite (node:sqlite's DatabaseSync — a Node 24
built-in, experimental but functional) and creates the users/sessions
tables per dressup-dance-room-mvcp.md M.1/M.10. Zero new npm
dependency: no bcrypt/argon2 (node:crypto's scryptSync covers password
hashing in T19), no better-sqlite3, no package.json needed.
Mirrors store.js's ergonomics (create/get/update, plain JS objects in
and out — booleans and the oauthProviders array marshalled to/from
SQLite's TEXT/INTEGER columns internally) rather than reaching for an
ORM. Exports the openDb/createUsersStore/createSessionsStore factories
alongside a default singleton so tests can point at an isolated tmp
file instead of the real data.sqlite (same pattern
dressup-generate.test.js uses for library.json).
data.sqlite is gitignored under the secrets section, not the "runtime
state" one — unlike library.json it holds real credential material
(password hashes, session tokens), not just regenerable content.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Deddn3sM3oQnmvqWSMb4y