Documentation

Guides and references

Admin

Admin

Admin panel — Team, API Keys, Activity Logs.

Overview

The admin section is for team owners and admins. Routes under /admin:

RouteDescription
/admin/teamTeam management, invite members
/admin/api-keysCreate and manage API keys
/admin/activityActivity log / audit trail
Admin → API Keys

Team Management

app/(dashboard)/admin/team/page.tsx

  • List team members
  • Invite new members via email
  • Remove members
  • Uses components/team-member-invite.tsx

API Keys

app/(dashboard)/admin/api-keys/page.tsx

  • List API keys
  • Create new keys
  • Revoke/delete keys
  • Keys are hashed (SHA-256) before storage — plain key shown only on creation

Components: components/api-key-manager.tsx

API routes: GET/POST /api/keys, GET/DELETE /api/keys/[id]

Activity Logs

app/(dashboard)/admin/activity/page.tsx

  • Audit trail of user actions
  • Uses components/activity-log-table.tsx or recent-activity-table.tsx

Permissions

Admin routes are protected by the dashboard layout. Typically only owners or admins should access. Add role checks in the layout or page if you need stricter control.

Next Steps