| .. | ||
| components | ||
| lib | ||
| public | ||
| scripts | ||
| server | ||
| server_stubs | ||
| services | ||
| .env.example | ||
| .gitignore | ||
| App.tsx | ||
| CODEX_IMPLEMENTATION.md | ||
| constants.tsx | ||
| index.html | ||
| index.tsx | ||
| metadata.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| types.ts | ||
| vite.config.ts | ||
InfraFabric Red Team — Shadow Dossiers (Front-End)
A minimalist React + Vite publication hub for InfraFabric’s “Shadow Dossiers” drops:
- serious, paper/ink layout
- staged/publication statuses (draft/scheduled/live)
- verifiability hooks (evidence index + optional SHA-256 + size)
- no client-side model keys (roast generator is feature-flagged and calls a server endpoint)
Local dev
Prereqs: Node.js 18+
npm install
npm run dev
Open: http://localhost:3000
Production (self-host)
npm install
npm run build
PORT=8080 npm run start
Environment variables
Create .env.local from .env.example:
-
VITE_PUBLIC_BASE_URL
Optional. When set (e.g.https://infrafabric.io) it will prefix dossierpdfPath/evidencePath. -
VITE_ENABLE_ROAST
Defaults tofalse. Whentrue, renders the Roast Generator UI which callsPOST /api/roast.
Private upload (internal)
The server exposes a token-gated upload flow that generates a shadow dossier via the revoice pipeline:
- Set server env:
PRIVATE_UPLOAD_TOKEN(required)PRIVATE_UPLOAD_STYLE(optional, defaultif.dave.v1.2)PRIVATE_UPLOAD_MAX_BYTES(optional, default 25MB)
- Open:
/private/<PRIVATE_UPLOAD_TOKEN>
Staging behavior (important)
This bundle is pre-launch. Dossier buttons are gated by dossier.status:
draft/scheduled: download + evidence links remain disabled, and the UI shows “staged.”live: links activate (and optional SHA-256/bytes render if populated).
Update dossier status and paths in constants.tsx.
Codex/server implementation checklist
See CODEX_IMPLEMENTATION.md for the complete checklist and stubs.
Quick summary:
- Publish PDFs and evidence pages at:
/static/hosted/<dossier>.pdf/static/hosted/evidence/index.html
- Set
VITE_PUBLIC_BASE_URLin the deployment environment if needed. - (Optional) Implement
POST /api/roastserver-side and setVITE_ENABLE_ROAST=true.
Hash helper
Compute SHA-256 + bytes for a PDF and paste into the dossier entry:
node scripts/hash.mjs /path/to/file.pdf