Architecture
How the frontend, oracle backend, and smart contract work together.
Overview
Frontier Pulse follows a three-tier architecturewith two distinct data paths. The Oracle Backend acts as the intelligence layer — it reads raw game data from the World API, computes scores and reputation, then persists results on-chain. The Frontend reads from both the live World API and the on-chain PulseRegistry to render the dashboard.
System Architecture
Frontend
Next.js 16 + React 19
API Routes
Next.js Server Routes
Oracle Backend
Node.js + cron (10 min)
World API
EVE Frontier
Sui Blockchain
PulseRegistry (Testnet)
Dual Data Paths
1. Oracle Path (Write)
- Oracle polls World API every 10 minutes
- Fetches all solar systems, smart assemblies, and killmails
- Computes system health, player reputation, global CHI, anomalies
- Writes results on-chain via batched Programmable Transaction Blocks
2. Frontend Path (Read)
- Next.js API routes serve the dashboard
- Reads galaxy data from World API (24,502 systems)
- Reads CHI and scores from Sui RPC (PulseRegistry)
- Merges both sources with priority: on-chain > live-computed > fallback
On-Chain Layer
The PulseRegistry is a shared object on Sui Testnet that stores all civilization health data. Anyone can read; only authorized oracles can write.
public struct PulseRegistry has key {
id: UID,
reputations: Table<address, PlayerReputation>, // player → trust profile
systems: Table<u64, SystemHealth>, // system → health snapshot
chi: CivilizationHealthIndex, // global composite score
total_players: u64,
total_systems: u64,
last_updated_ms: u64,
endorsement_counts: Table<u64, u64>, // user-driven signals
endorsement_records: Table<vector<u8>, bool>,
}Capability Model
Write access is controlled by a two-tier capability system following Sui's object-centric security:
| Capability | Holder | Powers |
|---|---|---|
AdminCap | Deployer (auto-transferred at publish) | Issue OracleCap to backend services |
OracleCap | Oracle backend wallet | Write system health, player reputation, CHI, alerts |
Data Pipeline
Each oracle cycle follows this sequential pipeline:
INGEST
World API
fetchAllSystems()24,502 solar systemsfetchSmartAssemblies()player infrastructurefetchKillmails()PvP combat recordsPROCESS
Scoring Engine
computeSystemHealth()activity, trust, infra, combatcomputePlayerReputation()5 dimensions + archetypecomputeGlobalCHI()6 sub-indices + diagnosisdetectAnomalies()pattern matching → alertsSTORE
Sui Blockchain
writeSystemHealthBatch()batched PTB (50/batch)writePlayerReputationBatch()batched PTB (50/batch)writeGlobalCHI()single PTB callemitAlertsBatch()on-chain events (10/batch)INGEST
World API
fetchAllSystems()24,502 solar systemsfetchSmartAssemblies()player infrastructurefetchKillmails()PvP combat recordsPROCESS
Scoring Engine
computeSystemHealth()activity, trust, infra, combatcomputePlayerReputation()5 dimensions + archetypecomputeGlobalCHI()6 sub-indices + diagnosisdetectAnomalies()pattern matching → alertsSTORE
Sui Blockchain
writeSystemHealthBatch()batched PTB (50/batch)writePlayerReputationBatch()batched PTB (50/batch)writeGlobalCHI()single PTB callemitAlertsBatch()on-chain events (10/batch)Deployed Contracts
| Resource | ID / URL |
|---|---|
| Package | 0x6618...bbc9 |
| PulseRegistry | 0x945f...32c4 |
| Network | Sui Testnet |
| RPC | https://fullnode.testnet.sui.io:443 |