Context
The /api/health/credentials endpoint already exists and checks Celo and Base contract reachability via nextTokenId. This issue proposes integrating it into a monitoring system and extending it.
Tasks
1. Uptime Monitoring
2. Database Health
3. RPC Health
4. Monitoring Dashboard (optional)
5. Alerting on Mint Failures
6. Contract Event Monitoring
Acceptance Criteria
Context
The
/api/health/credentialsendpoint already exists and checks Celo and Base contract reachability vianextTokenId. This issue proposes integrating it into a monitoring system and extending it.Tasks
1. Uptime Monitoring
GET /api/health/credentialsevery 5 minutes.200if at least one contract is healthy,503if both are down.2. Database Health
/api/health/credentials:credential_metadatatable (e.g.,SELECT COUNT(*))db: true/falsein the responsecredential_emissiontable check (verify recent emissions exist)3. RPC Health
nextTokenIdcallcelo_rpc_msandbase_rpc_msin the response4. Monitoring Dashboard (optional)
/healthshowing:5. Alerting on Mint Failures
credential_emissionon success6. Contract Event Monitoring
CredentialMinted,CredentialRevoked,CredentialTypeRegisteredeventsCredentialRevokedeventsAcceptance Criteria
/api/health/credentialsreturns:{ celo, base, db, celo_rpc_ms, base_rpc_ms, timestamp }