D14
Proje kimliğiProje kodlarıDiğer adlar: design decision 14
Kalıcı bağlantıDesign decision 14: normalise personal data separately for Meta and Google before SHA-256 hashing.
Meta and Google follow different formatting rules before hashing customer identifiers, so reusing one pre-hashed string breaks match quality on at least one platform. Under D14, phone numbers strip the leading + for Meta and keep + E.164 for Google, Gmail dots and + aliases are stripped for Google, and names send the spec-exact lower-cased UTF-8 hash first (OD-16). For example, +905321234567 hashes without + for Meta and with + for Google.
Bu depoda nasıl kullanılır
Recorded in design/DECISIONS.md (updated under OD-16), enforced by AGENTS.md rule 9 and implemented in one shared module packages/shared/src/pii-normalization.ts.
İlgili dosyalar:design/DECISIONS.mdpackages/shared/src/pii-normalization.tsAGENTS.md
D20
Proje kimliğiProje kodlarıDiğer adlar: design decision 20
Kalıcı bağlantıDesign decision 20: keep Google Business Profile API sync out of Release 1 due to Google's 60-day verified-profile gate.
Google requires a verified business profile to sit active for 60 days plus manual API approval before granting Google Business Profile API access. Rather than stalling Release 1 on an external approval clock, D20 ships local SEO checks on the shop's own website first and starts the 60-day clock in parallel for Release 2. For example, Release 1 checks LocalBusiness structured data and NAP consistency on the storefront itself.
Bu depoda nasıl kullanılır
Recorded in design/DECISIONS.md and enforced by AGENTS.md rule 5 so no Release 1 screen falsely claims live Google Business Profile sync.
İlgili dosyalar:design/DECISIONS.mdAGENTS.md
daily budget
TR: günlük bütçeKavramBağlayıcılar ve CRMDiğer adlar: daily_budget
Kalıcı bağlantıThe maximum amount an ad set or campaign is configured to spend per day, always stored in integer minor units.
Ad platforms pace spending throughout the day against a configured daily_budget on each campaign or ad set. In this product, changing a daily budget is the flagship governed write action: every proposal specifies the exact integer before-and-after difference, must stay within the workspace max_budget_step_bps (default 20 percent) and max_daily_ad_budget_minor ceiling, and requires step-up MFA above the configured threshold. For example, raising a Meta ad set from 50000 kuruş (500 TRY) to 60000 kuruş (600 TRY) is a 20 percent step that passes the ceiling, whereas 65000 kuruş (30 percent) is blocked at proposal time. The executor reads the live daily budget back before and after writing.
Bu depoda nasıl kullanılır
Governed in docs/schema.sql (workspaces.max_daily_ad_budget_minor, max_budget_step_bps) and executed in apps/api/src/approvals/ against test ad accounts unless live execution is signed off.
İlgili dosyalar:docs/schema.sql
daily budget ceiling
TR: günlük bütçe üst sınırıKavramOnaylar ve otomasyonDiğer adlar: daily ceiling, budget ceiling, max_daily_ad_budget_minor, daily spend ceiling, DAILY_BUDGET_CEILING_EXCEEDED
Kalıcı bağlantıThe maximum daily ad budget permitted by a workspace — 5,000 lira (500_000 kuruş) by default — above which proposals are refused.
A typo that turns 500 lira into 50,000 lira can drain a small business's monthly marketing cash in hours. Setting a per-workspace daily budget ceiling in minor units blocks any proposal whose target budget exceeds the owner's comfort limit. Combined with the workspace aggregate ceiling, it caps both single-campaign and multi-campaign spend.
Bu depoda nasıl kullanılır
Stored as max_daily_ad_budget_minor (BIGINT, default 500000 kuruş) in docs/schema.sql and enforced in packages/approvals/src/guardrails.ts (DAILY_BUDGET_CEILING_EXCEEDED).
İlgili dosyalar:docs/schema.sqlpackages/approvals/src/guardrails.ts
daily token cap
KavramÜründe yapay zekaDiğer adlar: proposed_daily_token_cap
Kalıcı bağlantıThe maximum number of tokens a workspace AI workflow may consume in one calendar day.
A monthly spending limit catches slow budget creep, while a daily token cap stops a sudden bug or retry loop from burning an entire month of capacity in an afternoon. Enforcing a daily cap also prevents one noisy workspace from starving other tenants sharing the same self-hosted GPU. For example, if an escalation request asks for a daily cap above the workspace plan ceiling, the check rejects it before any traffic changes. Today the cap is evaluated in pre-check logic until live vLLM serving connects.
Bu depoda nasıl kullanılır
Built in apps/api/src/routes/approvals-agent-autonomy-escalation-preflight.ts as proposed_daily_token_cap; live per-day metering will wire in when vLLM serving goes live.
İlgili dosyalar:apps/api/src/routes/approvals-agent-autonomy-escalation-preflight.ts
dark mode
TR: karanlık modKavramÖn yüz ve tasarımDiğer adlar: data-theme="dark", dark theme, karanlık mod, Koyu
Kalıcı bağlantıThe light-on-dark colour theme toggled by data-theme="dark" on <html>, where every colour token switches to a calibrated dark value.
True dark mode is not a naive colour inversion; surfaces need slightly lifted neutral tones, borders need stronger field contrast, and accents must brighten enough to stay at least 4.5:1 against dark panels. Storing all dark overrides alongside light tokens in one file keeps every primitive consistent without per-component theme branching. For example, dark mode still resets cleanly to black-on-white when printed via @media print.
Bu depoda nasıl kullanılır
Controlled by WorkspaceUiProvider in apps/web/src/lib/workspace-context.tsx setting <html data-theme="dark"> and backed by [data-theme="dark"] tokens in packages/ui/src/tokens.css.
İlgili dosyalar:packages/ui/src/tokens.cssapps/web/src/lib/workspace-context.tsx
data controller
TR: veri sorumlusuKavramHukuk, vergi ve ödemeDiğer adlar: veri sorumlusu, controller
Kalıcı bağlantıThe person or business that decides why and how personal data is processed and carries primary legal responsibility under KVKK.
Privacy law splits responsibility between the party who decides the purpose of data processing and the vendor who handles the data on their behalf. The data controller chooses what data to collect, writes the privacy notice, collects explicit consent and answers data-subject erasure requests. For example, when an Istanbul leather shop collects its buyers' phone numbers and tells its marketing software to sync consented purchases to Meta, the leather shop is the data controller for its buyers' records. Knowing who the controller is determines whose legal basis governs every downstream transfer.
Bu depoda nasıl kullanılır
Designed in docs/COUNSEL-BRIEF.md (C3) and docs/KVKK-AYDINLATMA-DRAFT.md: each small business acts as data controller for its own customer data while the product intends to act strictly as data processor under a written DPA pending issue 3.
İlgili dosyalar:docs/COUNSEL-BRIEF.mddocs/KVKK-AYDINLATMA-DRAFT.md
data definition language
DDLKavramVeri ve PostgreSQLDiğer adlar: CREATE TABLE, ALTER TABLE
Kalıcı bağlantıSQL statements that define or change database structure, such as CREATE TABLE, ALTER TABLE, or CREATE POLICY.
SQL splits roughly into statements that read or edit rows (SELECT, INSERT, UPDATE, DELETE) and data definition language statements that create or alter tables, columns, constraints, indexes, roles, and policies. Running DDL only through reviewed migration roles keeps runtime application logins unable to reshape tables. For example, ALTER TABLE public.tracking_events ADD COLUMN IF NOT EXISTS dispatch_lease_id uuid is a DDL statement run by the migration role, never by {product}_app.
Bu depoda nasıl kullanılır
All DDL lives in docs/schema.sql, deploy/postgres/init-roles.sql, and packages/db/migrations/; {product}_app has CREATE revoked on schema public.
İlgili dosyalar:docs/schema.sqldeploy/postgres/init-roles.sql
data encryption key
DEKTR: veri şifreleme anahtarıKavramKriptografi ve gizlilerDiğer adlar: data key, workspace data key, workspace DEK, vault.workspace_deks
Kalıcı bağlantıThe 256-bit key that directly encrypts stored secrets, kept in the database only after being wrapped by the master key.
In envelope encryption, each tenant or sealed record gets its own data encryption key so compromising or shredding one workspace's key never affects another workspace. The plaintext DEK exists only briefly in process memory while encrypting or decrypting and is zeroised immediately afterward. For example, Workspace A's OAuth tokens are encrypted with Workspace A's DEK, and that DEK is stored in vault.workspace_deks wrapped under the master KEK.
Bu depoda nasıl kullanılır
Generated, wrapped, and zeroised by packages/vault/src/envelope.ts, stored per workspace in vault.workspace_deks in docs/schema.sql, and generated fresh per blob in apps/api/src/connections/oauth/sealing.ts.
İlgili dosyalar:packages/vault/src/envelope.tsdocs/schema.sql
data minimisation
TR: veri minimizasyonuKavramHukuk, vergi ve ödemeDiğer adlar: data minimization, veri minimizasyonu
Kalıcı bağlantıThe rule of collecting, storing and forwarding only the smallest set of personal data needed for a stated purpose.
Every extra personal field you keep or forward increases breach impact, consent scope and regulatory risk without adding value. Data minimisation requires dropping unused identifiers at the boundary and keeping raw secrets out of analytics tables and logs. For example, during Wave 45 a browser sent pre-split country-code and local phone hashes that neither Meta nor Google could use; stripping those useless fields at the edge collector fixed a 400 ingest failure while honouring KVKK data minimisation. Similarly, storing only the last four digits of an IBAN in audit receipts avoids exposing full bank account numbers.
Bu depoda nasıl kullanılır
Built and verified locally across apps/collector, docs/schema.sql (tracking_events stores digests only, zero raw e-mail/phone/IP) and packages/payments/src/iyzico-adapter.ts (ibanLast4 and taxNumberSha256Hex in audit receipts).
İlgili dosyalar:docs/COUNSEL-BRIEF.mddocs/schema.sqlpackages/payments/src/iyzico-adapter.ts
data portability
TR: veri taşınabilirliğiKavramHukuk, vergi ve ödemeDiğer adlar: veri taşınabilirliği, portability
Kalıcı bağlantıA customer's right and practical ability to export all of their own operating records in a standard format and move to another tool.
Vendor lock-in happens when software lets data flow in easily but traps history behind high-tier paywalls or broken reports when a customer wants to leave. Data portability gives every customer a complete, machine-readable copy of their records—such as contacts, orders, approvals, consent logs and audit trails—without asking for permission or upgrading plans. For example, a shop cancelling its plan in one click can first download a versioned JSON and CSV archive of every order and consent record so its accountant and next tool start cleanly. Vault credentials are excluded from exports so secrets never leak into downloaded files.
Bu depoda nasıl kullanılır
Built and verified locally in apps/api/src/routes/exports.ts and specified in docs/DATA-MIGRATION-AND-PORTABILITY-SPEC.md as a base-tier right on every plan (never a paid add-on).
İlgili dosyalar:apps/api/src/routes/exports.tsdocs/DATA-MIGRATION-AND-PORTABILITY-SPEC.md
data processing agreement
DPATR: Veri İşleme SözleşmesiKavramHukuk, vergi ve ödemeDiğer adlar: DPA, Veri İşleme Sözleşmesi, kvkk_dpa_accepted_at
Kalıcı bağlantıThe binding contract between a data controller and a data processor setting out permitted processing, security duties and sub-processor limits.
When a small business connects its store and CRM to a cloud platform, privacy law expects a written contract defining what the platform may and may not do with customer records. A data processing agreement states that the processor acts only on documented instructions, keeps data confidential, supports erasure requests and lists any sub-processors. For example, a DPA clarifies that turning on Meta CAPI or Google Data Manager forwards consented hashed data abroad on the shop's instruction as controller, not for the software vendor's own advertising. Recording acceptance timestamps proves when the contractual boundary took effect.
Bu depoda nasıl kullanılır
Designed in docs/COUNSEL-BRIEF.md (C3) with schema column workspaces.kvkk_dpa_accepted_at in docs/schema.sql; final Turkish DPA text awaits written KVKK counsel sign-off on issue 3.
İlgili dosyalar:docs/COUNSEL-BRIEF.mddocs/schema.sql
data processor
TR: veri işleyenKavramHukuk, vergi ve ödemeDiğer adlar: veri işleyen, processor
Kalıcı bağlantıA person or company that processes personal data strictly on behalf of a data controller and only under its documented instructions.
A data processor provides technical infrastructure or software without deciding its own commercial purpose for the personal data inside it. Under KVKK, a processor must still implement strong technical and administrative security measures, prevent unauthorised access and obey deletion instructions. For example, a marketing operating system hosting a shop's CRM contacts and firing server-side events only when the shop's consent gate passes acts as a data processor, never selling or pooling those contacts across other tenants. Acting outside controller instructions risks making the vendor an unlawful controller.
Bu depoda nasıl kullanılır
Designed in docs/COUNSEL-BRIEF.md (C3) and backed technically by FORCE ROW LEVEL SECURITY and isolated vault.* schemas in docs/schema.sql; legal role wording awaits counsel review on issue 3.
İlgili dosyalar:docs/COUNSEL-BRIEF.mddocs/schema.sql
data residency
TR: veri yerleşimiKavramHukuk, vergi ve ödemeDiğer adlar: kvkk_residency, TR_LOCAL, EU_CENTRAL, US_EAST, KVKK barındırma, database residency, KVKK cross-border residency
Kalıcı bağlantıThe country or region where a workspace's database physically stores personal data, which determines whether cross-border transfer rules apply.
Where servers sit physically changes the legal paperwork required at customer onboarding. Storing Turkish personal data on a server in Germany counts as a cross-border transfer under KVKK Article 9, requiring every Turkish customer to sign and notify standard contractual clauses within five business days. For example, hosting live Turkish workspace databases on a Turkey-resident server (TR_LOCAL) keeps the business-to-platform storage leg domestic, while non-PII staging can run on a cheaper European server. Even with local database residency, any foreign edge proxy or e-mail relay must still be checked by counsel.
Bu depoda nasıl kullanılır
Decided in docs/OWNER-DECISIONS.md (OD-04: EU staging with sample data only, Turkey-resident PostgreSQL before the first live Turkish business) and built into workspaces.kvkk_residency in docs/schema.sql; production Turkish server is not deployed yet and sub-processor transit awaits issue 3 (C1).
İlgili dosyalar:docs/OWNER-DECISIONS.mddocs/schema.sqldocs/adr/0007-kvkk-consent-gate-and-db-residency.mddocs/COUNSEL-BRIEF.md
data room
TR: veri odasıKavramİş modeli ve pazarDiğer adlar: virtual data room
Kalıcı bağlantıThe organised collection of strategy, financial, legal and technical documents shared with prospective investors so they can verify every claim independently.
During pre-seed or seed due diligence, investors look beyond a slide deck to inspect underlying spreadsheets, legal briefs, architecture decisions and honest risk disclosures. A credible pre-launch data room separates locally verified engineering artefacts from forward-looking models and lists every open external gate plainly instead of hiding them. For example, pairing INVESTOR-MEMO-PRE-SEED.md, FINANCIAL-MODEL-36M.md, PRICING-AND-UNIT-ECONOMICS-FAQ.md, COUNSEL-BRIEF.md and BOARD-KPI-AND-GOVERNANCE-CHARTER.md lets an investor verify every number back to its assumptions.
Bu depoda nasıl kullanılır
Assembled as markdown strategy and diligence documents under docs/, explicitly stamped MODEL / PROJECTION with zero live traction or investor commitments claimed.
İlgili dosyalar:docs/INVESTOR-MEMO-PRE-SEED.mddocs/FINANCIAL-MODEL-36M.mddocs/PRICING-AND-UNIT-ECONOMICS-FAQ.md
data source label
KavramOperasyon ve doğrulamaDiğer adlar: dataSource, sample_memory, postgres_rls, memory mode
Kalıcı bağlantıThe field returned by the API health check stating whether answers come from real PostgreSQL or built-in sample memory.
When an API supports both a real database and an in-memory sample mode for local demos, operators and tests need an unmistakable signal of which mode is running. Exposing the data source in the health response prevents anyone from mistaking synthetic preview rows for durable database storage. For example, seeing sample_memory when you expected postgres_rls immediately reveals a misconfigured environment.
Bu depoda nasıl kullanılır
In apps/api/src/app.ts, GET /health returns dataSource as either postgres_rls or sample_memory, and loadApiRuntimeConfig in apps/api/src/platform/runtime-config.ts refuses to start in production without a real DATABASE_URL.
İlgili dosyalar:apps/api/src/app.tsapps/api/src/platform/runtime-config.ts
data subject
TR: ilgili kişiKavramHukuk, vergi ve ödemeDiğer adlar: ilgili kişi
Kalıcı bağlantıThe living individual whom a piece of personal data identifies or can identify, and who holds statutory rights over that data.
Under KVKK Article 11, every data subject has the right to ask whether their personal data is processed, learn why and to whom it was transferred, demand correction of errors and request erasure when the lawful basis ends. A company itself is a legal entity, not a data subject, whereas its customers, website visitors and named staff members are data subjects. For example, a shopper who buys a coat from an online store is the data subject for the phone number and e-mail address stored in the store's CRM. Honoring data-subject requests accurately requires tracking consent grants and erasure tombstones per individual.
Bu depoda nasıl kullanılır
Modelled per workspace contact in docs/schema.sql (crm_contacts, consent_grants, erased_at) and evaluated in the read-only pre-flight gate apps/api/src/routes/settings-kvkk-consent-erasure-preflight.ts.
İlgili dosyalar:docs/schema.sqlapps/api/src/routes/settings-kvkk-consent-erasure-preflight.ts
data table
TR: veri tablosuKavramÖn yüz ve tasarımDiğer adlar: DataTable
Kalıcı bağlantıThe closed-kit table primitive for structured records, supporting accessible column sorting, explicit loading/empty/error states, and dash formatting for null.
Financial and operational tables fail users when missing data displays as 0, sort order is invisible to screen readers, or narrow phones chop off columns silently. A proper data table uses semantic <table>, <thead>, aria-sort headers, tabular numerals for right-aligned amounts, and explicit states so loading, empty, and error views never look like zero revenue. For example, a spend column renders — for null and ₺0,00 only when confirmed spend is truly zero.
Bu depoda nasıl kullanılır
Built as pure-React DataTable in packages/ui/src/components/DataTable.tsx (note: @tanstack/react-table is mentioned in docs but not installed yet).
İlgili dosyalar:packages/ui/src/components/DataTable.tsx
A plain data structure shaped specifically for sending across an API boundary rather than exposing raw database rows.
Database tables often contain internal columns, hashed secrets or extra notes that callers should never see. Mapping internal records into a dedicated data transfer object guarantees that every field sent over HTTP is intentional and safe. For example, a marketer badge DTO returns only verified aggregate tiers and hides individual client names when fewer than three clients exist.
Bu depoda nasıl kullanılır
API routes and domain modules such as packages/payments/src/marketer-badges.ts build explicit DTO shapes so secret or raw PII columns never leak into responses.
İlgili dosyalar:packages/payments/src/marketer-badges.ts
data-testid
TR: test kimliğiKavramÖn yüz ve tasarımDiğer adlar: test id
Kalıcı bağlantıA dedicated HTML attribute used solely by automated tests to locate an element reliably even when user-facing copy or language changes.
Selectors tied to CSS class names break whenever styling refactors, and selectors tied to translated button text fail when Turkish copy is refined. Prefer accessible role-and-name queries first to test what users experience, and add a stable data-testid when a dynamic container or badge has no unique visible role. For example, browser tests locate the sample-data banner reliably in both Turkish and English via a stable test ID.
Bu depoda nasıl kullanılır
Used selectively alongside role-based locators in Playwright browser journeys under tests/browser/.
İlgili dosyalar:tests/browser
A durable, structured store of records that programs query and update under strict consistency rules.
Unlike process memory, which disappears when a server restarts and is private to each running process, a database writes changes durably to disk and coordinates concurrent readers and writers. Relational databases like PostgreSQL organize records into typed tables with constraints, indexes, and transactions. For example, the API, background worker, and dispatch process all coordinate through one PostgreSQL database so they always agree on every approval and event.
Bu depoda nasıl kullanılır
The entire product stores its durable state in one PostgreSQL 18+ database organized into three schemas: public (tenant data and ledger), auth (sessions and MFA), and vault (encrypted tokens and keys).
İlgili dosyalar:docs/schema.sql
database connection
KavramVeri ve PostgreSQLDiğer adlar: connection
Kalıcı bağlantıAn open network or socket link between an application client and one PostgreSQL backend process.
Each connection runs one SQL statement at a time and maintains its own session state (such as current role, active transaction, and session settings) until closed. Because connections are pooled and reused across different users and workspaces, every tenant-specific setting must be scoped to the transaction rather than the connection. For example, calling Promise.all with two queries on one checked-out connection violates its one-query-at-a-time model.
Bu depoda nasıl kullanılır
packages/db/src/tenant-tx.ts checks out one connection from pg.Pool per unit of work, runs SET LOCAL inside BEGIN ... COMMIT, and destroys the connection via client.release(true) if ROLLBACK fails.
İlgili dosyalar:packages/db/src/tenant-tx.tspackages/db/src/pool.ts
database function
KavramVeri ve PostgreSQLDiğer adlar: stored function, stored procedure, PL/pgSQL
Kalıcı bağlantıA named routine stored inside PostgreSQL (written in SQL or PL/pgSQL) that queries or triggers can invoke.
Database functions run inside the PostgreSQL server right next to the data, avoiding extra network round trips and guaranteeing that every caller executes the exact same SQL logic. Functions can serve as row-level security predicates, trigger bodies, or tightly controlled entry points (SECURITY DEFINER) into restricted schemas. For example, app_has_workspace_access(uuid) is a SQL function evaluated by every tenant RLS policy.
Bu depoda nasıl kullanılır
Core predicates (app_has_workspace_access, app_has_workspace_scope), approval guardrail triggers, and all auth.* access routines are stored PostgreSQL functions with PUBLIC execution revoked.
İlgili dosyalar:docs/schema.sqlpackages/db/migrations/0006_auth_durable_sessions_and_mfa.sql
database timeout
KavramVeri ve PostgreSQLDiğer adlar: lock_timeout, statement_timeout, idle_in_transaction_session_timeout, 55P03
Kalıcı bağlantıA server-enforced time cap on waiting for locks, running a query, or leaving a transaction idle.
Without timeouts, a single slow query or a crashed client holding an open transaction can queue up every other request until the connection pool stalls completely. Setting lock_timeout, statement_timeout, and idle_in_transaction_session_timeout directly on the database role guarantees PostgreSQL cancels runaway work automatically (for example with SQLSTATE 55P03 when a lock wait expires). For example, if a client hangs mid-transaction, PostgreSQL aborts the transaction after 30 seconds and frees its row locks.
Bu depoda nasıl kullanılır
deploy/postgres/init-roles.sql configures lock_timeout = '5s', statement_timeout = '30s', and idle_in_transaction_session_timeout = '30s' on both {product}_app_login and {product}_vault_login.
İlgili dosyalar:deploy/postgres/init-roles.sql