Architecture & Scaffold

Overview

A custom blockchain explorer purpose-built for the Oeconomia Protocol Pantheon. Unlike generic explorers (Etherscan), this explorer understands your protocol-specific smart contract interactions and decodes them into human-readable activity across all five protocols.


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

Core RPC (eth_call, eth_getTransactionReceipt)

Fetch raw tx data on-demand

30M CU/month

Enhanced API (alchemy_getTokenBalances)

Wallet token balances

Included

Enhanced API (alchemy_getAssetTransfers)

Transaction history by wallet

Included

Alchemy Notify (Webhooks)

Real-time event streaming

Included (5 webhooks)

Alchemy Token API

Token metadata + prices

Included

Webhook Setup (one per protocol group)

ABI Decoder Service


Frontend Pages & Components

Page Structure

Key Components


Tech Stack Summary

Layer
Technology
Why

Frontend

React + TypeScript + Tailwind

Already your stack for the ecosystem

Charts

TradingView (Eloqura) + Recharts (metrics)

TradingView already integrated

Backend

Node.js + Express

JS everywhere, fast development

Database

PostgreSQL

Better for relational queries + JSONB for flexible decoded data

Cache

Redis

Fast lookups + pub/sub for live updates

Blockchain Data

Alchemy SDK + Webhooks

Free tier sufficient, enhanced APIs save dev time

Real-time

WebSocket (ws or socket.io)

Live transaction feed to frontend

Hosting

VPS (DigitalOcean/Hetzner) or Vercel + Railway

$10-30/month to start


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

Alchemy Free Tier

$0

VPS Hosting (backend + DB)

$10-24/month

Domain (if separate)

$12/year

Redis (managed or self-hosted on VPS)

$0 (on same VPS)

Total at launch

~$10-24/month

Scaling to 1000+ users

~$50-100/month

Last updated