Design-intent reference and simulation. Not a shipped product, not a medical device, no clinical claims.

Docs home | API reference

Deployment plan

Cloudflare (live target)

  • Workers: secgenix-control-plane on api.secgenix.com, secgenix-edge on edge.secgenix.com, static asset Workers secgenix-site, secgenix-demo, secgenix-admin on secgenix.com, demo.secgenix.com, admin.secgenix.com. Custom domains create the DNS records.
  • Data: D1 secgenix-<env> (events, policies, receipts), KV secgenix-<env>-bundles. Queues optional behind flag cp.queues.
  • Secrets: POLICY_SIGNING_KEY (control plane), EDGE_SIGNING_KEY (edge) via wrangler secret put. Generated once per environment into .secrets/<env>.json (gitignored, mode 600). Production path: KMS or HSM custody.
  • Command: CLOUDFLARE_API_TOKEN=... CLOUDFLARE_ACCOUNT_ID=... npm run deploy:cf -- prod
  • Token permissions (account): Workers Scripts Edit, D1 Edit, Workers KV Storage Edit, Queues Edit (only if cp.queues on). Zone secgenix.com: Workers Routes Edit, DNS Edit.
  • Environments: dev (local), staging (*-staging names), prod. Terraform in infra/terraform/cloudflare describes the same resources for teams that prefer IaC state over the script.
  • AWS (portable path, not applied)

  • Edge: container image from packages/edge/Dockerfile on ECS Fargate behind an NLB, or as a sidecar task.
  • Control plane: Lambda with the router, DynamoDB tables, S3 bundle bucket, SQS for notifications, KMS signing key. Adapter is stubbed. Terraform in infra/terraform/aws is plan level.
  • Portable

  • Node container for the edge and control plane (memory adapter today; Postgres adapter is the next port).
  • Same core package in every runtime, so decisions and receipts are identical everywhere.
  • Rollback

  • Workers: wrangler rollback per script. Policy: publish the previous document as a new version (edges refuse version rollback by design).