Architecture & Scaffold
System Diagram
┌───────────────────────────────────────────────────────────┐
│ React Frontend │
│ (Vite + TypeScript + Tailwind + Wagmi + Recharts) │
│ │
│ Swap │ Liquidity │ Dashboard │ Examine │ Buy/Sell │ Bridge│
└───┬───────────────────────────────┬────────────────────────┘
│ │
│ Contract Reads/Writes │ Market Data
│ (Wagmi / Viem) │ (Netlify Functions)
▼ ▼
┌────────────────────┐ ┌──────────────────────────────────┐
│ Sepolia RPC │ │ Netlify Serverless Functions │
│ (Alchemy) │ │ (26 endpoints) │
│ │ │ │
│ Eloqura V2 AMM │ │ - Token data & history │
│ ┌──────────────┐ │ │ - Live Coin Watch sync │
│ │ Factory │ │ │ - Volume analytics │
│ │ 0x1a4C... │ │ │ - Portfolio tracking │
│ └──────────────┘ │ └──────────┬────────────────────────┘
│ ┌──────────────┐ │ │
│ │ Router │ │ ▼
│ │ 0x3f42... │ │ ┌──────────────────────┐
│ └──────────────┘ │ │ PostgreSQL (Neon) │
│ │ │ Drizzle ORM │
│ Uniswap V3 │ │ │
│ ┌──────────────┐ │ │ - Token snapshots │
│ │ QuoterV2 │ │ │ - Price history │
│ │ 0xEd1f... │ │ │ - LCW coin cache │
│ └──────────────┘ │ └──────────────────────┘
│ ┌──────────────┐ │
│ │ SwapRouter02 │ │
│ │ 0x3bFA... │ │
│ └──────────────┘ │
└────────────────────┘Multi-Tier Quote System
Frontend Structure
Backend Structure
Key Design Decisions
Last updated