# yakupcinar/myweb2wave architecture

> Architecture diagram of the GitHub repository yakupcinar/myweb2wave, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yakupcinar/myweb2wave
- Repository: https://github.com/yakupcinar/myweb2wave

## Overview

This repository implements a subscription-funnel product: an editor lets administrators create and publish validated funnel definitions, while visitors encounter funnels, progress through steps, and can begin Stripe checkout. The backend also handles attribution, media, app-server identity and entitlements, subscription synchronization, reporting, and RevenueCat export. The graph uses sampled calls and SOURCE INDEX references; some unsampled subsystems are represented by their exact source paths, with no speculative links to them.

Main entry points: [`core/src/Controller/KimlikController.php`](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/KimlikController.php) (Identity Endpoints), [`core/src/Controller/PanelHuniController.php`](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/PanelHuniController.php) (Funnel Admin), [`core/src/Huni/Huniler.php`](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Huni/Huniler.php) (Funnel Storage), [`core/editor/src/main.tsx`](https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/main.tsx) (Drag Editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_funnel["Funnel Runtime"]
  node_funnel_ui["Funnel Client<br/>[cekirdek.ts]"]
  node_visit_client["Visit Tracking<br/>[ziyaret.ts]"]
  node_api_contract["API Contract<br/>[api.ts]"]
  node_huni_controller["Funnel Endpoints<br/>[HuniController.php]"]
  node_visit_controller["Visit Endpoints"]
  node_huni_def["Funnel Definition<br/>[Tanim.php]"]
end

subgraph group_editor["Funnel Authoring"]
  node_editor_ui["Drag Editor<br/>[main.tsx]"]
  node_editor_convert["Definition Converter<br/>[donustur.ts]"]
  node_editor_config["Editor Config<br/>[yapilandirma.tsx]"]
  node_editor_contract["Editor Contract<br/>[sozlesme.ts]"]
  node_panel_huni["Funnel Admin"]
  node_funnels[("Funnel Storage<br/>[Huniler.php]")]
  node_theme["Theme Validation<br/>[Tema.php]"]
end

subgraph group_identity["Identity and Media"]
  node_media_controller["Media Endpoints"]
  node_media["Media Service<br/>[Medyalar.php]"]
  node_identity_controller["Identity Endpoints"]
  node_verification["Email Verification<br/>[DogrulamaKodu.php]"]
  node_app_auth["App Authorization"]
  node_entitlements["Entitlements<br/>[Hak.php]"]
end

subgraph group_billing["Billing and Attribution"]
  node_checkout["Checkout Endpoint"]
  node_stripe["Stripe"]
  node_webhook["Stripe Webhook"]
  node_subscription_sync["Subscription Sync"]
  node_attribution[("Attribution Records<br/>[Ziyaretler.php]")]
  node_revenuecat["RevenueCat Export<br/>[Aktarim.php]"]
end

subgraph group_operations["Operations"]
  node_reporting["Panel Reports"]
  node_report_service["Report Service<br/>[Rapor.php]"]
  node_admin_provider["Admin Provider"]
  node_revenuecat_command["Export Command"]
  node_publisher_command["Publish Command"]
end

node_visitor(("Visitor"))
node_admin(("Administrator"))
node_appserver(("App Server"))
node_database[("Database")]

node_visitor -.->|"uses"| node_funnel_ui
node_funnel_ui -->|"types against"| node_api_contract
node_visit_client -->|"uses core"| node_funnel_ui
node_visit_client -->|"uses types"| node_api_contract
node_funnel_ui -.->|"requests"| node_huni_controller
node_visit_client -.->|"records visits"| node_visit_controller
node_huni_controller -->|"loads funnels"| node_funnels
node_huni_controller -->|"validates definition"| node_huni_def
node_visit_controller -->|"records progress"| node_attribution
node_visit_controller -->|"uses definition"| node_huni_def
node_admin -.->|"manages funnels"| node_panel_huni
node_panel_huni -->|"edits and publishes"| node_funnels
node_panel_huni -->|"uses theme"| node_theme
node_editor_ui -->|"converts data"| node_editor_convert
node_editor_ui -->|"configures editor"| node_editor_config
node_editor_ui -->|"saves draft"| node_panel_huni
node_editor_convert -->|"uses types"| node_editor_contract
node_panel_huni -->|"renders editor"| node_editor_ui
node_media_controller -->|"uploads and serves"| node_media
node_funnels -->|"checks images"| node_media
node_appserver -.->|"calls app APIs"| node_identity_controller
node_identity_controller -->|"checks access"| node_app_auth
node_identity_controller -->|"requests verification"| node_verification
node_identity_controller -->|"queries rights"| node_entitlements
node_identity_controller -->|"triggers export"| node_revenuecat
node_visitor -.->|"starts checkout"| node_checkout
node_checkout -->|"creates session"| node_stripe
node_checkout -->|"links session"| node_attribution
node_stripe -.->|"sends events"| node_webhook
node_webhook -->|"syncs subscriptions"| node_subscription_sync
node_webhook -->|"triggers export"| node_revenuecat
node_subscription_sync -->|"queues exports"| node_revenuecat
node_reporting -->|"loads reports"| node_report_service
node_revenuecat_command -->|"sends pending"| node_revenuecat
node_publisher_command -->|"publishes funnel"| node_funnels
node_funnels -->|"reads and writes"| node_database
node_attribution -->|"stores attribution"| node_database

click node_funnel_ui "https://github.com/yakupcinar/myweb2wave/blob/main/funnel/src/lib/cekirdek.ts"
click node_visit_client "https://github.com/yakupcinar/myweb2wave/blob/main/funnel/src/lib/ziyaret.ts"
click node_api_contract "https://github.com/yakupcinar/myweb2wave/blob/main/funnel/src/sozlesme/api.ts"
click node_huni_controller "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/HuniController.php"
click node_visit_controller "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/ZiyaretController.php"
click node_huni_def "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Huni/Tanim.php"
click node_editor_ui "https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/main.tsx"
click node_editor_convert "https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/donustur.ts"
click node_editor_config "https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/yapilandirma.tsx"
click node_editor_contract "https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/sozlesme.ts"
click node_panel_huni "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/PanelHuniController.php"
click node_funnels "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Huni/Huniler.php"
click node_theme "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Huni/Tema.php"
click node_media_controller "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/MedyaController.php"
click node_media "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Medya/Medyalar.php"
click node_identity_controller "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/KimlikController.php"
click node_verification "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Kimlik/DogrulamaKodu.php"
click node_app_auth "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Kimlik/UygulamaYetkisi.php"
click node_entitlements "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Kimlik/Hak.php"
click node_checkout "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/CheckoutController.php"
click node_webhook "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/StripeWebhookController.php"
click node_subscription_sync "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Billing/SubscriptionSync.php"
click node_attribution "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Atif/Ziyaretler.php"
click node_revenuecat "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/RevenueCat/Aktarim.php"
click node_reporting "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/PanelController.php"
click node_report_service "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Panel/Rapor.php"
click node_admin_provider "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Panel/YoneticiSaglayici.php"
click node_revenuecat_command "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Command/RevenueCatGonderCommand.php"
click node_publisher_command "https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Command/HuniYayinlaCommand.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_funnel_ui,node_visit_client,node_api_contract,node_huni_controller,node_visit_controller,node_huni_def toneBlue
class node_editor_ui,node_editor_convert,node_editor_config,node_editor_contract,node_panel_huni,node_funnels,node_theme,node_database toneAmber
class node_media_controller,node_media,node_identity_controller,node_verification,node_app_auth,node_entitlements,node_appserver toneMint
class node_checkout,node_stripe,node_webhook,node_subscription_sync,node_attribution,node_revenuecat toneRose
class node_reporting,node_report_service,node_admin_provider,node_revenuecat_command,node_publisher_command,node_visitor,node_admin toneIndigo
```

## Components

### Funnel Runtime

- [Funnel Client](https://github.com/yakupcinar/myweb2wave/blob/main/funnel/src/lib/cekirdek.ts): `funnel/src/lib/cekirdek.ts`
- [Visit Tracking](https://github.com/yakupcinar/myweb2wave/blob/main/funnel/src/lib/ziyaret.ts): `funnel/src/lib/ziyaret.ts`
- [API Contract](https://github.com/yakupcinar/myweb2wave/blob/main/funnel/src/sozlesme/api.ts): `funnel/src/sozlesme/api.ts`
- [Funnel Endpoints](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/HuniController.php): `core/src/Controller/HuniController.php`
- [Visit Endpoints](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/ZiyaretController.php): `core/src/Controller/ZiyaretController.php`
- [Funnel Definition](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Huni/Tanim.php): `core/src/Huni/Tanim.php`

### Funnel Authoring

- [Drag Editor](https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/main.tsx): `core/editor/src/main.tsx`
- [Definition Converter](https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/donustur.ts): `core/editor/src/donustur.ts`
- [Editor Config](https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/yapilandirma.tsx): `core/editor/src/yapilandirma.tsx`
- [Editor Contract](https://github.com/yakupcinar/myweb2wave/blob/main/core/editor/src/sozlesme.ts): `core/editor/src/sozlesme.ts`
- [Funnel Admin](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/PanelHuniController.php): `core/src/Controller/PanelHuniController.php`
- [Funnel Storage](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Huni/Huniler.php): `core/src/Huni/Huniler.php`
- [Theme Validation](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Huni/Tema.php): `core/src/Huni/Tema.php`

### Identity and Media

- [Media Endpoints](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/MedyaController.php): `core/src/Controller/MedyaController.php`
- [Media Service](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Medya/Medyalar.php): `core/src/Medya/Medyalar.php`
- [Identity Endpoints](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/KimlikController.php): `core/src/Controller/KimlikController.php`
- [Email Verification](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Kimlik/DogrulamaKodu.php): `core/src/Kimlik/DogrulamaKodu.php`
- [App Authorization](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Kimlik/UygulamaYetkisi.php): `core/src/Kimlik/UygulamaYetkisi.php`
- [Entitlements](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Kimlik/Hak.php): `core/src/Kimlik/Hak.php`

### Billing and Attribution

- [Checkout Endpoint](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/CheckoutController.php): `core/src/Controller/CheckoutController.php`
- **Stripe**
- [Stripe Webhook](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/StripeWebhookController.php): `core/src/Controller/StripeWebhookController.php`
- [Subscription Sync](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Billing/SubscriptionSync.php): `core/src/Billing/SubscriptionSync.php`
- [Attribution Records](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Atif/Ziyaretler.php): `core/src/Atif/Ziyaretler.php`
- [RevenueCat Export](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/RevenueCat/Aktarim.php): `core/src/RevenueCat/Aktarim.php`

### Operations

- [Panel Reports](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Controller/PanelController.php): `core/src/Controller/PanelController.php`
- [Report Service](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Panel/Rapor.php): `core/src/Panel/Rapor.php`
- [Admin Provider](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Panel/YoneticiSaglayici.php): `core/src/Panel/YoneticiSaglayici.php`
- [Export Command](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Command/RevenueCatGonderCommand.php): `core/src/Command/RevenueCatGonderCommand.php`
- [Publish Command](https://github.com/yakupcinar/myweb2wave/blob/main/core/src/Command/HuniYayinlaCommand.php): `core/src/Command/HuniYayinlaCommand.php`

### Other components

- **Visitor**
- **Administrator**
- **App Server**
- **Database**

## Connections

- Visitor → Funnel Client: uses
- Funnel Client → API Contract: types against (evidence: `funnel/src/lib/cekirdek.ts`)
- Visit Tracking → Funnel Client: uses core (evidence: `funnel/src/lib/ziyaret.ts`)
- Visit Tracking → API Contract: uses types (evidence: `funnel/src/lib/ziyaret.ts`)
- Funnel Client → Funnel Endpoints: requests
- Visit Tracking → Visit Endpoints: records visits
- Funnel Endpoints → Funnel Storage: loads funnels (evidence: `core/src/Controller/HuniController.php`)
- Funnel Endpoints → Funnel Definition: validates definition (evidence: `core/src/Controller/HuniController.php`)
- Visit Endpoints → Attribution Records: records progress (evidence: `core/src/Controller/ZiyaretController.php`)
- Visit Endpoints → Funnel Definition: uses definition (evidence: `core/src/Controller/ZiyaretController.php`)
- Administrator → Funnel Admin: manages funnels
- Funnel Admin → Funnel Storage: edits and publishes (evidence: `core/src/Controller/PanelHuniController.php`)
- Funnel Admin → Theme Validation: uses theme (evidence: `core/src/Controller/PanelHuniController.php`)
- Drag Editor → Definition Converter: converts data (evidence: `core/editor/src/main.tsx`)
- Drag Editor → Editor Config: configures editor (evidence: `core/editor/src/main.tsx`)
- Drag Editor → Funnel Admin: saves draft (evidence: `core/editor/src/main.tsx`)
- Definition Converter → Editor Contract: uses types (evidence: `core/editor/src/donustur.ts`)
- Funnel Admin → Drag Editor: renders editor (evidence: `core/src/Controller/PanelHuniController.php`)
- Media Endpoints → Media Service: uploads and serves (evidence: `core/src/Controller/MedyaController.php`)
- Funnel Storage → Media Service: checks images (evidence: `core/src/Huni/Huniler.php`)
- App Server → Identity Endpoints: calls app APIs
- Identity Endpoints → App Authorization: checks access (evidence: `core/src/Controller/KimlikController.php`)
- Identity Endpoints → Email Verification: requests verification (evidence: `core/src/Controller/KimlikController.php`)
- Identity Endpoints → Entitlements: queries rights (evidence: `core/src/Controller/KimlikController.php`)
- Identity Endpoints → RevenueCat Export: triggers export (evidence: `core/src/Controller/KimlikController.php`)
- Visitor → Checkout Endpoint: starts checkout
- Checkout Endpoint → Stripe: creates session (evidence: `core/src/Controller/CheckoutController.php`)
- Checkout Endpoint → Attribution Records: links session (evidence: `core/src/Controller/CheckoutController.php`)
- Stripe → Stripe Webhook: sends events
- Stripe Webhook → Subscription Sync: syncs subscriptions (evidence: `core/src/Controller/StripeWebhookController.php`)
- Stripe Webhook → RevenueCat Export: triggers export (evidence: `core/src/Controller/StripeWebhookController.php`)
- Subscription Sync → RevenueCat Export: queues exports (evidence: `core/src/Billing/SubscriptionSync.php`)
- Panel Reports → Report Service: loads reports (evidence: `core/src/Controller/PanelController.php`)
- Export Command → RevenueCat Export: sends pending (evidence: `core/src/Command/RevenueCatGonderCommand.php`)
- Publish Command → Funnel Storage: publishes funnel (evidence: `core/src/Command/HuniYayinlaCommand.php`)
- Funnel Storage → Database: reads and writes (evidence: `core/src/Huni/Huniler.php`)
- Attribution Records → Database: stores attribution (evidence: `core/src/Atif/Ziyaretler.php`)
