> For the complete documentation index, see [llms.txt](https://seat-airlines.gitbook.io/seat-airlines-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seat-airlines.gitbook.io/seat-airlines-docs/for-developers/configuration.md).

# Configuration

Every setting the page and the Worker read, and which ones are public.

## The page: `VITE_` variables

Everything is optional — a build with none of them set flies the committed token against the production Worker. `.env.example` lists them all.

{% hint style="danger" %}
**Every `VITE_` value is public.** Vite writes it into the JavaScript bundle, where anyone can read it. Set them as repository **variables**, not secrets — a secret would hide the value from the repository and from nobody else. Never put an API key in one.
{% endhint %}

| Variable               | Default                                                 | What it does                                                                                                                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `VITE_TOKEN_MINT`      | the address in `src/lib/token.ts`                       | The token the aircraft flies. Wins over the committed address when set.                                                                                                                                                                                                         |
| `VITE_BANNERS_API`     | `https://seat-airlines-banners.trashmarket.workers.dev` | The Worker: the advert wall, and — unless `VITE_DIRECTORY_API` is set — everything else below.                                                                                                                                                                                  |
| `VITE_DIRECTORY_API`   | `VITE_BANNERS_API`                                      | The Worker for the cabin directory, the holder list, balances and the flight controls.                                                                                                                                                                                          |
| `VITE_HOLDERS_URL`     | the Worker's `/holders`                                 | An indexer returning `[{ "address": "…", "balance": 123 }, …]`, if you have one.                                                                                                                                                                                                |
| `VITE_BANNERS_URL`     | none                                                    | A curated, read-only wall: JSON of `{ "<seat>": { "image", "alt", "href" } }`. It overrides every other advert.                                                                                                                                                                 |
| `VITE_MARKET_URL`      | Jupiter's `tokens/v2/search` for the mint               | Any JSON endpoint carrying market cap, the five-minute change and the holder count. Fields are found by name, at any depth.                                                                                                                                                     |
| `VITE_MANIFEST_SIZE`   | 178 — the whole cabin                                   | How many holders are seated. Must match the Worker's `MANIFEST_SIZE`.                                                                                                                                                                                                           |
| `VITE_DOCS_URL`        | these docs, published on GitBook                        | Where the footer's **Docs on GitBook** link goes. Set it only if the site's address changes — the committed default in `src/lib/docs.ts` is the published site.                                                                                                                 |
| `VITE_RPC_URL_PUBLIC`  | none                                                    | An intentionally public, unkeyed Solana RPC the **browser** may call as a fallback. Never put an API key, token, secret, or credential query parameter in it; CI rejects those values.                                                                                          |
| `VITE_AUDIUS_APP_NAME` | `SeatAirlines`                                          | How the in-flight radio introduces itself to Audius, as `app_name` on every request.                                                                                                                                                                                            |
| `VITE_AUDIUS_API_KEY`  | Seat Airlines' registered key, in `src/lib/audius.ts`   | Your own Audius app's API key, for a fork. Audius issues it for browser code and it is not a secret — the one exception to the rule above. The **API secret** and **bearer token** Audius issues with it are secrets and must never go in a `VITE_` variable or the repository. |

A blank variable counts as unset, so passing an empty repository variable through the deploy workflow is harmless.

## The Worker: `worker/wrangler.toml`

**Bindings**

| Binding     | Type | Holds                                                                    |
| ----------- | ---- | ------------------------------------------------------------------------ |
| `BANNERS`   | KV   | Advert records, the flight controls, and the artwork when R2 is not used |
| `IMAGES`    | R2   | The artwork, when `PUBLIC_IMAGE_BASE` is also set                        |
| `DIRECTORY` | D1   | Cards, messages, sessions — schema in `worker/migrations/`               |

**Variables and secrets**

| Name                                | Kind               | What it does                                                                                                                                                                                                                                                                                                  |
| ----------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `TOKEN_MINT`                        | variable           | The mint. Turns on the holder check for adverts and sign-in, and lets the directory tell the cabins apart.                                                                                                                                                                                                    |
| `RPC_URL`                           | **secret**         | The Solana RPC endpoint — a Helius URL (`https://mainnet.helius-rpc.com/?api-key=…`) is recommended: the holder list is then read from Helius's `getTokenAccounts` index, far cheaper than a program scan. Unset, the Worker falls back to Solana's public endpoint, which rate-limits real traffic — set it. |
| `ALLOWED_ORIGINS`                   | variable           | Comma-separated origins allowed to call the Worker. Production: `https://seat-airlines.space,https://www.seat-airlines.space`. Empty echoes any origin — fine locally, careless in production.                                                                                                                |
| `HOLDERS_URL`                       | variable           | An indexer, optional. If set, use the same feed as the page's `VITE_HOLDERS_URL`.                                                                                                                                                                                                                             |
| `MANIFEST_SIZE`                     | variable           | Defaults to 178. Must match `VITE_MANIFEST_SIZE`.                                                                                                                                                                                                                                                             |
| `PUBLIC_IMAGE_BASE`                 | variable           | The R2 bucket's public URL. Without it, artwork is kept in KV and served from `/images/…`.                                                                                                                                                                                                                    |
| `ADMIN_WALLET`                      | variable or secret | The operator wallet allowed to set the flight controls.                                                                                                                                                                                                                                                       |
| `LADDER_CACHE_MS`, `OWNER_CACHE_MS` | variable           | Cache tuning: how long the holder list is kept (60 s by default), and how long a wallet is believed to hold the token (45 s).                                                                                                                                                                                 |

{% hint style="info" %}
`MANIFEST_SIZE` and `VITE_MANIFEST_SIZE` both default to the same constant from the shared seating module, so leaving both unset is the one way they cannot disagree about who is seated at the back.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://seat-airlines.gitbook.io/seat-airlines-docs/for-developers/configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
