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

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Geliştirme Proxy'si

> Geliştirme sırasında üretimdeki kimlik doğrulama ve iframe davranışını taklit etmek için Whop geliştirme proxy'sini çalıştırın.

Üretimde uygulamanız, her isteğe `x-whop-user-token` başlığını ekleyen bir ters proxy'nin arkasında, Whop iframe'i içinde çalışır. Her Whop uygulaması bu token'ı [`whopsdk.verifyUserToken`](https://docs.whop.com/tr/developer/guides/authentication) ile doğrular, bu nedenle gerçek kullanıcılarla test etmek için `localhost` üzerinde de aynı başlığa ihtiyacınız vardır. Geliştirme proxy'si bunu sizin için ekler.

> [!WARNING]
>
> `verifyUserToken`, güncel `@whop/sdk` içinde mevcut değildir. Burada açıklanan başlık hâlâ belgelendiği şekilde eklenir.

## Kurulumunuzu seçin

İki kurulum modu vardır. Her ikisi de aynı proxy ikili dosyasıyla gelir. Fark, proxy'nin geliştirme sunucunuzu kendisinin başlatması veya onun yanında çalışmasıdır.

| | Sarmalanmış (Node/JS) | Bağımsız |
| - | - | - |
| **En uygun olduğu durum** | Next.js, Express, node tabanlı geliştirme betiği olan her şey | Python, Ruby, Go, JS olmayan her şey |
| **Nasıl çalışır** | `whop-proxy --command 'next dev'` sunucunuzu başlatır | Sunucunuz bir portta çalışır ve proxy istekleri ona iletir |
| **Port** | Tek port (proxy + sunucu) | İki port (proxy 3000'de, sunucu örneğin 5000'de) |
| **Kurulum** | `pnpm add -D @whop-apps/dev-proxy` | `pnpm dlx @whop-apps/dev-proxy --standalone` (kurulum gerekmez) |

## `Next.js` ve `JavaScript` uygulaması

**1. Proxy'yi bir geliştirme bağımlılığı olarak ekleyin**

```bash pnpm theme={null}
pnpm add -D @whop-apps/dev-proxy
```

```bash bun theme={null}
bun install -D @whop-apps/dev-proxy
```

```bash npm theme={null}
npm install -D @whop-apps/dev-proxy
```

```bash yarn theme={null}
yarn add -D @whop-apps/dev-proxy
```

**2. package.json içindeki dev betiğini güncelleyin**

`package.json` içindeki `dev` betiğini proxy'yi içerecek şekilde güncelleyin.

```json theme={null}
"scripts": {
    "dev": "whop-proxy --command 'next dev --turbopack'",
}
```

> [!NOTE]
>
> `dev` komutunu framework gereksinimlerinize uyacak şekilde güncelleyebilirsiniz.
> Diğer komutları da benzer şekilde proxy ile sarmalayabilirsiniz.

**3. Proxy'yi çalıştırın**

```bash pnpm theme={null}
pnpm dev
```

```bash npm theme={null}
npm run dev
```

```bash yarn theme={null}
yarn dev
```

## Bağımsız mod (diğer framework'ler)

**1. Uygulamanızı yerel olarak çalıştırın**

Uygulamanızı yerel makinenizde bir portta çalıştırın, örneğin 5000.

```bash Python + FastAPI theme={null}
uvicorn main:app --port 5000
```

```bash Ruby on Rails theme={null}
rails server -p 5000
```

```bash Go theme={null}
go run main.go --port 5000
```

**2. Proxy'yi bağımsız modda çalıştırın**

```bash pnpm theme={null}
pnpm dlx @whop-apps/dev-proxy --standalone --upstreamPort=5000 --proxyPort=3000
```

```bash bun theme={null}
bunx @whop-apps/dev-proxy --standalone --upstreamPort=5000 --proxyPort=3000
```

```bash npm theme={null}
npx @whop-apps/dev-proxy --standalone --upstreamPort=5000 --proxyPort=3000
```

```bash yarn theme={null}
yarn dlx @whop-apps/dev-proxy --standalone --upstreamPort=5000 --proxyPort=3000
```

> [!NOTE]
>
> Bu, proxy'yi bağımsız bir süreç olarak çalıştırır. 3000 numaralı portta bir sunucu
> başlatır, istekleri 5000 numaralı porta iletir ve kullanıcı token'ını başlıklara
> ekler.

## Proxy komut seçenekleri

Proxy'yi aşağıdaki komut satırı seçenekleriyle yapılandırın:

```bash theme={null}
Usage: pnpm dlx @whop-apps/dev-proxy [options]

Options:

--proxyPort <port>      The port the proxy should listen on (3000 by default)
--upstreamPort <port>   The port the upstream server is listening on (set automatically by default)
--npmCommand <command>  The npm command to run to start the upstream server (dev by default)
--command <command>     The command to run to start the upstream server (npm run dev by default)
--standalone            Run the proxy as an independent process proxying requests from one port to another port. Ignores the command / npmCommand options.
```

## Sonraki adımlar

> [card] [Kimlik doğrulama](https://docs.whop.com/tr/developer/guides/authentication.md)
>
> iframe kullanıcı token'ını yerelde ve üretimde aynı kodla doğrulayın.

> [card] [Webhook'ları dinleyin](https://docs.whop.com/tr/developer/guides/webhooks.md)
>
> Geliştirme sırasında Whop webhook'larını localhost'a iletin (ngrok veya Cloudflare Tunnel kullanın).

> [card] [Uygulama görünümleri oluşturun](https://docs.whop.com/tr/developer/guides/app-views.md)
>
> Uygulamanızın içinde görüntüleneceği iframe giriş noktalarını ayarlayın.

> [card] [İzin isteyin](https://docs.whop.com/tr/developer/guides/permissions.md)
>
> Yayınlamadan önce uygulamanızın ihtiyaç duyduğu kapsamları yapılandırın.


## Related topics

- [Whop Uygulamalarında Kullanıcıların Kimliğini Doğrulayın](https://docs.whop.com/tr/developer/guides/authentication.md)
- [Uygulama izinleri isteyin](https://docs.whop.com/tr/developer/guides/permissions.md)
- [Whop üzerinde geliştirme için yapay zekâ araçları](https://docs.whop.com/tr/developer/ai/overview.md)
