Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.signalium.site/llms.txt

Use this file to discover all available pages before exploring further.

Monorepo layout

.
├── apps/
│   ├── api/             Bun + Hono REST (X eval, markets, price feed, positions)
│   ├── web/             Next.js 15 + Reown AppKit + HeroUI v3
│   ├── judge-worker/    Bun cron — runs the judge in TEE + posts on-chain
│   └── documentation/   This Mintlify site
├── packages/
│   ├── contracts/       Solidity (Foundry) — 138 unit + 4 mainnet fork tests
│   ├── sdk/             Viem-based TypeScript SDK (incl. fetchMarketYield)
│   ├── ai-gatekeeper/   Gatekeeper / writer / judge prompts + OpenAI-style client
│   ├── shared/          Types + 0G network + contract constants
│   ├── graphql/         Goldsky subgraph client (typed queries)
│   ├── storage/         0G Storage SDK wrapper (judge prompt seal + retrieve)
│   └── subgraph/        Goldsky manifest + handlers
├── deploy/              pm2 ecosystem + nginx vhosts + bootstrap notes
└── turbo.json

Common commands

# Boot everything
pnpm dev              # api (3001) + web (3000) in parallel

# Per-package
pnpm --filter @signalium/web dev
pnpm --filter @signalium/api dev
pnpm --filter @signalium/judge-worker tick   # one-shot resolution sweep

# Quality gates
pnpm typecheck        # tsc --noEmit on every TS package
pnpm lint             # eslint + solhint + forge fmt across all 11 packages

# Contracts
pnpm --filter @signalium/contracts test
pnpm --filter @signalium/contracts test --fork-url https://evmrpc.0g.ai

Developing without real funds (testnet)

0G mainnet uses native 0G as a real asset, so to test cheaply switch to Galileo testnet:
  1. Set OG_NETWORK=testnet in .env.
  2. Top up your wallet from a faucet:
  3. Deploy fresh contracts (the mainnet factory is on chainId 16661, you’ll want your own on 16602):
cd packages/contracts
forge script script/Deploy.s.sol:Deploy \
  --rpc-url $OG_TESTNET_RPC_URL \
  --broadcast --legacy --with-gas-price 3000000000
  1. Copy the printed MarketFactory and AIResolver addresses into your .env as NEXT_PUBLIC_FACTORY_ADDRESS and NEXT_PUBLIC_RESOLVER_ADDRESS.
  2. Restart pnpm dev.
The Gimo StakePool is mainnet-only. On testnet, the per-market Treasury still works but yield deployment via GimoAdapter will revert. For testnet-only flows, leave GIMO_STAKE_POOL empty in .env and the factory provisions markets in legacy self-custody mode.

Editing these docs

The docs site uses Mintlify. Run a hot-reload preview:
pnpm --filter @signalium/documentation dev
# opens at http://localhost:3000 (Mintlify dev port)
Pages are MDX — write in apps/documentation/, navigation lives in docs.json. Mint deploys are linked from the GitHub repo; pushes to main redeploy automatically.