API & Deploy/API Reference
GitHub

API Reference

All Next.js API routes served by the Frontier Pulse frontend.

All routes use force-dynamic rendering. Data priority: on-chain (Sui)live World APIcomputed fallback.

Universe

GET/api/universe

Returns all solar systems with CHI data. Supports tiered loading.

Query params:

tier=hot — Only active systems + CHI (small, fast payload)

tier=remaining — All remaining non-active systems

(none) — Full dataset (backward compatible)

Response
{
  "systems": [
    { "id": 30000001, "name": "Tanoo", "constellation": "San Matar", "region": "Derelik", "nx": 0.42, "ny": 0.78, "depth": 0.55 }
  ],
  "chi": { "overallScore": 62, "diagnosis": "Thriving", "economicVitality": 71, "securityIndex": 58, "growthRate": 65, "connectivity": 60, "trustIndex": 68, "socialCohesion": 55 },
  "totalSystems": 24502
}

Civilization Health Index

GET/api/chi

Returns the global CHI with all 6 sub-indices. Reads from on-chain PulseRegistry first, falls back to live computation.

Response
{
  "overallScore": 62,
  "diagnosis": "Thriving",
  "economicVitality": 71,
  "securityIndex": 58,
  "growthRate": 65,
  "connectivity": 60,
  "trustIndex": 68,
  "socialCohesion": 55,
  "lastUpdated": "2026-03-30T08:10:00Z"
}

System Detail

GET/api/system/:id

Returns detailed state for a single solar system including computed vitals and player list.

Response
{
  "system": { "id": 30000001, "name": "Tanoo", "constellation": "San Matar", "region": "Derelik" },
  "vitals": { "activityLevel": 72, "trustLevel": 85, "playerCount": 14, "infrastructureCount": 6, "txFrequency": 45, "combatIncidents": 2, "localChi": 80 },
  "gateLinks": [{ "fromSystem": 30000001, "toSystem": 30000002 }],
  "players": ["0x1a2b...3c4d", "0x5e6f...7g8h"]
}
GET/api/world/system/:id

Proxy to World API — returns raw system detail with computed vitals and gate connections.

Used by SystemPanel for live gate link data.

Player Reputation

GET/api/player/:address

Returns Trust Compass profile for a player by Sui address.

Response
{
  "address": "0x1a2b...3c4d",
  "reputation": { "reliability": 82, "commerce": 75, "diplomacy": 68, "stewardship": 90, "volatility": 15, "compositeScore": 78, "archetype": "Civilization Builder" },
  "systems": [30000001, 30000142],
  "endorsements": 3
}
GET/api/player/:address/systems

Returns the list of systems associated with a player address.

Anomaly Alerts

GET/api/alerts

Returns the anomaly alert feed detected by the oracle.

Response
{
  "alerts": [
    { "id": "alert_001", "type": "trust_collapse", "systemId": 30004521, "systemName": "Amamake", "severity": "high", "message": "Trust dropped below 20 with 12 active players", "timestamp": "2026-03-30T07:50:00Z" }
  ]
}

Transaction Log

GET/api/transactions

Returns recent oracle transactions from the Sui blockchain, filtered by package ID.

Response
{
  "transactions": [
    { "digest": "ABC123...", "timestamp": "2026-03-30T08:10:00Z", "sender": "0xoracle...", "type": "system_health_update", "function": "update_system_health", "gasUsed": 1250000 }
  ]
}

Pulse Card

GET/api/pulse-card/:systemId

Returns a generated SVG snapshot image for sharing on social media.

Content-Type: image/svg+xml

Size: 600 x 315px (Twitter card optimized)

Cache: max-age=300 (5 minutes)

Includes system name, trust badge, CHI score, vital bars, player stats, and Frontier Pulse branding.

Data Sources

SourceEndpointUsed For
World API/v2/solarsystems24,502 solar systems with 3D coords
World API/v2/smartassembliesInfrastructure mapping
World API/v2/killmailsCombat analysis
Sui RPCsui_getObjectRead PulseRegistry (CHI, scores)
Sui RPCsuix_queryTransactionBlocksTransaction log display