MyClaude Docs
MyClaude Docs

Getting Started

Buyers

Creators

CLI

API

Agent Integration

Developers

ContributingSelf-HostingWebhooks & IntegrationDesign System ReferenceData Model ReferenceAdmin Panel

Security

Legal

Developers

Admin Panel

Reference for the MyClaude admin panel: role-based access, report management, product quarantine, user moderation, API routes, and audit logging.

ReferenceUpdated 2026-03-26

The MyClaude admin panel lives at /admin and requires role=admin on the authenticated user. All admin actions are audit-logged to the audit_logs Firestore collection.

Accessing the admin panel

Navigate to https://myclaude.sh/admin. The server checks the user's role via getUserRole() before rendering. Users without role=admin receive a 403 response. There is no link to the admin panel in the public navigation.

RBAC model

MyClaude uses three special roles (hardcoded by UID, not stored in Firestore) plus two Firestore-level user roles.

RoleSourcePublishPurchaseAdmin panelBan usersRemove products
userFirestoreNoYesNoNoNo
creatorFirestoreYesYesNoNoNo
verified_creatorFirestoreYes (auto-published)YesNoNoNo
moderatorHardcoded UIDYesYesNoNoNo
adminHardcoded UIDYesYesYesYesYes
ceoHardcoded UIDYesYesYesYesYes

Key constraints:

  • Moderators have zero admin panel access. Every admin API route checks if (!role || role === "moderator") and returns 403. Moderators exist for future use but currently have no elevated privileges.
  • Only admin and ceo roles can access admin operations. The isAdmin() helper checks role === "ceo" || role === "admin".
  • Verified creators bypass quarantine. Their products publish immediately as published instead of pending_review.
  • Special roles are hardcoded in src/lib/roles.ts by UID mapping, not stored in Firestore (prevents privilege escalation via database tampering).

Reports tab

Displays all content reports sorted by creation date (newest first).

Report fields

FieldTypeDescription
idstringReport document ID
typeenumproduct, review, or user
targetIdstringID of the reported product, review, or user
reporterUidstringUID of the user who filed the report
reasonstringSelected reason from the report dialog
descriptionstringFree-text description provided by the reporter
statusenumpending, resolved, dismissed
createdAttimestampWhen the report was filed
resolvedAttimestampWhen the report was resolved or dismissed (null if pending)
resolvedBystringAdmin UID who resolved the report (null if pending)

Actions

  • Resolve -- Marks the report as resolved and triggers the appropriate enforcement action (remove product, delete review, or ban user).
  • Dismiss -- Marks the report as dismissed with no enforcement action.

Both actions are recorded in the audit log.

Quarantine tab

Lists all products with status: pending_review. Products enter quarantine when a non-verified user publishes.

Actions

ActionEffect
ApproveSets product status to published. Product becomes visible in search and explore.
RemoveSets product status to removed. Product is hidden from all public surfaces.

Verified creators (verified_creator, moderator, admin) skip quarantine entirely -- their products publish as published on creation.

Users tab

Search users by username or email. Displays role, verification status, and product count.

Ban user

Banning a user triggers a cascade:

  1. User's banned field is set to true
  2. All of the user's products are set to status: removed
  3. User receives 403 Forbidden on all subsequent mutation API calls (ban check runs after token verification)

Ban requires a confirmation dialog. Only admin role can execute bans.

Admin API routes

All admin routes require Authorization: Bearer {token} with a decoded user whose role passes the getUserRole() check.

MethodPathDescriptionRequired roleRate limitMode
GET/api/admin/reportsList all reportsadmin, ceo30/minstandard
POST/api/admin/reports/[id]/resolveResolve or dismiss a reportadmin, ceo10/minstrict
POST/api/admin/products/[id]/approveApprove a quarantined productadmin, ceo10/minstrict
POST/api/admin/products/[id]/removeRemove a product (cascade)admin, ceo10/minstrict
POST/api/admin/users/[id]/banBan a user (cascade products)admin, ceo5/minstrict

Mutation routes use strict (fail-closed) rate limiting — if the rate limiter fails, the request is denied. The reports list endpoint uses standard (fail-open) mode at a higher limit since it is read-only.

Audit logging

Every admin action writes a document to the audit_logs collection.

FieldTypeDescription
actionstringThe action performed (e.g., resolve_report, approve_product, ban_user, remove_product, dismiss_report)
adminUidstringUID of the admin who performed the action
targetIdstringID of the affected resource (report, product, or user)
timestamptimestampWhen the action was performed

Audit logs are append-only. There is no API to delete or modify audit log entries.

Security model

ControlImplementation
AuthenticationFirebase JWT verified via admin.auth().verifyIdToken()
AuthorizationgetUserRole() checks role on every request; fail-closed
Rate limiting5-30/min per user. Mutations use strict mode (blocks on limiter failure).
RBAC granularityDestructive operations (ban, remove) restricted to admin only
Audit trailAll actions logged to audit_logs with admin UID and timestamp

Related pages

  • Security Model -- authentication and authorization architecture
  • Content Reporting -- how users file reports
  • Trust & Safety -- enforcement policy and dispute resolution
  • API Overview -- base URL, error format, rate limiting

Data Model Reference

Complete Firestore data model for MyClaude: 13 collections, all fields, subcollections, indexes, security rules, and data flow diagrams.

Security Model

How MyClaude protects user accounts, product files, payment data, and marketplace integrity through layered security controls.

On this page

Accessing the admin panelRBAC modelReports tabReport fieldsActionsQuarantine tabActionsUsers tabBan userAdmin API routesAudit loggingSecurity modelRelated pages