URLs
Identifiers
Worker endpoints
Edge Functions
All functions set
verify_jwt = false in config.toml and verify Clerk tokens (or
webhook signatures) themselves — the platform gateway cannot validate Clerk JWTs.
Tables (schema codex)
orgs, members, user_profiles, domains, rfcs, rfc_versions, statements,
audit_log, rfc_comments, role_groups, role_group_members, api_keys,
github_installations, service_checks, pending_checks, pending_scans,
repo_coverage, violations, llm_calls, org_llm_config, org_subscriptions,
website_leads, email_subscribers, email_sends, email_events.
Details: Database schema.
Invariants (never violated by any support action)
audit_logis append-only and hash-chained (entry_hash = sha256(prev_hash || canonical_json(entry))); orgs are retired, never deleted.rfc_versionsrows are immutable;body_mdholds the full composed document including the YAML frontmatter block.- Statement slugs are stable forever; removed statements are
retired, not deleted. - Every tenant table has
org_id+ RLS; identity in SQL iscodex.current_user_id()(Clerkuser_…), neverauth.uid(). - One GitHub App installation belongs to exactly one org (
github_installationsunique on bothorg_idandinstallation_id). - Migrations are additive; the six deployables each need their own deploy step.
Roles and gates
Resend account (email)
7 custom events (codex:*), 7 automations, 14 templates, 1 segment (“General”), 1
webhook (resend-webhook, full event set). Full as-built with automation diagrams
and known gaps: Resend environment.
Environment variables (names only; values never in the repo)
- Worker (8, exactly):
SUPABASE_URL,SUPABASE_SECRET_KEY,OPENAI_BASE_URL,OPENAI_API_KEY,MODEL,GITHUB_APP_ID,GITHUB_APP_PRIVATE_KEY,GITHUB_WEBHOOK_SECRET - Functions:
CLERK_SECRET_KEY,CODEX_SECRET_KEY, webhook signing secrets (see the functions table),GROWTH_INTERNAL_CLERK_ORG_ID,DEMO_CLERK_ORG_ID,DEMO_ADMIN_CLERK_ORG_ID,RESEND_API_KEY, LLM fallback trio - SPA builds (
VITE_*, per Pages project):VITE_CLERK_PUBLISHABLE_KEY,VITE_SUPABASE_URL,VITE_SUPABASE_PUBLISHABLE_KEY,VITE_APP_URL,VITE_SITE_ORIGIN,VITE_GROWTH_API_BASE,VITE_DEMO_API_BASE,VITE_DEMO_APP_URL,VITE_GITHUB_APP_URL,VITE_CAL_DEMO_URL

