- Single-package Vite + React 19 + TypeScript app. No monorepo, no backend in this repo.
- Use
npm, notpnpmoryarn: the repo haspackage-lock.jsonandnode_modules/. - Main entrypoint is
src/main.tsx;src/App.tsxjust switches between the encrypt and decrypt wizards.
npm run devstarts the Vite dev server.npm run lintruns the only lint step:eslint ..npm run buildis the closest thing to typecheck+build: it runstsc -b && vite build.- There is no
testscript and no CI workflow checked into the repo.
- For code changes, run
npm run lintandnpm run build. - There is no separate
typecheckscript;npm run buildalready performs TypeScript project builds.
- Encryption flow lives in
src/components/encryption/; decryption flow lives insrc/components/decryption/. - Shared core logic is in
src/lib/:crypto.tsx: browser Web Crypto encryption/decryption.payload.ts: raw payload serialization/parsing.remoteServer.ts: remote payload fetch/store API client.
- UI primitives under
src/components/ui/are local shadcn-style components, not an external generated package.
- The encryption key is derived from answers only, in order, via
buildPassphrase()insrc/components/encryption/qaUtils.ts: answers are trimmed and joined with||. Changing answer order or normalization breaks decryption compatibility. - Payloads are plain text built by
buildPayloadContent()insrc/lib/payload.ts: a---header block withlabelandquestions, then ciphertext as the body. parsePayload()currently validates only the header separators,label, question list items (- ...), and ciphertext body. It does not enforceversionorcheck, even though encryption writes them.- Decrypt entrypoints are
PastePayload,FileUpload, andUrlFetch; keep all three flows working when touching payload parsing.
- Remote fetch/store is hard-coded in
src/lib/remoteServer.tsto these endpoints on the user-supplied base URL:GET /questionPOST /retrievewith{ answer }POST /storewith{ question, answer, payload }
- Optional API key is sent as
X-API-Keyonly when non-empty. db.jsonexists, andjson-serveris installed, but there is no repo script or in-repo server implementation matching the above contract.
- Path alias
@/*points tosrc/*viatsconfig.jsonandvite.config.ts. - Tailwind is v4-style and configured through
src/index.cssplus@tailwindcss/vite; do not look for a legacytailwind.config.js. - React Compiler is enabled through
babel-plugin-react-compilerinvite.config.ts; preserve that setup when editing build config.