> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solana.vanna.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Frontend

> Next.js routes, stores, and which screens are live on Solana.

`Backend-Solana` is the product UI.

## Live screens

| Path                  | Status                  |
| --------------------- | ----------------------- |
| `/earn`, `/earn/[id]` | Live — seven pools      |
| `/margin`             | Live — Perps long/short |
| `/trade/spot`         | Live — Jupiter          |
| `/one-click`          | Live — Farm             |
| `/portfolio`          | Live — lender + trader  |
| Faucet modal          | Live — fork only        |

Navbar still shows labels inherited from the multi-chain app. On this build, **Perps** is `/margin` and **Farm** is `/one-click`.

## Data path

1. Wallet adapter or Privy embedded wallet
2. Anchor `Program` from `idl/vanna_lending.json`
3. Account reads (reserve, margin, Lite PDAs)
4. Pyth Hermes or fork price refresh
5. Jupiter quote proxy (`/api/jupiter/quote`)
6. `simulateAndSend` — simulate, then submit

History uses `/api/solana/history` and `/api/solana/spot-history` (RPC / Alchemy-style parsing on the fork).

## Limitations to document honestly

* P\&L and entry price for perps are **derived** from vaults, debt, and history grouping — not a dedicated position account
* Hosted RPC may expose fork cheatcodes; treat the demo as a trusted-tester sandbox
* Token-2022 fees can make "exact" UI numbers differ from vault deltas by a few units
