Skip to content

[Feature] Build Admin Dashboard with Protocol Management, Fee Configuration, and Multi-Sig Interface #17

Description

@KarenZita01

Description

The frontend has no admin panel or DAO governance interface. For the EquipChain protocol, administrators need interfaces for: managing meter registrations, configuring tariff rates, adjusting fee schedules, managing oracle addresses, overseeing the insurance pool, and monitoring protocol health metrics. Without an admin panel, all configuration must be done directly through contract calls.

Admin panel gaps:

  • No admin dashboard showing protocol-wide metrics
  • No tariff rate configuration interface
  • No fee schedule management (platform fees, tiered fees)
  • No oracle management (validators, price feeds, staleness monitoring)
  • No user management (view users, freeze accounts, manage roles)
  • No contract upgrade interface (propose upgrades, view history)
  • No multi-sig proposal management (create, vote, execute)
  • No gas buffer monitoring across all providers
  • No insurance pool oversight (claims review, pool health)
  • No system logs/event viewer

Technical Context & Impact

  • Affected Components/Files: app/admin/ (missing), src/components/admin/ (missing)
  • Impact: Protocol administration requires direct blockchain interaction; poor DAO governance UX

Step-by-Step Implementation Guide

  1. Create admin layout: app/admin/layout.tsx with admin-specific sidebar and admin-only route guard
  2. Build admin pages:
    • /admin - Protocol overview with KPI cards (active meters, streams, TVL 24h volume)
    • /admin/meters - All meters with admin actions (force close, adjust balance)
    • /admin/fees - Fee schedule configuration with preview of changes
    • /admin/oracle - Oracle health dashboard, price feed management, validator management
    • /admin/users - User list with freeze/unfreeze, role assignment
    • /admin/insurance - Insurance pool oversight, claims review queue
    • /admin/upgrades - Contract upgrade proposal and execution
    • /admin/multi-sig - Multi-sig proposal creation, voting, execution
    • /admin/events - System event log viewer with filtering
  3. Implement admin-only middleware: src/middleware.ts checking isAdmin role from contract
  4. Create admin components: ActionPanel, UserRow, MeterAdminCard, FeeConfigForm, OracleStatusCard
  5. Add admin audit log: All admin actions logged to local state for audit trail
  6. Implement confirmation for destructive actions: Force close meter, freeze user, adjust balance all require multi-step confirmation
  7. Add admin API key management: If backend API requires admin tokens, provide management interface

Verification & Testing Steps

  1. Test admin route: non-admin user -> redirected/blocked
  2. Test fee configuration: change fee -> see preview of impact -> confirm -> verify on-chain
  3. Test multi-sig proposal: create proposal -> sign with 2nd key -> execute
  4. Test insurance claims review: approve and reject claims from queue
  5. Test event log: filter by event type, date range, and user address
  6. Run npx tsc --noEmit

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions