View the generated implementation - Complete working code generated by Claude from this specification.
A production-ready Uniswap V2 indexer built entirely by AI agents.
An experiment in prompt-first development: the application code is generated by AI agents from a specification.
This repo contains:
- PROMPT.md - Complete build specification
- .ralph/ - Autonomous agent loop (Smithers-based)
- README.md - You're reading it
The indexer, API, and frontend are generated when you run an agent with PROMPT.md.
# 1. Clone and enter
git clone https://github.com/evmts/uniswap-indexer
cd uniswap-indexer
# 2. Run with any AI coding agent
claude "Follow PROMPT.md"
# or: amp "Follow PROMPT.md"
# or: open in Cursor and ask it to follow PROMPT.mdWhat happens:
- Agent creates package.json, tsconfig.json, configs (~2 min)
- Agent runs
.ralph/main.tsxto build the indexer (~30-60 min) - You get a working Uniswap V2 indexer with API + frontend
You'll know it's working when you see:
╔════════════════════════════════════════╗
║ RALPH AUTONOMOUS LOOP ║
╚════════════════════════════════════════╝
Focus: Phase 0: Research...
- Effect.ts Indexer - Fetches Uniswap V2 swap events from Ethereum
- SQLite Database - Stores pairs, swaps, and indexer state
- REST API - Query pairs, swaps, and indexer status
- React Frontend - Real-time display of swaps and pairs
- Prometheus Metrics - Production observability
This demo uses:
| Library | Purpose | Docs |
|---|---|---|
| Voltaire | Ethereum types & utilities | Type-safe EVM interactions |
| Voltaire Effect | Effect.ts Ethereum client | RPC with retry, fallback, typed errors |
| Smithers | AI agent orchestration | Declarative JSX for agent workflows |
| Effect.ts | Functional programming | Services, errors, streams, config |
- Bun >= 1.0 (required - install with
curl -fsSL https://bun.sh/install | bash) - An AI coding agent (Claude Code, Amp, Cursor, etc.)
- Optional: Ethereum RPC URL (uses public endpoints by default)
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ PROMPT.md │────▶│ AI Agent │────▶│ .ralph/ │
│ (The Spec) │ │ (Bootstrap) │ │ (Auto Loop) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Generated Code │
│ - src/ │
│ - tests/ │
│ - web/ │
└─────────────────┘
- You run an AI agent with PROMPT.md
- The agent bootstraps dependencies and configs
- Ralph (the autonomous loop) implements the indexer phase by phase
- The agent monitors progress and verifies completion
This demo explores a new paradigm: prompt-first development. Instead of writing code, we write specifications. The code is an artifact, regenerable from the prompt.
Benefits:
- The spec is the source of truth
- Code can be regenerated with improved agents
- Changes to requirements update the prompt, not scattered code
- Perfect for experimenting with different AI agents
- Voltaire - Type-safe Ethereum library
- Voltaire Effect - Effect.ts integration for Voltaire
- Smithers - Build AI agents with React JSX
MIT