# Quickstart
Put an existing web app inside Cherry: install the SDK, let Cherry frame it, sign the user in from the launch token, verify that token on your backend and prove your domain. About thirty minutes by hand, or one prompt with an AI agent.
> **Tip:** The [listing wizard](https://portal.cherry.fun/dashboard/launch) generates this guide filled with your app ID, origin and revenue model. Paste it into Claude Code, Cursor or Codex and let the agent do the work.
## 1. Register the app
Open the [listing wizard](https://portal.cherry.fun/dashboard/launch) and complete the first step: name, a one-line pitch, a category, an icon and a cover. You get an **app ID**; it is the `aud` and `app_id` of every launch token your app receives. Your app's address comes later, under **Integrate**, once it is deployed.
## 2. Install the SDK
```bash
npm install @cherrydotfun/miniapp-sdk@^0.1.24 @solana/web3.js @solana/wallet-adapter-base
```
| Import | Use it for |
| --- | --- |
| `@cherrydotfun/miniapp-sdk` | Core client, environment detection, launch-token verification |
| `@cherrydotfun/miniapp-sdk/react` | `CherryMiniAppProvider` and hooks |
| `@cherrydotfun/miniapp-sdk/solana` | `CherryWalletAdapter`, the app reference key, transaction labels |
| `@cherrydotfun/miniapp-sdk/kit` | A `TransactionSigner` for `@solana/kit` |
## 3. Let Cherry show the app
Cherry loads your app in a frame. Send this header with every HTML response, and remove `X-Frame-Options` if you set it:
```http
Content-Security-Policy: frame-ancestors 'self' https://chat.cherry.fun https://cherry.fun https://*.cherry.fun
```
> **Warning:** Browsers block third-party cookies inside frames. Keep your own session token in memory and send it in an `Authorization` header instead of relying on cookies.
## 4. Sign the user in
Inside Cherry the user is already authenticated. Wrap your app in the provider and read the user and the launch token; outside Cherry, keep your normal login.
```tsx
import { CherryMiniAppProvider, useCherryMiniApp } from '@cherrydotfun/miniapp-sdk/react';
export function Root() {
return (
);
}
function App() {
const { isReady, user, launchToken } = useCherryMiniApp();
if (!isReady) return ;
// Send launchToken to your backend once and get your own session back.
return ;
}
```
Do not show a **Connect wallet** button and do not ask for a signature to log in. The [automated test](https://portal.cherry.fun/docs/mini-apps/listing.md#automated-test) fails on either.
## 5. Verify the token on your backend
```ts
import { verifyLaunchToken } from '@cherrydotfun/miniapp-sdk';
const APP_ID = 'YOUR_APP_ID';
export async function signInWithCherry(token: string) {
const claims = await verifyLaunchToken(token, { appId: APP_ID });
const userId = claims.cherry_id ?? claims.sub; // key your users by this
return { userId, wallet: claims.sub };
}
```
`verifyLaunchToken` checks the signature against Cherry's keys, the issuer, the audience, the expiry and the app ID. Key your users by the Cherry ID: `sub` is a wallet, and it changes when the person picks another wallet to pay with. Launch tokens live five minutes: exchange one for your own session right away. Other languages are in [Authentication](https://portal.cherry.fun/docs/mini-apps/authentication.md).
## 6. Use the wallet
Register `CherryWalletAdapter` with `@solana/wallet-adapter-react` and turn on `autoConnect`; the wallet is connected the moment the app opens.
Your app never gets the user's keys: they stay on the user's device, and the user approves or declines every request in Cherry. Never ask for a recovery phrase, private key or password. See [Wallet and limits](https://portal.cherry.fun/docs/mini-apps/wallet.md).
```tsx
import { CherryWalletAdapter } from '@cherrydotfun/miniapp-sdk/solana';
const wallets = [new CherryWalletAdapter()];
// …
```
Show what each transaction does before you ask for a signature and stay within your [trust tier's limits](https://portal.cherry.fun/docs/mini-apps/wallet.md). On every transaction, add your app's [reference key](https://portal.cherry.fun/docs/mini-apps/monetization.md#attribution) to one instruction and give it a [label](https://portal.cherry.fun/docs/mini-apps/wallet.md#label-every-transaction):
```ts
import { withAppReference, withTransactionLabel } from '@cherrydotfun/miniapp-sdk/solana';
tx.add(withAppReference(buyIx, APP_ID));
await withTransactionLabel('Buy 3 lives', () => sendTransaction(tx, connection));
```
You build nothing for Cherry's fee: Cherry measures the volume and sends a monthly bill. See [Monetization](https://portal.cherry.fun/docs/mini-apps/monetization.md).
## 7. Prove your domain
Every origin your app uses, the app URL's origin and each allowed origin, serves this file at `https:///.well-known/cherry-app.json`, over https with a 200:
```json
{ "appId": "YOUR_APP_ID" }
```
Publishing needs it. See [Domain proof](https://portal.cherry.fun/docs/mini-apps/listing.md#domain-proof).
## 8. Publish
Back in the wizard, finish the remaining steps. What your app may offer is set by the [Mini App Policy](https://portal.cherry.fun/docs/mini-apps/policy.md), which you accept with the Developer Agreement. Under **Integrate**, add the address your app now runs on (staging is fine; its origin is the one the wallet bridge trusts), then press **Open in test room** to try the app inside Cherry in a private room only your team sees, on staging or any of your [test addresses](https://portal.cherry.fun/docs/mini-apps/listing.md#test-addresses-and-your-test-room). Run the checks, then press **Publish to Cherry**. Your app is listed immediately.