π΄ Critical Β· .kiro/specs/contract-event-indexing/ (currently empty), issues #22/#23 above
Description
There is an empty spec directory literally named contract-event-indexing, confirming the team has already identified this gap but not yet scoped or built it. As demonstrated concretely by issue #22 (the 100-event hard cap silently truncating the explorer) and #23 (sequential pagination latency), the frontend's entire data layer is built on live, synchronous RPC calls to Soroban/Horizon with a thin, short-TTL, unbounded in-memory cache (#21) as the only persistence β there is no off-chain service that ingests factory events once and serves fast, complete, paginated, filterable queries over them. This architecture fundamentally cannot scale past a few hundred tokens without either the truncation bug (#22) or unacceptable load times (#23), and every RPC-endpoint outage or rate-limit event (#34) takes down the entire app's data-reading capability simultaneously, since there's no cached fallback layer.
Tasks
Acceptance Criteria
π΄ Critical Β·
.kiro/specs/contract-event-indexing/(currently empty), issues #22/#23 aboveDescription
There is an empty spec directory literally named
contract-event-indexing, confirming the team has already identified this gap but not yet scoped or built it. As demonstrated concretely by issue #22 (the 100-event hard cap silently truncating the explorer) and #23 (sequential pagination latency), the frontend's entire data layer is built on live, synchronous RPC calls to Soroban/Horizon with a thin, short-TTL, unbounded in-memory cache (#21) as the only persistence β there is no off-chain service that ingests factory events once and serves fast, complete, paginated, filterable queries over them. This architecture fundamentally cannot scale past a few hundred tokens without either the truncation bug (#22) or unacceptable load times (#23), and every RPC-endpoint outage or rate-limit event (#34) takes down the entire app's data-reading capability simultaneously, since there's no cached fallback layer.Tasks
.kiro/specs/contract-event-indexing/spec: define whether the indexer is a simple serverless cron job periodically ingesting events into a lightweight database (e.g. a Cloudflare D1/Vercel Postgres table ofTokenInforows keyed by contract address, kept in sync via periodicgetEventspolling or a Soroban RPC event subscription if available), or a more substantial dedicated service.GET /api/tokens?creator=&offset=&limit=,GET /api/tokens/:address) mirroring but not replacing the on-chain view functions (the indexer is a read-optimization layer, not a source of truth β the frontend should still be able to fall back to direct RPC calls if the indexer is unavailable or the user wants to verify against the chain directly).Acceptance Criteria
contract-event-indexingspec.