Technical Reference
Architecture
The structure of the Next.js App Router project and the main moving parts behind the user experience.
Framework
Next.js App Router
State Core
AppDataProvider
Proof Store
Local `.artifacts/runtime-store.json` fallback store
Component map
Text diagram of the architecture
High-level data flow
textWallet / Watch Address
|
v
Sidebar wallet state -> AppDataProvider -> /api/portfolio
|
v
Dashboard / Boost page -> /api/agent/optimize
|
v
Integrity Auditor checks recommendation
|
v
/api/0g/store -> 0G SDK upload -> ProofRegistry anchor when configured
|
v
runtime-store (KV or local file)
|
v
History / proof modal / Judge Mode / /api/agent/latest / /api/0g/proof
|
v
Mint as Agent -> YieldStrategyINFT -> Agents / MarketplaceWhy the provider layer matters
The provider layer keeps wallet context, live portfolio state, optimization progress, streaming narrative, and the latest result synchronized across pages.
That is why a single completed run can appear immediately in the dashboard panels, the Boost page, and the proof modal without separate manual refresh steps.
How the documentation feature fits in
The docs center lives under `app/docs` and uses regular React components with semantic HTML. There is no markdown renderer and no MDX compilation layer in this implementation.
Navigation, page content, and next/previous relationships are derived from typed docs metadata so the docs remain easy to extend while staying product-styled.