Documentation Index
Fetch the complete documentation index at: https://docs.signalarc.fun/llms.txt
Use this file to discover all available pages before exploring further.
Architecture
SignalArc is a modular monorepo for an Arc-native prediction market infrastructure platform. It separates UI, API/business logic, database state, and smart contract prototype code.High-Level Architecture
The public domains are planned production-facing targets. Live deployment and DNS are not completed.Monorepo Layout
| Path | Responsibility |
|---|---|
apps/web | Next.js frontend, UI, wallet connection, frontend API calls, current Arc Testnet browser wallet transaction initiation. |
backend | Go backend API, business logic boundaries, validation, repositories, status checks, agent-readable market API, local contract metadata endpoint. |
contracts | Solidity/Foundry smart contract prototype and tests. |
docs | Public documentation suite. |
Frontend Responsibilities
- Landing and product UI.
- Market list and market detail UI.
- Market creation UI.
- Portfolio and intelligence dashboards.
- Wallet connection with RainbowKit, Wagmi, and Viem.
- API calls to the Go backend.
- Current working tree: browser wallet
approveandopenPositiontransaction initiation on Arc Testnet.
Backend Responsibilities
- Business logic boundary.
- Market creation and validation.
- Trade-intent validation and persistence.
- Repository access for markets, positions, resolutions, settlements, and trades.
- Agent-readable market API.
- Request ID, local CORS, structured request logging, and panic recovery middleware.
- Local Arc contract metadata endpoint.
PostgreSQL Responsibilities
Implemented schema tables include:userswalletsmarketspositionstradesliquidityresolutionssettlementsoracle_eventsaudit_logsapi_keyswebhooksagent_accessschema_migrations
Smart Contract Responsibilities
TheSignalArcMarket contract prototype implements:
- USDC-like ERC20 collateral transfer into the market contract.
- YES/NO position opening.
- Market close.
- Resolver-only resolve.
- Resolver-only cancel.
- Claim after resolution.
- Refund through the same
claim()function after cancellation.
Local Docker Architecture
Local Docker currently runs:signalarc-postgressignalarc-backend
Planned Production Architecture
| Surface | Planned Target |
|---|---|
| Frontend | Vercel serving https://signalarc.fun. |
| Backend | GCP Cloud Run container serving https://api.signalarc.fun. |
| Database | Managed PostgreSQL, likely GCP Cloud SQL or hosted PostgreSQL. |
| Contracts | Existing Arc Testnet prototype contract reference. Production contract deployment is not approved. |
| Docs | https://docs.signalarc.fun documentation target. |