Skip to content

app/(dashboard)/settings/page.tsx

Purpose

Project settings and API key management (create/revoke/copy).

Public Surface

  • Uses route /settings.
  • Mutations: api.apiKeys.create, api.apiKeys.revoke.
  • Queries: api.apiKeys.listByProject.

Behavior & Invariants

  • Full API key is displayed only once and cached ephemerally.
  • Keys show usage count and last used timestamps.

Dependencies

  • Clerk user/org, components/project-selector, Convex mutations/queries.

Security & Privacy

  • Full keys are not retrievable after creation; UI enforces short display window.

TODO / Technical Debt

  • Server‑side usage of apiKeys.recordUsage on ingestion.
  • Add permissions scope to API keys.