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
Vercel KV primary store with local file fallback
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
Client receives optimization payload + streamed narrative
|
v
/api/0g/store -> 0G SDK upload -> optional ProofRegistry write
|
v
runtime-store (KV or local file)
|
v
History / proof modal / /api/agent/latest / /api/0g/proofWhy 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.