Node based Visual Automation Tool for 0G Mainnet (Push Notifications)
WEAVE is a no-code, node-based listener for the 0G EVM chain. On a visual canvas, a builder composes a rule by choosing Network → Contract + Event → (optional) Filters → Adapter, then deploys it with one click. Behind the scenes, a Go backend embeds PocketBase, subscribes to 0G via WebSocket RPC, decodes logs using an ABI, stores matches, and pushes notifications to Discord or Telegram in real time.
The goal is day-one observability for 0G: faster dev loops, safer launches, and crisp demos without writing indexers or bots. Teams can track ERC-20 Transfer events, custom app events (e.g., Echoed(address,string)), or any ABI-described event, and pipe alerts straight to the channels they already use. WEAVE persists both rules and notifications for auditability, giving builders a simple, reliable way to “see” their contracts breathe on mainnet.
Planned next steps: field-level filters (e.g., from, to, value_gte), composite rules with time windows, more adapters (Slack, Email, signed Webhooks), retry/backoff, per-rule ABI, rule templates/marketplace, and an NL (natural-language) rule builder. The long-term vision is to become the standard listening layer for 0G—akin to how 1inch unified routing or Push unified on-chain notifications.
Frontend (web/):
Next.js 14 (App Router) + React 18 for the app shell.
ReactFlow (@xyflow/react) for the drag-and-drop canvas where users assemble listener rules.
TailwindCSS + shadcn/ui + lucide for clean, fast UI primitives.
A serializer converts the graph into a payload and POSTs it to the server’s POST /weave/add.
A Rules page lists saved rules via the PocketBase JS client (sorted by -created) and subscribes to realtime updates.
Backend (server/):
Go app embedding PocketBase (lightweight REST + DB + schema bootstrap).
On boot, it creates two collections: rules (contract, event signature, chain, filters, adapter, active) and notifications (decoded payload, block/tx metadata, status).
A custom route POST /weave/add persists rules; a delete route removes them.
go-ethereum ethclient (WS) connects to 0G’s WebSocket RPC. For each active listener rule it builds a FilterQuery with the contract address and topic keccak(eventSignature).
ABI decoding: loads abi.json; on matching logs it unpacks indexed/non-indexed params into a map, stores a notifications record, and dispatches to the chosen adapter.
Adapters:
Discord: webhook POST (expects HTTP 204).
Telegram: Bot API sendMessage with Markdown formatting.
Data flow:
Web posts a listener rule → PocketBase saves → server subscribes to logs.
Log arrives → match by address + topic → decode via ABI.
Persist notification → send alert (Discord/Telegram).
Web Rules page updates via realtime subscription.
Partner/infra:
0G mainnet WS RPC for low-latency listening.
Discord/Telegram for immediate human-in-the-loop alerting.
MVP pragmatics:
Single abi.json for decoding (per-rule ABIs planned).
Filters captured/stored; enforcement on decoded fields is the next small addition.
PocketBase bootstraps schema on first run for speed.
Demo workflow:
A tiny EchoRepeater contract (emitEcho(string) → Echoed(address,string)) is deployed on 0G to produce deterministic events during demos.
WEAVE listens to Echoed(address,string) and pushes alerts to Discord/Telegram within seconds—clean, predictable proof of end-to-end functionality.

