--- type: decision-log status: mixed updated: 2026-06-07 tags: [decisions, meta] --- # ⚖️ Decision Log > Significant decisions with context, alternatives, and outcomes. Technical decisions below are **verified** from project memory files & commits. Add life/career decisions over time using [[Decision Log (template)]]. ## Index (Dataview) ```dataview table type, date, status from "60 - Knowledge/Decisions" or "30 - Projects" where decision = true sort date desc ``` --- ## Verified Technical / Product Decisions ### TD-001 · Usage is always *derived*, never accumulated (Tia quotas) - **Date:** 2026-05-27 · **Project:** [[Tia]] - **Context:** Free-tier storage guardrails (1 GiB/family, 2 members/family) before beta. - **Decision:** Compute storage usage as a live `SUM` of confirmed rows; never maintain a running counter. Pending/uploading rows excluded. - **Alternatives:** Incrementing counter (rejected — drifts, hard to reconcile after failures). - **Outcome:** 44 passing unit tests; reconciliation trivial. → [[Tia - Decisions]] ### TD-002 · `tier` as the single plan indicator (no separate `plan` column) - **Date:** 2026-05-27 · **Project:** [[Tia]] - **Decision:** Reuse existing `families.tier` ('free'/'pro'); payment logic abstracted behind `isPaidFamily(tier)` so the billing provider can be swapped in one function. - **Why it matters:** Minimised schema churn; clean seam for provider changes. ### TD-003 · Route migrations through a hot-apply debug endpoint - **Date:** 2026-05-30 · **Project:** [[Tia]] - **Context:** Drizzle silently skipped migrations 0003–0010 (hand-added 2025 timestamps < 2026 baseline). - **Decision:** Adopt `POST /api/debug-migration` for safe, idempotent hot-fixes; **go-forward rule: new migration `when` must be `Date.now()`**. - **Outcome:** pgvector + error_events live on prod; documented in CLAUDE.md. → [[Tia - Architecture]] ### TD-004 · Proxy all R2 images through `/api/img` - **Date:** ~2026-05 · **Project:** [[Tia]] (commit a3a0ddf) - **Context:** Cloudflare Bot Management 503s cross-origin `` requests to `*.r2.dev`. - **Decision:** Server-side proxy endpoint + `toProxyUrl()`; never use raw r2.dev URLs in `src`. - **Outcome:** All uploaded media renders reliably. → [[Self-Hosting]] ### TD-005 · Split app into (marketing) and (app) route groups - **Date:** 2026-05 · **Project:** [[Tia]] - **Decision:** `/` is always the static marketing page; app dashboard moved to `/home`. DB/auth code must never enter the (marketing) group (preserves static rendering). ### TD-006 · Credentials only in Dokploy env, never in git - **Date:** 2026-06 · **Project:** [[obsidian-stack]] - **Decision:** COUCHDB_USER/PASSWORD, BASIC_AUTH_USERS live solely in the Dokploy Environment tab. → [[Self-Hosting]] --- ## ✍️ Career / Life decisions to capture (prompts) - [ ] **Why renewables?** The decision to specialise post-MBA. - [ ] **PwC → ReNew** — what drove the move from advisory to principal-side? - [ ] **Why build Tia?** (the founding decision — see [[Tia - Origin Story]]) - [ ] **Self-hosting over SaaS** — the decision to run your own infra. ## Related [[Profile]] · [[Timeline]] · [[Tia - Decisions]] · [[Home]]