Skip to content

[Backend] Event-driven indexer service #39

Open

Description

@Gbangbolaoluwagbemiga

Problem

The frontend reconstructs state by polling RPC/Horizon (see #9). This is laggy, RPC-heavy, and can't
power search, leaderboards, or off-chain reputation aggregation. An indexer that consumes the
contract events (#5) solves all of these.

What needs to be done

  • Service that ingests SecureFlow contract events (from [Contract] Emit structured events for all state transitions #5) — e.g. subscribe to Horizon/RPC,
    decode XDR, persist to a database (Supabase already in the stack)
  • Tables for escrows, milestones, applications, ratings, disputes — kept in sync from events
  • Read API for the frontend: list/search jobs, dashboard aggregates, reputation rollups
  • Backfill from genesis + resume from last-processed ledger (idempotent, handles reorgs)

Acceptance criteria

  • Indexer stays in sync with on-chain state (verified against direct contract reads)
  • Frontend dashboards/search read from the indexer, not raw polling
  • Restart resumes without gaps or double-processing

Relevant files

backend/src/, supabase/migrations/, consumes events from #5; unblocks #9

Depends on #5 (events).

Activity

  1. changed the title [-]Event-driven indexer service[/-] [+][Backend] Event-driven indexer service[/+] on Jun 17, 2026
  2. Ranjeet2063 commented on Oct 6, 2026

    @Ranjeet2063

    Hello maintainers,

    I am interested in taking up [Backend] Event-driven indexer service.

    Plan:

    1. Audit storage layout and state invariants ensuring strict auth guards.
    2. Implement deterministic state transitions with safe checked arithmetic.
    3. Add hermetic unit and regression tests covering authorized, unauthorized, and boundary edge cases.
    4. Profile instruction and CPU/gas limits under Soroban host environment.

    I can deliver a clean, tested PR within 24 hours. Please assign!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendNode/Supabase backendfeatureNew product capability

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions