Skip to content

Launch hardening: action rate-limiting, prod email fail-closed, CI e2e job, DR docs, dead-code sweep #65

Description

@teetangh

Audit leftovers mapped to #35/#39/#42:

  1. Server actions unlimited — only BetterAuth endpoints rate-limited today; checkout/refunds/redeem/import are open abuse surface. Upstash store already exists.
    • sliding-window helper + safe-action middleware; caps: checkout 10/min/user, refunds 5/hr, redeem/import 20/hr/org
    • Idempotency-Key check in createCheckout (table exists)
  2. Prod email fails open — console fallback when RESEND_API_KEY missing → silent signup breakage; @react-email installed but unused.
    • throw+Sentry in production; port verification/reset/receipt to react-email templates
  3. Playwright not in CI — add e2e job (Postgres service container, migrate+seed+run) w/ golden-path spec: signup→verify→buy→complete→quiz→certificate verify
  4. Backups/PITR undocumented — DEPLOYMENT.md DR section (Supabase PITR window, monthly restore drill, RPO/RTO)
  5. Dead exports sweep after 🔴 Core teaching loop: grading queue + file submissions + resource lessons (certificates impossible today) #57 lands (getLiveSessionEmbedData, getFermionLoginLink, requestDsaRun/getDsaRunResult, storage helpers)

Spec: temp prompt library 09-launch-hardening.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions