> For the complete documentation index, see [llms.txt](https://docs.fast.poker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fast.poker/frontend-and-api/06-frontend-api.md).

# App, API routes, design system

The reference app at `https://fast.poker` is a frontend on top of the Fast Poker protocol.

## What the frontend does

| Surface    | Purpose                                                                    |
| ---------- | -------------------------------------------------------------------------- |
| Lobby      | Browse SNG pools and active tournaments.                                   |
| Table view | Play hands, track Flat Bounty points/maturity, and act in scheduled duels. |
| Profile    | Show wallet, XP, stats, claimable SOL, Raw $FP, and rewards.               |
| Earn       | Burn-to-Earn, claims, dealer earnings, and license wrapping.               |
| History    | View and verify completed hands.                                           |

## Source of truth

The frontend is not the protocol. It reads and writes protocol state.

| Data                      | Source of truth                                                          |
| ------------------------- | ------------------------------------------------------------------------ |
| Balances and vaults       | Solana accounts                                                          |
| Table state               | On-chain and ER state                                                    |
| Rewards                   | Protocol and tokenomics accounts                                         |
| Flat Bounty and duel      | `SngDuelState` on the ER/L1 owner currently holding it                   |
| Per-game SNG result       | `SngSettlementRecord`; cumulative claims remain in Player/Steel accounts |
| Emission and jackpot odds | Governed `EmissionCtrl`, `PoolIdle`, and `JackpotGlobal` state           |
| Hand history              | On-chain hand reports and commitments                                    |
| UI cache                  | Convenience only                                                         |

## API role

API routes help with:

* Reassembling hand history.
* Serving leaderboards and cached stats.
* Preparing transactions.
* Reading tables faster than raw RPC.
* Health checks and support tooling.

Critical custody and settlement rules are enforced by the on-chain programs, not by an API route.

## Wallet auth

Players sign with a Solana wallet or embedded wallet. The wallet pubkey is the player identity.

For private card reads, the app requests scoped access so a player can see their own cards without exposing other players' cards.

A registered session key signs gasless ER betting and scheduled-duel actions. The wallet remains required for custody actions such as queue joins, deposits, and SOL claims.

## Builder paths

If you want to build your own room, white-label client, or frontend, start with [Frontend integration](/integrations/frontend-integration.md).

If you want to run or build a read-side service for history, stats, profiles, leaderboards, or analytics, start with [Indexer integration](/integrations/indexer-integration.md).
