Skip to content

evmts/voltaire-effect-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uniswap V2 Indexer Demo

View the generated implementation - Complete working code generated by Claude from this specification.

A production-ready Uniswap V2 indexer built entirely by AI agents.

What Is This?

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.

Quick Start

# 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.md

What happens:

  1. Agent creates package.json, tsconfig.json, configs (~2 min)
  2. Agent runs .ralph/main.tsx to build the indexer (~30-60 min)
  3. 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...

What Gets Built?

  • 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

Tech Stack

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

Requirements

  • 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)

How It Works

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   PROMPT.md     │────▶│   AI Agent      │────▶│  .ralph/        │
│   (The Spec)    │     │   (Bootstrap)   │     │  (Auto Loop)    │
└─────────────────┘     └─────────────────┘     └─────────────────┘
                                                        │
                                                        ▼
                                               ┌─────────────────┐
                                               │  Generated Code │
                                               │  - src/         │
                                               │  - tests/       │
                                               │  - web/         │
                                               └─────────────────┘
  1. You run an AI agent with PROMPT.md
  2. The agent bootstraps dependencies and configs
  3. Ralph (the autonomous loop) implements the indexer phase by phase
  4. The agent monitors progress and verifies completion

Project Philosophy

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

Related Projects

License

MIT

About

Voltaire Effect example repository

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •