Credible Layer dApp Platform
Home · Generic Index · Chain Overlays
This document covers the credible-layer-dapp monorepo (Next.js app, API, Ponder indexer, Supabase data model, and Inngest background jobs).
Platform Architecture
Key code paths:
- API contracts and routers:
credible-layer-dapp/packages/dapp-api/src/v1/ - Inngest functions:
credible-layer-dapp/packages/inngest/src/functions/ - Ponder indexer:
credible-layer-dapp/apps/indexer/ - Supabase schema:
credible-layer-dapp/apps/dapp/supabase/schemas/ - Chain profiles:
credible-layer-dapp/packages/config/chains/profiles/ - Inngest route:
credible-layer-dapp/apps/dapp/src/app/api/inngest/route.ts
Notes:
- The dApp API uses Assertion DA URLs from chain profiles for assertion metadata and reconciliation.
- System status checks are currently circuit-broken in the API and return 403 instead of probing DA or RPC.
- The indexer persists to its own Ponder database and exposes a GraphQL API consumed by the UI.
- Manual verification flows query and update Airtable records.
- Supabase access is server-side (App Router/ts-rest/Inngest), not direct from the browser.
- The UI interacts with on-chain contracts via wallet RPC configured by chain profiles.
- The API also exposes auth, projects, assertions, transfers, calldata, integrations, incidents, public, and misc routes (see below).
- Inngest runs additional jobs for enforcer status, history cleanup, assertion promotion, staging cleanup, chain checks, and critical alerts.
- Ponder indexes both production and staging State Oracle addresses when configured by chain profiles.
- CLI authentication uses a device flow: the CLI requests an OTP, the user verifies via the dApp device page, and the CLI polls for tokens.
- Staging cleanup jobs use an admin key to call
removeAssertionagainst the staging State Oracle via RPC. - Chain landing checks use RPC receipt queries to mark invalidating transactions as landed or not.
API Surface Map
Background Jobs and Ops
Incident Processing Flow
Indexing Flow (State Oracle)
The indexer uses the active chain profile (see packages/config/chains) to configure the contract addresses, RPC URLs, and start blocks.
Transparency views also use the public incidents API for incident removals (see docs/generic/indexer-transparency.md).
API Authentication
- Enforcer API: uses API keys (
ENFORCER_API_KEY_*) to authenticate sidecar/enforcer callers. - Tracer API: uses API keys (
TRACER_API_KEY_*) to authenticate tracer callbacks. - Enforcer and tracer endpoints immediately enqueue work in Inngest and return 202 Accepted.
Next: debug tracing details in docs/generic/tracer-service.md.