API & Deploy/Deployment
GitHub

Deployment

Production deployment guide for all three system components.

Frontend (Vercel)

The Next.js frontend deploys to Vercel with zero configuration. All data is fetched at runtime from the World API and Sui RPC.

Terminal
cd fe_frontierpulse

# Deploy to Vercel
vercel --prod

# Or link to GitHub for auto-deploy on push
vercel link
No environment variables needed for the frontend. World API base URL and Sui RPC are hardcoded in lib/worldApi.ts and lib/suiReader.ts.

Hardcoded Constants

ConstantFileValue
World API Baselib/worldApi.tshttps://world-api-stillness.live.tech.evefrontier.com
Sui RPC URLlib/suiReader.tshttps://fullnode.testnet.sui.io:443
PulseRegistry IDlib/suiReader.ts0x945f...32c4

Oracle Backend

The oracle is a long-running Node.js process that needs to be hosted on any server with internet access. Railway, Render, or a VPS all work.

First-Time Setup

Terminal
cd oracle_backend

# 1. Copy environment template
cp .env.example .env

# 2. Edit .env with your Sui private key
#    (needs SUI tokens for gas on testnet)

# 3. Build TypeScript
npm run build

# 4. Issue OracleCap (one-time)
npm run oracle:init
# → Outputs: ORACLE_CAP_ID=0x...
# → Add this to your .env file

# 5. Test with a single cycle
npm start -- --once

Environment Variables

VariableRequiredDefaultDescription
SUI_NETWORKNotestnetSui network (testnet/mainnet/devnet)
SUI_PRIVATE_KEYYesOracle wallet key (Bech32, hex, or base64)
PACKAGE_IDNo0x6618...bbc9Deployed Move package ID
PULSE_REGISTRY_IDNo0x945f...32c4PulseRegistry shared object ID
ADMIN_CAP_IDNo0x2adb...a797AdminCap object ID
ORACLE_CAP_IDYesFrom npm run oracle:init
WORLD_API_BASENohttps://world-api-...EVE Frontier World API base URL
CRON_SCHEDULENo*/10 * * * *Cron expression (default: every 10 min)
BATCH_SIZENo50Systems per Sui transaction batch
MAX_SYSTEMS_PER_CYCLENo500Max systems processed per oracle cycle

Private Key Formats

The oracle supports three key formats: Bech32 (suiprivkey1...), hex (0x...), and base64. Never commit the key to version control.

Production Deployment

Railway / Render / VPS
cd oracle_backend
npm run build
npm start
# → Starts cron scheduler, runs initial cycle immediately
# → Logs: "[Oracle] Running. Press Ctrl+C to stop."

The oracle prints detailed logs for each cycle including systems processed, players scored, CHI value, alerts detected, and gas consumed.

Smart Contract (Sui Move)

The contract is already deployed to Sui Testnet. If you need to redeploy (e.g., for a code change):

Terminal
cd smartcontract_FP

# Install Sui CLI if not already
# https://docs.sui.io/build/install

# Build the package
sui move build

# Run tests
sui move test

# Deploy to testnet (requires SUI for gas)
sui client publish --gas-budget 100000000

# → Note the new Package ID, PulseRegistry ID, and AdminCap ID
# → Update oracle_backend/.env with new IDs
# → Update fe_frontierpulse/lib/suiReader.ts with new REGISTRY_ID
After redeployment, you must re-run npm run oracle:init in the oracle backend to issue a new OracleCap for the new package.

Deployed Contract IDs

ResourceObject ID
Package0x661842e6994fa10da8182c752711dd313895f8cf0dcc94eba6764beb6f43bbc9
PulseRegistry0x945f1d589bae9c60e95b99c0f02a7fffb814db3772cb16467e5c683ea0bd32c4
AdminCap0x2adb35c6ececb66b28fd178d246d3ef1b4f8c65fa5a3a7583192df91605da797
NetworkSui Testnet
RPC Endpointhttps://fullnode.testnet.sui.io:443

Troubleshooting

Oracle: “OracleCap not found or invalid”

The ORACLE_CAP_ID in .env is wrong or the cap was issued for a different package. Run npm run oracle:init again.

Oracle: “Insufficient gas”

The oracle wallet needs SUI tokens. Get testnet tokens from the Sui faucet or transfer from another wallet.

Frontend: Galaxy shows no active systems

The World API may be returning empty smart assembly or killmail data. The frontend will use deterministic fallback scoring. This is normal when the Stillness server is down.

Frontend: CHI shows “No data”

Neither on-chain data nor live computation returned results. Run the oracle once (npm run dev -- --once) to populate on-chain data.