Architecture & Scaffold
Overview
System Architecture
┌─────────────────────────────────────────────────────────────┐
│ FRONTEND (React/TypeScript) │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌───────────────┐ │
│ │ Explorer │ │ Wallet │ │ Protocol │ │ TradingView │ │
│ │ Search │ │ Portfolio│ │ Dashboards│ │ Integration │ │
│ └──────────┘ └──────────┘ └──────────┘ └───────────────┘ │
│ │ │
│ Oeconomia UI Kit │
└─────────────────────┬───────────────────────────────────────┘
│ REST API / WebSocket
┌─────────────────────▼───────────────────────────────────────┐
│ BACKEND (Node.js / Express) │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌─────────────────────┐ │
│ │ API Server │ │ Event Decoder│ │ Webhook Listener │ │
│ │ (REST + WS) │ │ (ABI Parser) │ │ (Alchemy Notify) │ │
│ └──────────────┘ └──────────────┘ └─────────────────────┘ │
│ │ │
│ ┌──────────────────────▼────────────────────────────────┐ │
│ │ Transaction Indexer Service │ │
│ │ - Listens for events from all 5 protocol contracts │ │
│ │ - Decodes raw tx data using protocol ABIs │ │
│ │ - Classifies by protocol (Alluria/Eloqura/etc.) │ │
│ │ - Stores decoded data in database │ │
│ └───────────────────────────────────────────────────────┘ │
└─────────────────────┬───────────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────────┐
│ DATA LAYER │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌───────────────────┐ │
│ │ PostgreSQL │ │ Redis │ │ Alchemy API │ │
│ │ (Primary DB) │ │ (Cache + │ │ (RPC + Enhanced │ │
│ │ │ │ Pub/Sub) │ │ APIs + Webhooks)│ │
│ └──────────────┘ └──────────────┘ └───────────────────┘ │
└─────────────────────────────────────────────────────────────┘Data Flow
1. Real-Time Event Ingestion
2. User Query Flow
Database Schema (PostgreSQL)
Core Tables
Protocol-Specific Views
Alchemy Integration Details
Services to Use
Alchemy Service
Purpose
Free Tier Limit
Webhook Setup (one per protocol group)
ABI Decoder Service
Frontend Pages & Components
Page Structure
Key Components
Tech Stack Summary
Layer
Technology
Why
Build Phases
Phase 1: Core Explorer (Weeks 1-2)
Phase 2: Real-Time + Protocol Dashboards (Weeks 3-4)
Phase 3: Advanced Features (Weeks 5-6)
Phase 4: Polish + Integration (Week 7-8)
Monthly Cost Estimate
Item
Cost
Last updated