tillerhand 3.42.1 → 3.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/.claude/agents/board-chair.md +20 -20
  2. package/.claude/agents/code-reviewer.md +20 -20
  3. package/.claude/agents/council-advisor.md +14 -14
  4. package/.claude/agents/security-auditor.md +30 -30
  5. package/.claude/agents/test-writer.md +22 -21
  6. package/.claude/board/board-ai.md +25 -25
  7. package/.claude/board/board-api.md +25 -25
  8. package/.claude/board/board-architect.md +28 -28
  9. package/.claude/board/board-devops.md +25 -25
  10. package/.claude/board/board-mobile.md +25 -25
  11. package/.claude/board/board-performance.md +24 -24
  12. package/.claude/board/board-privacy.md +25 -25
  13. package/.claude/board/board-product.md +26 -26
  14. package/.claude/board/board-qa.md +28 -28
  15. package/.claude/board/board-ux.md +26 -26
  16. package/.claude/board/council.md +76 -76
  17. package/.claude/board/rules.md +61 -61
  18. package/.claude/claude-security-guidance.md +10 -10
  19. package/.claude/commands/adopt.md +70 -69
  20. package/.claude/commands/ask-mode.md +9 -9
  21. package/.claude/commands/board.md +15 -15
  22. package/.claude/commands/build.md +47 -47
  23. package/.claude/commands/dashboard.md +17 -17
  24. package/.claude/commands/design.md +31 -31
  25. package/.claude/commands/findings-all.md +14 -14
  26. package/.claude/commands/findings-business.md +7 -7
  27. package/.claude/commands/findings-legal.md +7 -7
  28. package/.claude/commands/findings-perf.md +7 -7
  29. package/.claude/commands/findings-security.md +9 -9
  30. package/.claude/commands/findings-tech.md +7 -7
  31. package/.claude/commands/findings-ux.md +7 -7
  32. package/.claude/commands/fix-bug.md +15 -15
  33. package/.claude/commands/freeze.md +8 -8
  34. package/.claude/commands/handoff.md +38 -38
  35. package/.claude/commands/kit-update.md +17 -14
  36. package/.claude/commands/language.md +13 -0
  37. package/.claude/commands/maintain.md +19 -19
  38. package/.claude/commands/plan-task.md +32 -32
  39. package/.claude/commands/qa.md +17 -17
  40. package/.claude/commands/release.md +40 -40
  41. package/.claude/commands/research.md +31 -31
  42. package/.claude/commands/retro.md +32 -32
  43. package/.claude/commands/review-changes.md +15 -15
  44. package/.claude/commands/rollback.md +24 -24
  45. package/.claude/commands/start.md +116 -113
  46. package/.claude/commands/tools.md +11 -11
  47. package/.claude/commands/user-feedback.md +11 -11
  48. package/.claude/commands/wrap-up.md +18 -18
  49. package/.claude/findings/lenses/business.md +24 -24
  50. package/.claude/findings/lenses/legal.md +29 -29
  51. package/.claude/findings/lenses/perf.md +19 -19
  52. package/.claude/findings/lenses/security.md +30 -30
  53. package/.claude/findings/lenses/tech.md +23 -23
  54. package/.claude/findings/lenses/ux.md +19 -19
  55. package/.claude/findings/protocol.md +54 -54
  56. package/.claude/findings/report-template.md +30 -30
  57. package/.claude/hooks/budget.mjs +7 -7
  58. package/.claude/hooks/checkpoint.mjs +12 -12
  59. package/.claude/hooks/commit-gate.mjs +50 -34
  60. package/.claude/hooks/cost.mjs +2 -2
  61. package/.claude/hooks/council.mjs +3 -3
  62. package/.claude/hooks/dashboard-data.mjs +3 -2
  63. package/.claude/hooks/dashboard.mjs +164 -149
  64. package/.claude/hooks/destructive-guard.mjs +74 -64
  65. package/.claude/hooks/edit-rounds.mjs +3 -3
  66. package/.claude/hooks/flow.mjs +10 -10
  67. package/.claude/hooks/freeze-guard.mjs +27 -23
  68. package/.claude/hooks/gate.mjs +25 -25
  69. package/.claude/hooks/guard-secrets.mjs +11 -11
  70. package/.claude/hooks/lang.mjs +114 -0
  71. package/.claude/hooks/messages.mjs +495 -0
  72. package/.claude/hooks/models.mjs +14 -11
  73. package/.claude/hooks/notify.mjs +3 -2
  74. package/.claude/hooks/package-gate.mjs +17 -15
  75. package/.claude/hooks/plugins-sync.mjs +9 -9
  76. package/.claude/hooks/prefs.mjs +19 -19
  77. package/.claude/hooks/preview.mjs +11 -11
  78. package/.claude/hooks/progress.mjs +14 -14
  79. package/.claude/hooks/qa-report.mjs +11 -10
  80. package/.claude/hooks/reminder.mjs +6 -3
  81. package/.claude/hooks/session-start.mjs +23 -17
  82. package/.claude/hooks/shared.mjs +1 -1
  83. package/.claude/hooks/status-read.mjs +5 -4
  84. package/.claude/hooks/statusline.mjs +14 -11
  85. package/.claude/hooks/structure-guard.mjs +9 -9
  86. package/.claude/hooks/test-guard.mjs +61 -20
  87. package/.claude/hooks/tools.mjs +28 -29
  88. package/.claude/hooks/usage.mjs +18 -15
  89. package/.claude/output-styles/anlatici.md +28 -28
  90. package/.claude/security-patterns.json +3 -3
  91. package/.claude/settings.json +6 -0
  92. package/.claude/skills/logo-design/SKILL.md +42 -42
  93. package/.claude/skills/motion-video/SKILL.md +52 -52
  94. package/.claude/skills/source-research/SKILL.md +35 -35
  95. package/.claude/skills/ui-motion/SKILL.md +38 -38
  96. package/.github/workflows/kit-tests.yml +7 -7
  97. package/.github/workflows/npm-publish.yml +16 -16
  98. package/AGENTS.md +56 -56
  99. package/CHANGELOG.md +7 -7
  100. package/CLAUDE.md +5 -5
  101. package/README.md +199 -172
  102. package/README.tr.md +292 -0
  103. package/docs/architecture/overview.md +31 -31
  104. package/docs/architecture/stack.md +2 -2
  105. package/docs/archive/README.md +4 -4
  106. package/docs/decisions/adr-template.md +14 -14
  107. package/docs/decisions/log.md +10 -10
  108. package/docs/findings/README.md +13 -13
  109. package/docs/findings/config.md +13 -13
  110. package/docs/legal/privacy-kvkk.md +1 -1
  111. package/docs/operations/accounts.md +25 -25
  112. package/docs/operations/deploy-setup.md +64 -64
  113. package/docs/operations/feature-flags.md +17 -17
  114. package/docs/operations/maintenance.md +48 -48
  115. package/docs/operations/release-checklist.md +61 -61
  116. package/docs/operations/spend-alarms.md +28 -28
  117. package/docs/product/feedback.md +9 -8
  118. package/docs/product/glossary.md +16 -16
  119. package/docs/product/launch.md +28 -28
  120. package/docs/product/prd.md +43 -42
  121. package/docs/product/roadmap.md +31 -30
  122. package/docs/product/specs/_template.md +13 -12
  123. package/docs/product/unit-economics.md +23 -22
  124. package/docs/quality/metrics.md +14 -14
  125. package/docs/quality/retros.md +11 -11
  126. package/docs/quality/test-plan.md +48 -48
  127. package/docs/security/checklist.md +57 -57
  128. package/docs/workflow/board.md +7 -7
  129. package/docs/workflow/cost-log.md +4 -4
  130. package/docs/workflow/decision-protocol.md +70 -70
  131. package/docs/workflow/learning.md +4 -4
  132. package/docs/workflow/mcp-catalog.md +31 -31
  133. package/docs/workflow/models.md +35 -35
  134. package/docs/workflow/progress.md +7 -7
  135. package/docs/workflow/skills.md +108 -108
  136. package/docs/workflow/usage-limits.md +62 -62
  137. package/kit/CHANGELOG.md +879 -839
  138. package/kit/VERSION +1 -1
  139. package/kit/guide.html +713 -477
  140. package/kit/guide.tr.html +1328 -0
  141. package/kit/kit.mjs +56 -54
  142. package/kit/project/README.md +29 -29
  143. package/kit/project/gitignore +12 -12
  144. package/kit/templates/addons/ai/.env.example.append +5 -5
  145. package/kit/templates/addons/ai/ai/evals/README.md +11 -11
  146. package/kit/templates/addons/ai/ai/evals/cases.jsonl +2 -2
  147. package/kit/templates/addons/ai/ai/prompts/README.md +8 -8
  148. package/kit/templates/addons/ai/docs/ai/guide.md +56 -56
  149. package/kit/templates/backend/.claude/hooks/format.mjs +1 -1
  150. package/kit/templates/backend/.claude/structure.json +1 -1
  151. package/kit/templates/backend/.env.example +6 -6
  152. package/kit/templates/backend/.github/dependabot.yml +1 -1
  153. package/kit/templates/backend/.github/workflows/ci.yml +13 -13
  154. package/kit/templates/backend/.github/workflows/claude-ci-fix.yml +19 -19
  155. package/kit/templates/backend/.github/workflows/claude-maintenance.yml +18 -18
  156. package/kit/templates/backend/.github/workflows/live-monitoring.yml +14 -14
  157. package/kit/templates/backend/.pre-commit-config.yaml +3 -3
  158. package/kit/templates/backend/docs/architecture/stack.md +98 -98
  159. package/kit/templates/backend/docs/architecture/structure.md +34 -34
  160. package/kit/templates/mobile/.claude/structure.json +1 -1
  161. package/kit/templates/mobile/.env.example +6 -6
  162. package/kit/templates/mobile/.github/dependabot.yml +2 -2
  163. package/kit/templates/mobile/.github/workflows/ci.yml +18 -18
  164. package/kit/templates/mobile/.github/workflows/claude-ci-fix.yml +19 -19
  165. package/kit/templates/mobile/.github/workflows/claude-maintenance.yml +18 -18
  166. package/kit/templates/mobile/.gitignore.append +2 -2
  167. package/kit/templates/mobile/docs/architecture/stack.md +113 -113
  168. package/kit/templates/mobile/docs/architecture/structure.md +33 -33
  169. package/kit/templates/mobile/docs/design/design-guide.md +37 -37
  170. package/kit/templates/mobile/tests/security/rls.mjs +22 -22
  171. package/kit/templates/web-saas/.claude/structure.json +1 -1
  172. package/kit/templates/web-saas/.env.example +11 -11
  173. package/kit/templates/web-saas/.github/dependabot.yml +3 -3
  174. package/kit/templates/web-saas/.github/workflows/ci.yml +20 -20
  175. package/kit/templates/web-saas/.github/workflows/claude-ci-fix.yml +19 -19
  176. package/kit/templates/web-saas/.github/workflows/claude-maintenance.yml +18 -18
  177. package/kit/templates/web-saas/.github/workflows/live-monitoring.yml +12 -12
  178. package/kit/templates/web-saas/docs/architecture/stack.md +116 -116
  179. package/kit/templates/web-saas/docs/architecture/structure.md +44 -44
  180. package/kit/templates/web-saas/docs/design/design-guide.md +38 -38
  181. package/kit/templates/web-saas/tests/live/smoke.spec.ts +4 -4
  182. package/kit/templates/web-saas/tests/security/rls.mjs +22 -22
  183. package/kit/tools/codex/.codex/hooks.json +1 -1
  184. package/package.json +2 -2
  185. package/README.en.md +0 -267
@@ -1,169 +1,169 @@
1
- # Stack: Web Uygulaması / SaaS
1
+ # Stack: Web App / SaaS
2
2
 
3
- > Bu dosya her oturumda AI'ya yüklenir. Projede farklı bir seçim yaptıysan burayı güncelle
4
- > ve nedenini `docs/decisions/log.md`'ye yaz.
3
+ > This file is loaded into the AI every session. If you made a different choice in the project, update it here
4
+ > and write the reason in `docs/decisions/log.md`.
5
5
 
6
- ## Karar noktaları
6
+ ## Decision points
7
7
 
8
- `/start` bu kararları sırayla sorar (`docs/workflow/decision-protocol.md`). Her kararda bu projeye en uygun 2-4 seçeneği sun; **önerilen** etiketi varsayılandır, ama PRD'ye göre başka seçenek daha uygunsa onu öner ve nedenini söyle. Fiyat, ücretsiz katman ve kısıt gibi değişebilen iddiaların yanında `(kaynak: <adres>, YYYY-AA-GG)` notu varsa ve 90 günden yeniyse yeniden araştırılmaz.
8
+ `/start` asks these decisions in order (`docs/workflow/decision-protocol.md`). For each decision, offer the 2-4 options that best fit this project. The **recommended** label is the default, but if another option fits the PRD better, recommend that one and say why. If a claim that can change (price, free tier, limit) carries a `(kaynak: <adres>, YYYY-AA-GG)` note newer than 90 days, do not research it again.
9
9
 
10
- | # | Karar | Seçenekler (ne zaman daha iyi) |
10
+ | # | Decision | Options (when each is better) |
11
11
  |---|---|---|
12
- | 1 | Framework | **Next.js** (önerilen: SEO + panel + API tek projede, AI'nın en iyi bildiği ekosistem) · Astro (içerik/açılış sayfası ağırlıklı, en hızlı sayfa) · SvelteKit (daha az kod, hızlı; ekosistem küçük) · React + Vite SPA (sadece giriş arkasında uygulama, SEO gereksiz, en basit barındırma) |
13
- | 2 | Dil | **TypeScript** (önerilen: AI hatalarını derleme anında yakalar) · JavaScript (sadece çok küçük prototip) |
14
- | 3 | Veritabanı + kimlik | **Supabase** (önerilen: Postgres + Auth + Storage + RLS tek yerde; ücretsiz katman 2 aktif proje, proje başı 500 MB veritabanı, 1 hafta hareketsiz kalan proje duraklatılır (kaynak: https://supabase.com/pricing, 2026-10-26)) · Neon + Better Auth (daha fazla kontrol, sağlayıcı bağımlılığı az) · Firebase (gerçek zamanlı, NoSQL, mobil ile ortak backend) · Clerk + Postgres (hazır, şık kimlik arayüzü; ilk 50.000 aylık geri dönen kullanıcı ücretsiz, sonrası kullanıcı başı ücret (kaynak: https://clerk.com/billing, 2026-10-26)) |
15
- | 4 | Veri erişimi | **Supabase client + RLS** (Supabase seçildiyse) · Drizzle ORM (tip güvenli SQL, sağlayıcıdan bağımsız) · Prisma (olgun, şema odaklı; daha ağır) |
16
- | 5 | UI bileşenleri | **shadcn/ui + Tailwind** (önerilen: kod projede, tamamen özelleştirilebilir, tasarım skill'leriyle uyumlu) · Tailwind + kendi bileşenleri (tam özgün tasarım) · Mantine (hazır zengin bileşenler, panel ağırlıklı) |
17
- | 6 | Ödeme | Yok (ilk sürümde ücretsiz) · **iyzico** (TR kartları, taksit, TL) · Stripe (yurt dışı müşteri; TR şirketiyle kısıtlı olabilir: Türkiye desteklenen ülke listesinde görünmüyor (kaynak: https://stripe.com/global, 2026-10-26)) · Paddle / Lemon Squeezy (merchant of record: vergi ve fatura onlarda; yurt dışına abonelik satışı) |
18
- | 7 | Barındırma | **Vercel** (önerilen Next.js için: sıfır ayar, önizleme ortamları; ücretsiz Hobby planı yalnız kişisel, ticari olmayan kullanım içindir, ödeme alan ya da reklam gösteren ürün Pro ister (kaynak: https://vercel.com/docs/limits/fair-use-guidelines, 2026-10-26)) · Cloudflare (ucuz ve hızlı; ücretsiz Workers günde 100.000 istek ve istek başına 10 ms CPU ile sınırlı (kaynak: https://developers.cloudflare.com/workers/platform/limits/, 2026-10-26)) · Netlify · Kendi sunucun + Coolify (sabit maliyet, bakım sende) |
19
- | 8 | E-posta | **Resend** (önerilen: geliştirici dostu, React e-posta şablonları; ücretsiz planda ayda 3.000, günde 100 e-posta (kaynak: https://resend.com/pricing, 2026-10-26)) · Postmark (teslim oranı çok yüksek) · Amazon SES (en ucuz, kurulumu zor) |
20
- | 9 | Analitik | **Plausible** (çerezsiz, KVKK dostu; ücretsiz plan yok, aylık 9 dolardan başlar, 30 gün deneme (kaynak: https://plausible.io/docs/billing, 2026-10-26)) · PostHog (ürün analitiği, huniler, özellik bayrakları) · Umami (kendin barındır, ücretsiz) · Yok |
21
- | 10 | Hata takibi | **Sentry** (önerilen) · Highlight / Better Stack |
22
- | 11 | Dil desteği | **Sadece Türkçe** (önerilen MVP için) · Türkçe + İngilizce (next-intl; baştan kurmak sonradan eklemekten ucuzdur) |
23
- | 12 | Test | **Vitest + Playwright** (önerilen) · Sadece Playwright (az mantık, çok arayüz) |
12
+ | 1 | Framework | **Next.js** (recommended: SEO + dashboard + API in one project, the ecosystem the AI knows best) · Astro (content/landing-page heavy, fastest pages) · SvelteKit (less code, fast; smaller ecosystem) · React + Vite SPA (app only behind login, no SEO need, simplest hosting) |
13
+ | 2 | Language | **TypeScript** (recommended: catches AI mistakes at compile time) · JavaScript (only for a very small prototype) |
14
+ | 3 | Database + identity | **Supabase** (recommended: Postgres + Auth + Storage + RLS in one place; free tier has 2 active projects, 500 MB database per project, a project idle for 1 week is paused (kaynak: https://supabase.com/pricing, 2026-10-26)) · Neon + Better Auth (more control, less provider lock-in) · Firebase (realtime, NoSQL, shared backend with mobile) · Clerk + Postgres (ready-made, polished identity UI; first 50,000 monthly returning users free, then per-user fee (kaynak: https://clerk.com/billing, 2026-10-26)) |
15
+ | 4 | Data access | **Supabase client + RLS** (if Supabase is chosen) · Drizzle ORM (type-safe SQL, provider-independent) · Prisma (mature, schema-driven; heavier) |
16
+ | 5 | UI components | **shadcn/ui + Tailwind** (recommended: code lives in the project, fully customizable, works with the design skills) · Tailwind + own components (fully original design) · Mantine (rich ready-made components, dashboard heavy) |
17
+ | 6 | Payment | None (free in the first release) · **iyzico** (Turkish cards, installments, TRY) · Stripe (customers abroad; may be restricted for a Turkish company: Turkey does not appear in the supported-country list (kaynak: https://stripe.com/global, 2026-10-26)) · Paddle / Lemon Squeezy (merchant of record: they handle tax and invoicing; subscriptions sold abroad) |
18
+ | 7 | Hosting | **Vercel** (recommended for Next.js: zero config, preview environments; the free Hobby plan is for personal, non-commercial use only, a product that takes payments or shows ads needs Pro (kaynak: https://vercel.com/docs/limits/fair-use-guidelines, 2026-10-26)) · Cloudflare (cheap and fast; free Workers are limited to 100,000 requests per day and 10 ms CPU per request (kaynak: https://developers.cloudflare.com/workers/platform/limits/, 2026-10-26)) · Netlify · Your own server + Coolify (fixed cost, maintenance is yours) |
19
+ | 8 | Email | **Resend** (recommended: developer friendly, React email templates; free plan gives 3,000 emails per month, 100 per day (kaynak: https://resend.com/pricing, 2026-10-26)) · Postmark (very high deliverability) · Amazon SES (cheapest, hard to set up) |
20
+ | 9 | Analytics | **Plausible** (cookieless, KVKK friendly; no free plan, starts at 9 dollars per month, 30-day trial (kaynak: https://plausible.io/docs/billing, 2026-10-26)) · PostHog (product analytics, funnels, feature flags) · Umami (self-host, free) · None |
21
+ | 10 | Error tracking | **Sentry** (recommended) · Highlight / Better Stack |
22
+ | 11 | Language support | **Turkish only** (recommended for the MVP) · Turkish + English (next-intl; setting it up from the start is cheaper than adding it later) |
23
+ | 12 | Test | **Vitest + Playwright** (recommended) · Playwright only (little logic, mostly UI) |
24
24
 
25
25
  ## Seçilen teknolojiler
26
26
 
27
- > `/start` Adım 4'te karar noktalarına göre doldurulur. Aşağıdaki tablo **önerilen** yığındır ve onaylanana kadar öneri sayılır.
28
- > Seçim farklıysa bu dosyanın komut, klasör, kural, doğrulama ve kontrol bölümleri seçime göre yeniden yazılır.
27
+ > `/start` fills this in at Step 4 from the decision points. The table below is the **recommended** stack and counts as a proposal until approved.
28
+ > If the choice differs, rewrite the commands, folder, rules, verification and checks sections of this file to match the choice.
29
29
 
30
- | Katman | Seçim | Not |
30
+ | Layer | Choice | Note |
31
31
  |---|---|---|
32
32
  | Framework | Next.js (App Router) + TypeScript (strict) | |
33
- | UI | Tailwind CSS + shadcn/ui | Yeni bileşen yazmadan önce shadcn'de var mı bak |
34
- | DB + Auth + Depolama | Supabase (Postgres) | Alternatif: Neon + Auth.js |
35
- | ORM / sorgu | Supabase client veya Drizzle | Projede hangisi varsa sadece o |
36
- | Doğrulama | Zod | Hem form hem sunucu |
37
- | Ödeme | Stripe / iyzico / Paddle | TR şirketiyle Stripe sınırlı olabilir, kontrol et |
38
- | E-posta | Resend | Alan adı doğrulaması şart |
33
+ | UI | Tailwind CSS + shadcn/ui | Before writing a new component, check whether shadcn has it |
34
+ | DB + Auth + Storage | Supabase (Postgres) | Alternative: Neon + Auth.js |
35
+ | ORM / query | Supabase client or Drizzle | Use only the one the project already has |
36
+ | Validation | Zod | For both forms and the server |
37
+ | Payment | Stripe / iyzico / Paddle | Stripe may be restricted for a Turkish company, check |
38
+ | Email | Resend | Domain verification is required |
39
39
  | Hosting | Vercel | |
40
- | Hata takibi | Sentry | |
41
- | Analitik | Plausible / PostHog | Çerez onayına dikkat |
42
- | Test | Vitest (birim), Playwright (e2e) | |
40
+ | Error tracking | Sentry | |
41
+ | Analytics | Plausible / PostHog | Watch cookie consent |
42
+ | Test | Vitest (unit), Playwright (e2e) | |
43
43
 
44
- ## Komutlar
44
+ ## Komutlar (commands)
45
45
 
46
46
  ```bash
47
- npm run dev # geliştirme
48
- npm run build # prod derleme (deploy öncesi mutlaka)
47
+ npm run dev # development
48
+ npm run build # production build (always before deploy)
49
49
  npm run lint
50
- npx tsc --noEmit # tip kontrolü
50
+ npx tsc --noEmit # type check
51
51
  npm run test # vitest
52
52
  npx playwright test # e2e
53
- npx supabase migration new [ad] # yeni migration
53
+ npx supabase migration new [ad] # new migration
54
54
  ```
55
55
 
56
- ## Klasör yapısı
56
+ ## Folder structure
57
57
 
58
- Özellik bazlı yapı ve kurallar: `docs/architecture/structure.md`. Harita: `.claude/structure.json` (dışına yazım sorulur, CI denetler).
58
+ Feature-based structure and rules: `docs/architecture/structure.md`. Map: `.claude/structure.json` (writing outside it is asked about, CI checks it).
59
59
  ```
60
60
  src/
61
- ├── app/ # SADECE rotalar: page, layout, loading, error, route handler. İş mantığı yok.
62
- │ ├── (marketing)/ # açılış, fiyat, blog
63
- │ ├── (auth)/ # giriş, kayıt, şifre sıfırlama
64
- │ ├── (app)/ # giriş gerektiren uygulama
65
- │ └── api/ # webhook ve dış API uçları
61
+ ├── app/ # ONLY routes: page, layout, loading, error, route handler. No business logic.
62
+ │ ├── (marketing)/ # landing, pricing, blog
63
+ │ ├── (auth)/ # sign in, sign up, password reset
64
+ │ ├── (app)/ # the app that needs login
65
+ │ └── api/ # webhook and external API endpoints
66
66
  ├── features/
67
- │ └── <özellik>/ # örn. invoice/
68
- │ ├── components/ # sadece bu özelliğin bileşenleri
69
- │ ├── hooks/ # istemci hook'ları
70
- │ ├── server/ # server actions, sorgular, servisler (sunucuda çalışır)
71
- │ ├── lib/ # özelliğe özel yardımcılar
72
- │ ├── __tests__/ # birim ve entegrasyon testleri
73
- │ ├── schemas.ts # Zod şemaları
67
+ │ └── <feature>/ # e.g. invoice/
68
+ │ ├── components/ # components of this feature only
69
+ │ ├── hooks/ # client hooks
70
+ │ ├── server/ # server actions, queries, services (run on the server)
71
+ │ ├── lib/ # feature-specific helpers
72
+ │ ├── __tests__/ # unit and integration tests
73
+ │ ├── schemas.ts # Zod schemas
74
74
  │ ├── types.ts
75
- │ └── index.ts # özelliğin dışa açtığı tek kapı
75
+ │ └── index.ts # the only gate the feature exposes
76
76
  ├── components/
77
- │ └── ui/ # shadcn/ui ve paylaşılan sunum bileşenleri
78
- ├── hooks/ # birden fazla özelliğin kullandığı hook'lar
79
- ├── lib/ # altyapı istemcileri: supabase/, stripe/, email/, sentry
80
- ├── config/ # ortam değişkeni doğrulama (env.ts), sabitler
81
- ├── styles/ # global stiller, tasarım belirteçleri (DESIGN.md'den)
82
- ├── types/ # global tipler
77
+ │ └── ui/ # shadcn/ui and shared presentational components
78
+ ├── hooks/ # hooks used by more than one feature
79
+ ├── lib/ # infrastructure clients: supabase/, stripe/, email/, sentry
80
+ ├── config/ # environment variable validation (env.ts), constants
81
+ ├── styles/ # global styles, design tokens (from DESIGN.md)
82
+ ├── types/ # global types
83
83
  └── middleware.ts
84
- public/ # statik dosyalar
84
+ public/ # static files
85
85
  tests/
86
- ├── e2e/ # Playwright kabul testleri (Ö-01.1 ...)
87
- └── live/ # canlı izleme testleri (veri silmeyen)
88
- supabase/migrations/ # veritabanı değişiklikleri SADECE burada
86
+ ├── e2e/ # Playwright acceptance tests (Ö-01.1 ...)
87
+ └── live/ # live monitoring tests (that delete no data)
88
+ supabase/migrations/ # database changes ONLY here
89
89
  ```
90
90
 
91
- ## Kodlama kuralları
91
+ ## Coding rules
92
92
 
93
- - Varsayılan **Server Component**. `"use client"` sadece etkileşim gerekiyorsa ve en alttaki bileşende.
94
- - Veri yazma: Server Action veya route handler. Her birinde: Zod doğrulama → oturum kontrolü → yetki kontrolü → işlem.
95
- - `NEXT_PUBLIC_` ön ekli değişkenler tarayıcıya gider. Sır asla `NEXT_PUBLIC_` olmaz.
96
- - Supabase gizli anahtarı (`SUPABASE_SECRET_KEY`, `sb_secret_…`; eski adı `service_role`) sadece sunucuda ve sadece gerçekten gerekiyorsa (RLS'i atlar).
97
- - DB şema değişikliği sadece migration dosyasıyla (`npx supabase migration new [ad]`). Panelden veya MCP'den elle DDL yok; `supabase-dev` MCP'si dev'de veri denemek içindir.
98
- - Her yeni tabloda RLS açık, politikası yazılı ve tablo `tests/security/rls.mjs` → `TABLES` listesinde (CI'daki `rls` işi kayıtsız tabloda kırmızı olur).
99
- - Her sayfada `loading.tsx` / boş durum / `error.tsx` düşün.
100
- - Görseller `next/image`, linkler `next/link`.
101
- - Metinler Türkçe; tarih/para `Intl` ile `tr-TR`.
102
- - UI işinden önce `DESIGN.md` ve `docs/design/design-guide.md`'yi oku; belirteçlerin ve kuralların dışına çıkma. Yeni tasarım kararı gerekiyorsa `/design`.
93
+ - Default to **Server Component**. `"use client"` only when interaction is needed, and in the lowest component.
94
+ - Writing data: Server Action or route handler. In each: Zod validation → session check → permission check → operation.
95
+ - Variables with the `NEXT_PUBLIC_` prefix go to the browser. A secret is never `NEXT_PUBLIC_`.
96
+ - The Supabase secret key (`SUPABASE_SECRET_KEY`, `sb_secret_…`; old name `service_role`) only on the server and only when really needed (it bypasses RLS).
97
+ - DB schema changes only through a migration file (`npx supabase migration new [ad]`). No manual DDL from the dashboard or MCP; the `supabase-dev` MCP is for trying data in dev.
98
+ - Every new table has RLS on, a written policy, and an entry in the `tests/security/rls.mjs` → `TABLES` list (the `rls` job in CI turns red on an unregistered table).
99
+ - On every page, think about `loading.tsx` / empty state / `error.tsx`.
100
+ - Images with `next/image`, links with `next/link`.
101
+ - Texts are in Turkish; format date/money with `Intl` and `tr-TR`.
102
+ - Before UI work, read `DESIGN.md` and `docs/design/design-guide.md`; do not go outside the tokens and rules. If a new design decision is needed, use `/design`.
103
103
 
104
- ## Doğrulama (görev bitmeden kanıt)
104
+ ## Verification (evidence before a task is done)
105
105
 
106
- - Arayüz: `node .claude/hooks/preview.mjs <görev kodu>` masaüstü (1440) ve mobil (390) ekran görüntüsünü alır (`AGENTS.md` → `geliştirme:` ve `önizleme:` satırları). Senaryoları denemek için `npm run dev` açıkken Playwright CLI (`npx -y @playwright/cli@0.1.22 open http://localhost:3000`, sonra `snapshot`, `console`, `screenshot`) veya Claude'un tarayıcısı ile sayfayı aç, ana senaryoyu ve bir hata senaryosunu dene.
107
- - Kabul kriterlerini tarayıcıda kanıtlamak: `/qa` (kriter başına Playwright testi, rapor `docs/quality/qa/`).
108
- - Yetki: ikinci bir test kullanıcısıyla birinci kullanıcının kaydına erişmeyi dene; erişememeli.
109
- - Konsolda hata/uyarı yok.
106
+ - UI: `node .claude/hooks/preview.mjs <task id>` takes a desktop (1440) and mobile (390) screenshot (the `geliştirme:` and `önizleme:` lines in `AGENTS.md`). To try scenarios, with `npm run dev` running, open the page with the Playwright CLI (`npx -y @playwright/cli@0.1.22 open http://localhost:3000`, then `snapshot`, `console`, `screenshot`) or with Claude's browser, and try the main scenario and one error scenario.
107
+ - Proving acceptance criteria in the browser: `/qa` (one Playwright test per criterion, report in `docs/quality/qa/`).
108
+ - Authorization: with a second test user, try to reach the first user's record; it must fail.
109
+ - No errors/warnings in the console.
110
110
 
111
- ## Otomatik kontroller
111
+ ## Automatic checks
112
112
 
113
- | Katman | Ne yapar | Kurulum |
113
+ | Layer | What it does | Setup |
114
114
  |---|---|---|
115
- | Claude hook'ları | Sır yazımını engeller; düzenlenen dosyayı Prettier ile biçimlendirir | Hazır (`.claude/settings.json`). Prettier projede kurulu olmalı |
116
- | Pre-commit | lint-staged (ESLint + Prettier) + sır taraması | `npm i -D husky lint-staged prettier` → `npm pkg set scripts.prepare="husky"` → `npx husky` |
117
- | CI (+ Semgrep, kopya kod, karmaşıklık bütçesi) | Lint, tip, test, build, açık taraması, gitleaks, değişen dosyalarda karmaşıklık bütçesi (fonksiyon karmaşıklığı 15, fonksiyon 80, dosya 400 satır; `node .claude/hooks/budget.mjs --check`) | `.github/workflows/ci.yml` hazır. GitHub > Settings > Variables'a `NEXT_PUBLIC_*` değerlerini ekle |
118
- | Dependabot | Haftalık küçük güncellemeler tek PR'da | `.github/dependabot.yml` hazır |
119
- | MCP | Supabase (salt-okunur), Sentry, Context7 · gerektiğinde: Playwright, Chrome DevTools, Supabase dev (`docs/workflow/mcp-catalog.md`) | `.mcp.json`: `DEV_REF`'i doldur (salt-okunur, **geliştirme** projesi; prod ref'i AI ortamına yazılmaz). Yazma yetkili Supabase MCP sadece **geliştirme** projesine (`supabase-dev`) |
115
+ | Claude hooks | Block writing secrets; format the edited file with Prettier | Ready (`.claude/settings.json`). Prettier must be installed in the project |
116
+ | Pre-commit | lint-staged (ESLint + Prettier) + secret scan | `npm i -D husky lint-staged prettier` → `npm pkg set scripts.prepare="husky"` → `npx husky` |
117
+ | CI (+ Semgrep, duplicate code, complexity budget) | Lint, types, test, build, vulnerability scan, gitleaks, complexity budget on changed files (function complexity 15, function 80, file 400 lines; `node .claude/hooks/budget.mjs --check`) | `.github/workflows/ci.yml` is ready. Add the `NEXT_PUBLIC_*` values to GitHub > Settings > Variables |
118
+ | Dependabot | Weekly small updates in a single PR | `.github/dependabot.yml` is ready |
119
+ | MCP | Supabase (read-only), Sentry, Context7 · when needed: Playwright, Chrome DevTools, Supabase dev (`docs/workflow/mcp-catalog.md`) | `.mcp.json`: fill in `DEV_REF` (read-only, the **development** project; the prod ref is not written into the AI environment). The write-enabled Supabase MCP only for the **development** project (`supabase-dev`) |
120
120
 
121
- ## Kabul testleri ve özellik bayrakları
121
+ ## Acceptance tests and feature flags
122
122
 
123
- **Kabul testleri** (`docs/quality/test-plan.md` §1a): Test adı kriter kimliğini taşır (`test('Ö-01.1 ...')`). Pano JUnit raporunu okur:
123
+ **Acceptance tests** (`docs/quality/test-plan.md` §1a): The test name carries the criterion id (`test('Ö-01.1 ...')`). The dashboard reads the JUnit report:
124
124
 
125
125
  ```bash
126
126
  PLAYWRIGHT_JUNIT_OUTPUT_NAME=test-results/junit.xml npx playwright test --reporter=list,junit
127
127
  npx vitest run --reporter=default --reporter=junit --outputFile.junit=test-results/junit-unit.xml
128
128
  ```
129
129
 
130
- **Özellik bayrakları** (`docs/operations/feature-flags.md`): Acil kapatma deploy gerektirmemeli. Bu yüzden ortam değişkeni değil, çalışma anında okunan bir kaynak kullanılır:
131
- - PostHog seçildiyse PostHog feature flags; değilse
132
- - Supabase'de `feature_flags` tablosu (`ad`, `acik`, `yuzde`) + sunucuda 60 sn önbellek. Okuma tek bir yardımcıdan yapılır: `lib/bayrak.ts` → `bayrakAcik('ad', kullanici)`.
133
- - Bayrak kontrolü sunucuda yapılır; istemci sadece sonucu görür.
130
+ **Feature flags** (`docs/operations/feature-flags.md`): Emergency shutdown must not need a deploy. So use a source read at runtime, not an environment variable:
131
+ - PostHog feature flags if PostHog is chosen; otherwise
132
+ - A `feature_flags` table in Supabase (`ad`, `acik`, `yuzde`) + a 60 s cache on the server. Reading goes through one helper: `lib/bayrak.ts` → `bayrakAcik('ad', kullanici)`.
133
+ - The flag check runs on the server; the client only sees the result.
134
134
 
135
- ## Sık yapılan AI hataları (bunlara dikkat)
135
+ ## Common AI mistakes (watch for these)
136
136
 
137
- - Koda, teste veya ayara bu makineye özel mutlak yol yazmak (`C:\Users\<ad>\…`, `/home/<ad>/…`, proje klasörünün tam yolu): başka makinede çalışmaz. Yolu `import.meta.url` / `__dirname`, `path.join(process.cwd(), …)` veya `os.tmpdir()` ile türet. Deterministik kapı bunu yakalar.
138
- - Client component içinde Supabase admin istemcisi veya sır kullanmak.
139
- - Sayfayı middleware ile koruyup server action'ı korumasız bırakmak.
140
- - RLS'i "çalışmıyor" diye kapatmak.
141
- - Eski Pages Router kalıplarını (`getServerSideProps`) App Router'a karıştırmak.
142
- - Webhook'ta imza doğrulamamak; webhook'u iki kez gelince iki kez işlemek (idempotency).
137
+ - Writing an absolute path specific to this machine into code, a test or a setting (`C:\Users\<ad>\…`, `/home/<ad>/…`, the full path of the project folder): it does not work on another machine. Derive the path with `import.meta.url` / `__dirname`, `path.join(process.cwd(), …)` or `os.tmpdir()`. The deterministic gate catches this.
138
+ - Using the Supabase admin client or a secret inside a client component.
139
+ - Protecting the page with middleware but leaving the server action unprotected.
140
+ - Turning RLS off because it "does not work".
141
+ - Mixing old Pages Router patterns (`getServerSideProps`) into the App Router.
142
+ - Not verifying the signature on a webhook; processing a webhook twice when it arrives twice (idempotency).
143
143
 
144
- ## Güvenlik (ek)
144
+ ## Security (extra)
145
145
 
146
- - [ ] Tüm tablolarda RLS açık ve her tablo saldırgan testinde: `tests/security/rls.mjs` (CI `rls` işi yeşil). Yerelde: `npx -y supabase@2.120.0 start`, sonra dosyanın başındaki komutlar.
147
- - [ ] Başka kullanıcı ve anonim, kullanıcının satırını okuyamıyor, değiştiremiyor, silemiyor (aynı test).
148
- - [ ] Güvenlik başlıkları (CSP, X-Frame-Options vb.) `next.config` veya middleware'de.
149
- - [ ] Auth uçlarında rate limit (Supabase ayarları + gerekiyorsa Upstash).
146
+ - [ ] RLS is on in all tables and every table is in the adversarial test: `tests/security/rls.mjs` (CI `rls` job green). Locally: `npx -y supabase@2.120.0 start`, then the commands at the top of the file.
147
+ - [ ] Another user and an anonymous user cannot read, change or delete the user's row (same test).
148
+ - [ ] Security headers (CSP, X-Frame-Options etc.) in `next.config` or middleware.
149
+ - [ ] Rate limit on auth endpoints (Supabase settings + Upstash if needed).
150
150
 
151
- ## Canlıya alma (ek)
151
+ ## Go live (extra)
152
152
 
153
- - [ ] Vercel prod ortam değişkenleri girildi (Preview ve Production ayrı)
154
- - [ ] Supabase prod projesi ayrı; Auth → URL Configuration'da prod alan adı ve redirect URL'leri
155
- - [ ] Supabase e-posta şablonları Türkçe ve özel SMTP (varsayılan SMTP'nin limiti çok düşük)
156
- - [ ] Ödeme: canlı anahtarlar, canlı webhook uç noktası ve imza sırrı
157
- - [ ] SEO: `metadata` (title, description), Open Graph görseli, `sitemap.ts`, `robots.ts`, favicon
158
- - [ ] Lighthouse (mobil): Performans ≥ 90, Erişilebilirlik ≥ 90, SEO ≥ 90
153
+ - [ ] Vercel prod environment variables entered (Preview and Production separate)
154
+ - [ ] Supabase prod project is separate; prod domain and redirect URLs in Auth → URL Configuration
155
+ - [ ] Supabase email templates in Turkish and a custom SMTP (the default SMTP limit is very low)
156
+ - [ ] Payment: live keys, live webhook endpoint and signing secret
157
+ - [ ] SEO: `metadata` (title, description), Open Graph image, `sitemap.ts`, `robots.ts`, favicon
158
+ - [ ] Lighthouse (mobile): Performance ≥ 90, Accessibility ≥ 90, SEO ≥ 90
159
159
  - [ ] Core Web Vitals: LCP < 2.5s, CLS < 0.1, INP < 200ms
160
- - [ ] `not-found.tsx` ve `error.tsx` özelleştirildi
161
- - [ ] Alan adı + `www` yönlendirme + SSL (Vercel otomatik)
162
- - [ ] Sentry kaynak haritaları (source map) yükleniyor
160
+ - [ ] `not-found.tsx` and `error.tsx` customized
161
+ - [ ] Domain + `www` redirect + SSL (Vercel automatic)
162
+ - [ ] Sentry source maps are uploaded
163
163
 
164
- ## Bakım (ek)
164
+ ## Maintenance (extra)
165
165
 
166
- - Haftalık: Vercel kullanım (bandwidth, function süresi), Supabase kullanım (DB boyutu, MAU).
167
- - Aylık: `npm outdated`, `npm audit`, Lighthouse tekrar.
168
- - Çeyreklik: Next.js / Supabase majör sürüm notları; Supabase yedekleri (ücretsiz katmanda PITR yok, kendi yedeğini al: `supabase db dump`).
169
- - Ücretsiz Supabase projesi hareketsiz kalınca duraklatılabilir; canlı projede ücretli plana geç veya bunu izle.
166
+ - Weekly: Vercel usage (bandwidth, function duration), Supabase usage (DB size, MAU).
167
+ - Monthly: `npm outdated`, `npm audit`, rerun Lighthouse.
168
+ - Quarterly: Next.js / Supabase major version notes; Supabase backups (no PITR on the free tier, take your own backup: `supabase db dump`).
169
+ - A free Supabase project can be paused when idle; on a live project move to a paid plan or watch this.
@@ -1,71 +1,71 @@
1
- # Proje yapısı: Web / SaaS (Next.js App Router)
1
+ # Project structure: Web / SaaS (Next.js App Router)
2
2
 
3
- > Bu dosya `.claude/structure.json` haritasının insan için açıklamasıdır; ikisi birlikte güncellenir.
4
- > Yapıya uyum zorunludur: yazım anında hook, her PR'da CI, kurul Mimarı ve `/findings-tech` denetler.
3
+ > This file is the human explanation of the `.claude/structure.json` map; the two are updated together.
4
+ > Following the structure is mandatory: the hook checks at write time, CI on every PR, the board Architect and `/findings-tech` review it.
5
5
 
6
- ## Kod
6
+ ## Code
7
7
 
8
8
  ```
9
9
  src/
10
- ├── app/ # SADECE rotalar: page, layout, loading, error, route handler. İş mantığı yok.
11
- │ ├── (marketing)/ # açılış, fiyat, blog
12
- │ ├── (auth)/ # giriş, kayıt, şifre sıfırlama
13
- │ ├── (app)/ # giriş gerektiren uygulama
14
- │ └── api/ # webhook ve dış API uçları
10
+ ├── app/ # ONLY routes: page, layout, loading, error, route handler. No business logic.
11
+ │ ├── (marketing)/ # landing, pricing, blog
12
+ │ ├── (auth)/ # sign in, sign up, password reset
13
+ │ ├── (app)/ # the app that needs login
14
+ │ └── api/ # webhook and external API endpoints
15
15
  ├── features/
16
- │ └── <özellik>/ # örn. invoice/
17
- │ ├── components/ # sadece bu özelliğin bileşenleri
18
- │ ├── hooks/ # istemci hook'ları
19
- │ ├── server/ # server actions, sorgular, servisler (sunucuda çalışır)
20
- │ ├── lib/ # özelliğe özel yardımcılar
21
- │ ├── __tests__/ # birim ve entegrasyon testleri
22
- │ ├── schemas.ts # Zod şemaları
16
+ │ └── <feature>/ # e.g. invoice/
17
+ │ ├── components/ # components of this feature only
18
+ │ ├── hooks/ # client hooks
19
+ │ ├── server/ # server actions, queries, services (run on the server)
20
+ │ ├── lib/ # feature-specific helpers
21
+ │ ├── __tests__/ # unit and integration tests
22
+ │ ├── schemas.ts # Zod schemas
23
23
  │ ├── types.ts
24
- │ └── index.ts # özelliğin dışa açtığı tek kapı
24
+ │ └── index.ts # the only gate the feature exposes
25
25
  ├── components/
26
- │ └── ui/ # shadcn/ui ve paylaşılan sunum bileşenleri
27
- ├── hooks/ # birden fazla özelliğin kullandığı hook'lar
28
- ├── lib/ # altyapı istemcileri: supabase/, stripe/, email/, sentry
29
- ├── config/ # ortam değişkeni doğrulama (env.ts), sabitler
30
- ├── styles/ # global stiller, tasarım belirteçleri (DESIGN.md'den)
31
- ├── types/ # global tipler
26
+ │ └── ui/ # shadcn/ui and shared presentational components
27
+ ├── hooks/ # hooks used by more than one feature
28
+ ├── lib/ # infrastructure clients: supabase/, stripe/, email/, sentry
29
+ ├── config/ # environment variable validation (env.ts), constants
30
+ ├── styles/ # global styles, design tokens (from DESIGN.md)
31
+ ├── types/ # global types
32
32
  └── middleware.ts
33
- public/ # statik dosyalar
33
+ public/ # static files
34
34
  tests/
35
- ├── e2e/ # Playwright kabul testleri (Ö-01.1 ...)
36
- └── live/ # canlı izleme testleri (veri silmeyen)
37
- supabase/migrations/ # veritabanı değişiklikleri SADECE burada
35
+ ├── e2e/ # Playwright acceptance tests (Ö-01.1 ...)
36
+ └── live/ # live monitoring tests (that delete no data)
37
+ supabase/migrations/ # database changes ONLY here
38
38
  ```
39
39
 
40
- ## Her projede ortak
40
+ ## Common to every project
41
41
 
42
42
  ```
43
43
  .
44
- ├── .claude/ # Claude Code: komutlar, ajanlar, hook'lar, kurul, bulgular, structure.json
45
- ├── .github/ # CI, Dependabot, bulut ajanları
44
+ ├── .claude/ # Claude Code: commands, agents, hooks, board, findings, structure.json
45
+ ├── .github/ # CI, Dependabot, cloud agents
46
46
  ├── docs/
47
47
  │ ├── product/ # prd, roadmap, glossary, launch, feedback, unit-economics
48
- │ ├── architecture/ # overview, stack, structure (bu dosya)
49
- │ ├── design/ # design-guide (arayüz varsa)
50
- │ ├── decisions/ # log.md (karar günlüğü) + adr-NNNN-*.md (ayrıntılı kararlar)
48
+ │ ├── architecture/ # overview, stack, structure (this file)
49
+ │ ├── design/ # design-guide (if there is a UI)
50
+ │ ├── decisions/ # log.md (decision log) + adr-NNNN-*.md (detailed decisions)
51
51
  │ ├── quality/ # test-plan, metrics, retros
52
52
  │ ├── security/ # checklist
53
53
  │ ├── legal/ # privacy-kvkk
54
54
  │ ├── operations/ # release-checklist, maintenance, accounts, feature-flags
55
55
  │ ├── workflow/ # progress, decision-protocol, skills, board, usage-limits, cost-log
56
- │ ├── findings/ # /findings-* raporları (tür/tarih.md, latest.md)
57
- │ └── archive/ # artık geçerli olmayan ama saklanan dokümanlar
58
- ├── sandbox/ # deneme, keşif kodu, geçici script (git'e girmez)
56
+ │ ├── findings/ # /findings-* reports (type/date.md, latest.md)
57
+ │ └── archive/ # documents that are no longer valid but are kept
58
+ ├── sandbox/ # trials, exploration code, temporary scripts (not committed to git)
59
59
  ├── AGENTS.md CLAUDE.md README.md CHANGELOG.md
60
60
  └── .env.example
61
61
  ```
62
62
 
63
- ## Kurallar
63
+ ## Rules
64
64
 
65
- 1. **Yeni dosya, haritadaki yerine.** `.claude/structure.json` haritası dışına yazım sorulur; dağınıklık kalıpları (`*.bak`, `*-old.*`, `* copy*`, `temp/`, `deneme*`) engellenir. CI her PR'da tüm depoyu denetler.
66
- 2. **Özellik bazlı.** Bir özelliğe ait her şey (bileşen, mantık, test) `features/<özellik>/` altında durur. Bir kod iki özellik tarafından kullanılmaya başlarsa paylaşılan katmana (`components/`, `lib/`, `shared/`) taşınır.
67
- 3. **Özellikler birbirinin içine girmez.** `features/a` başka bir özelliğin iç dosyalarını içe aktarmaz; sadece o özelliğin `index` dosyasından dışa açtıklarını kullanır.
68
- 4. **Adlandırma:** Klasörler ve dosyalar `kebab-case`. React bileşen dosyaları `PascalCase.tsx` olabilir; Python modülleri `snake_case.py`. Özellik klasör adı tekil ve İngilizce (`invoice`, `customer`).
69
- 5. **Geçici ve alakasız işler** `sandbox/` altına. İşe yarayan bir şey çıkarsa doğru yere taşınır; `sandbox/` düzenli temizlenir.
70
- 6. **Eski dokümanlar** silinmez, `docs/archive/` altına taşınır ve başına neden arşivlendiği yazılır.
71
- 7. **Haritayı değiştirmek** (yeni üst klasör, yeni katman) bir `teknik` karardır: kullanıcıya sorulur, `docs/decisions/` altına kaydedilir, sonra `.claude/structure.json` ve bu dosya güncellenir.
65
+ 1. **A new file goes to its place in the map.** Writing outside the `.claude/structure.json` map is asked about; clutter patterns (`*.bak`, `*-old.*`, `* copy*`, `temp/`, `deneme*`) are blocked. CI checks the whole repo on every PR.
66
+ 2. **By feature.** Everything that belongs to a feature (component, logic, test) stays under `features/<feature>/`. When a piece of code starts to be used by two features, it moves to the shared layer (`components/`, `lib/`, `shared/`).
67
+ 3. **Features do not reach into each other.** `features/a` does not import the internal files of another feature; it uses only what that feature exposes from its `index` file.
68
+ 4. **Naming:** Folders and files use `kebab-case`. React component files may use `PascalCase.tsx`; Python modules use `snake_case.py`. A feature folder name is singular and English (`invoice`, `customer`).
69
+ 5. **Temporary and unrelated work** goes under `sandbox/`. If something useful comes out, it moves to the right place; `sandbox/` is cleaned regularly.
70
+ 6. **Old documents** are not deleted; they move under `docs/archive/` with a line at the top saying why they were archived.
71
+ 7. **Changing the map** (a new top-level folder, a new layer) is a `teknik` decision: ask the user, record it under `docs/decisions/`, then update `.claude/structure.json` and this file.
@@ -1,55 +1,55 @@
1
- # Tasarım
1
+ # Design
2
2
 
3
- > Arayüzün tek kaynağı üç dosyadır:
4
- > - `PRODUCT.md`: ürün bağlamı (kim, ne için). Impeccable `init` ile, PRD'den beslenerek yazılır.
5
- > - `DESIGN.md`: görsel dünya ve tasarım belirteçleri (renk, yazı, boşluk, köşe, gölge, hareket). Impeccable yazar; bileşenler sadece bu belirteçleri kullanır.
6
- > - Bu dosya: seçilen yön, tasarım karar günlüğü ve her ekranda geçerli kalıcı kurallar.
3
+ > The interface has three sources of truth:
4
+ > - `PRODUCT.md`: product context (who, for what). Written with Impeccable `init`, fed from the PRD.
5
+ > - `DESIGN.md`: visual world and design tokens (color, type, spacing, corners, shadow, motion). Impeccable writes it; components use only these tokens.
6
+ > - This file: the chosen direction, the design decision log and the lasting rules that apply on every screen.
7
7
  >
8
- > Kararlar `/design` ile **görsel önizlemelerle** alınır (`docs/workflow/decision-protocol.md` §5). Yeni bir renk, boyut veya bileşen
9
- > gerekiyorsa önce karar olarak sorulur, sonra DESIGN.md'ye eklenir. Kodda ham renk veya rastgele boyut yazılmaz.
8
+ > Decisions are made with `/design` using **visual previews** (`docs/workflow/decision-protocol.md` §5). If a new color, size or component
9
+ > is needed, it is asked as a decision first, then added to DESIGN.md. No raw colors or arbitrary sizes in code.
10
10
 
11
- ## 1. Seçilen yön
11
+ ## 1. Seçilen yön (Chosen direction)
12
12
 
13
- | Alan | Seçim | Skill | Önizleme | Tarih |
13
+ | Area | Choice | Skill | Preview | Date |
14
14
  |---|---|---|---|---|
15
- | Stil yönü | [örn. Premium / Apple tarzı] | [örn. taste-skill:high-end-visual-design] | `.previews/01-stil/b.html` | |
16
- | Renk paleti | | ui-ux-pro-max | | |
17
- | Yazı tipi çifti | | ui-ux-pro-max | | |
18
- | Köşe / gölge / hareket | | | | |
19
- | Koyu tema | | | | |
20
- | Hitap (sen/siz) | | | | |
15
+ | Style direction | [e.g. Premium / Apple style] | [e.g. taste-skill:high-end-visual-design] | `.previews/01-stil/b.html` | |
16
+ | Color palette | | ui-ux-pro-max | | |
17
+ | Font pair | | ui-ux-pro-max | | |
18
+ | Corners / shadow / motion | | | | |
19
+ | Dark theme | | | | |
20
+ | Form of address (informal/formal) | | | | |
21
21
 
22
- ## 2. Tasarım karar günlüğü
22
+ ## 2. Design decision log
23
23
 
24
- | # | Tarih | Ekran/kapsam | Soru | Seçilen | Önizleme |
24
+ | # | Date | Screen/scope | Question | Chosen | Preview |
25
25
  |---|---|---|---|---|---|
26
26
 
27
- ## 3. Bileşenler
27
+ ## 3. Components
28
28
 
29
- - Önce `components/ui/` (shadcn) içinde var mı bak; varsa onu kullan, kopyalayıp değiştirme.
30
- - Buton varyantları: `default` (sayfada en fazla 1 ana eylem), `secondary`, `outline`, `ghost`, `destructive`.
31
- - Form: etiket her zaman görünür (sadece placeholder değil), hata mesajı alanın altında, gönderirken buton devre dışı + yükleniyor.
32
- - Tablo/liste: boş durum bileşeni + yükleniyor iskeleti (skeleton) zorunlu.
33
- - İkonlar: [lucide-react], tek set.
29
+ - First check whether it exists in `components/ui/` (shadcn); if it does, use it, do not copy and change it.
30
+ - Button variants: `default` (at most 1 main action per page), `secondary`, `outline`, `ghost`, `destructive`.
31
+ - Form: the label is always visible (not only a placeholder), the error message sits under the field, the button is disabled + loading while submitting.
32
+ - Table/list: an empty-state component + a loading skeleton are required.
33
+ - Icons: [lucide-react], a single set.
34
34
 
35
- ## 4. Durumlar (her ekranda)
35
+ ## 4. States (on every screen)
36
36
 
37
- | Durum | Nasıl görünür |
37
+ | State | How it looks |
38
38
  |---|---|
39
- | Yükleniyor | İskelet; 300 ms'den kısa yüklemelerde hiçbir şey |
40
- | Boş | Ne olacağını anlatan bir cümle + ilk adım butonu |
41
- | Hata | Ne oldu + ne yapabilir (tekrar dene / destek); teknik detay yok |
42
- | Başarılı işlem | Kısa bildirim (toast), 3-4 sn |
39
+ | Loading | Skeleton; nothing for loads shorter than 300 ms |
40
+ | Empty | One sentence saying what will be here + a first-step button |
41
+ | Error | What happened + what the user can do (retry / support); no technical detail |
42
+ | Successful action | Short notification (toast), 3-4 s |
43
43
 
44
- ## 5. Erişilebilirlik
44
+ ## 5. Accessibility
45
45
 
46
- - Metin kontrastı en az 4.5:1 (büyük metin 3:1); iki temada da.
47
- - Klavye ile her şeye ulaşılır, odak halkası görünür.
48
- - Görsellerde `alt`, ikon butonlarda `aria-label`.
49
- - Mobil genişlikte (375 px) yatay kaydırma yok, dokunma alanı en az 44 px.
46
+ - Text contrast at least 4.5:1 (large text 3:1); in both themes.
47
+ - Everything is reachable by keyboard, the focus ring is visible.
48
+ - `alt` on images, `aria-label` on icon buttons.
49
+ - No horizontal scroll at mobile width (375 px), touch target at least 44 px.
50
50
 
51
- ## 6. Metin dili
51
+ ## 6. Copy language
52
52
 
53
- - Hitap: [sen/siz] (`docs/product/glossary.md` ile aynı).
54
- - Butonlar fiil: "Kaydet", "Fatura oluştur"; "Tamam", "Gönder" gibi belirsiz değil.
55
- - Hata mesajı suçlamaz ve çözümü söyler: "E-posta adresi geçerli değil. Örnek: ad@alan.com".
53
+ - Form of address: [informal/formal] (same as `docs/product/glossary.md`).
54
+ - Buttons are verbs: "Save", "Create invoice"; not vague ones like "OK", "Submit".
55
+ - An error message does not blame the user and says the fix: "The email address is not valid. Example: name@domain.com".
@@ -6,14 +6,14 @@ import { test, expect } from '@playwright/test';
6
6
  const BASE = process.env.BASE_URL ?? 'http://localhost:3000';
7
7
  const MAX_MS = Number(process.env.LIVE_MAX_MS ?? 3000);
8
8
 
9
- test('canlı: ana sayfa açılıyor, yanıt süresi sınırda, konsolda hata yok', async ({ page }) => {
9
+ test('live: home page opens, response time within the limit, no console errors',async ({ page }) => {
10
10
  const errors: string[] = [];
11
11
  page.on('console', (m) => { if (m.type() === 'error') errors.push(m.text()); });
12
12
  page.on('pageerror', (e) => errors.push(e.message));
13
13
  const start = Date.now();
14
14
  const response = await page.goto(BASE, { waitUntil: 'domcontentloaded' });
15
15
  const ms = Date.now() - start;
16
- expect(response?.ok(), `durum kodu ${response?.status()}`).toBe(true);
17
- expect(ms, `ana sayfa ${ms} ms (sınır ${MAX_MS} ms)`).toBeLessThan(MAX_MS);
18
- expect(errors, `konsol hatası: ${errors[0] ?? ''}`).toEqual([]);
16
+ expect(response?.ok(), `status code ${response?.status()}`).toBe(true);
17
+ expect(ms, `home page ${ms} ms (limit ${MAX_MS} ms)`).toBeLessThan(MAX_MS);
18
+ expect(errors, `console error: ${errors[0] ?? ''}`).toEqual([]);
19
19
  });