Admin
Admin
Admin panel — Team, API Keys, Activity Logs.
Overview
The admin section is for team owners and admins. Routes under /admin:
| Route | Description |
|---|---|
/admin/team | Team management, invite members |
/admin/api-keys | Create and manage API keys |
/admin/activity | Activity log / audit trail |
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.tsxorrecent-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.