re-voice/site/red-team-shadow-dossiers
2025-12-29 21:55:14 +00:00
..
components Update X handle to @ShadowDossierRT 2025-12-25 12:43:39 +00:00
lib Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
public Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
scripts Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
server Dave bible: drop if:// bible citation from outputs; add source URL 2025-12-29 21:55:14 +00:00
server_stubs Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
services Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
.env.example Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
.gitignore Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
App.tsx Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
CODEX_IMPLEMENTATION.md Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
constants.tsx Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
index.html Update X handle to @ShadowDossierRT 2025-12-25 12:43:39 +00:00
index.tsx Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
metadata.json Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
package-lock.json Add token-gated private dossier upload 2025-12-25 13:27:33 +00:00
package.json Add token-gated private dossier upload 2025-12-25 13:27:33 +00:00
README.md Add token-gated private dossier upload 2025-12-25 13:27:33 +00:00
tsconfig.json Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
types.ts Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00
vite.config.ts Add red-team shadow dossiers site 2025-12-25 12:06:50 +00:00

InfraFabric Red Team — Shadow Dossiers (Front-End)

A minimalist React + Vite publication hub for InfraFabrics “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 dossier pdfPath/evidencePath.

  • VITE_ENABLE_ROAST
    Defaults to false. When true, renders the Roast Generator UI which calls POST /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, default if.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:

  1. Publish PDFs and evidence pages at:
    • /static/hosted/<dossier>.pdf
    • /static/hosted/evidence/index.html
  2. Set VITE_PUBLIC_BASE_URL in the deployment environment if needed.
  3. (Optional) Implement POST /api/roast server-side and set VITE_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