System architecture
The Next.js presentation and server layers, their stores, and the Elysium execution boundary.
On this page
Presentation and server responsibilities
The Next.js App Router serves the marketing site, documentation, and authenticated workspace. The /agent layout nests Wagmi wallet state and a browser Gloam provider around a shared application shell. React Flow powers the strategy graph editor. Markdown and typed response blocks render in the conversation pane.
Next.js Route Handlers implement authentication, chat and workflow persistence, Claude orchestration, and market-provider access. They validate ownership before accessing private application records. Neon PostgreSQL stores user, conversation, and strategy records. These services do not hold the browser vault’s password or note secrets.
Data destinations
| Boundary | Inputs crossing it | Results |
|---|---|---|
| Browser to Next.js | Session cookie, wallet context, screened chat, graph drafts, test statuses | Saved records and incremental response events |
| Next.js to Anthropic | System policy, bounded screened context, permitted tool definitions | Provider events and usage |
| Next.js to CoinGecko | Supported asset identifiers and data ranges | Validated public market observations |
| Browser to IndexedDB | Encrypted vault and encrypted strategy-local inputs | Device-local recovery state |
| Browser to wallet, RPC or relay | Read requests or operation-specific transaction artifacts | Public observations, submission responses, reconciliation |
- Browser conversation
- authenticated API
- bounded provider request
- Authenticated API
- ownership-scoped Neon records
- Browser-only witnesses
- local prover
- operation proof
- Wallet or relay
- Elysium transaction
- RPC evidence
- encrypted journal
Dependencies and deployment
The installed versions include Next.js 16.5.0, React 19.3.1, Wagmi 3.7.12, Viem 2.58.8, React Flow 12.10.0, Gloam SDK 0.11.1, and the Neon serverless driver 1.2.2. The application needs the standard Next.js server for its handlers, streamed responses, and relay rewrite. HTTPS is expected outside localhost. These version statements describe the repository lockfile.
See Next.js App Router, React Flow, Viem, Wagmi, and Neon.

CogniTech