---
title: "Decision log"
url: https://memory.wiki/SrgEHFCI
updated: 2026-05-16T14:17:17.748Z
hub: https://memory.wiki/hub/demo
bundle_count: 1
concept_count: 12
source: "demo-seed"
---
# Decision log

ADR-style records. Append-only — never edit a decision, append a new one that supersedes.

## ADR-001 — Next.js App Router over Pages Router (2026-03-04)

**Context.** Greenfield project. Both routers are stable.
**Decision.** App Router.
**Why.** RSC + Cache Components match our data-heavy / read-mostly profile. Server Actions reduce API surface. Vercel ships features here first.
**Consequence.** Learning curve for hires familiar with Pages. Documented in onboarding.

## ADR-002 — Supabase over Neon + Clerk (2026-03-04)

**Context.** Need DB + auth.
**Decision.** Supabase for both.
**Why.** RLS lets auth and authz live next to data. One vendor. Cheaper at our stage.
**Consequence.** Vendor lock-in on auth. Acceptable — we'd rewrite auth before migrating off SB anyway.

## ADR-003 — Resend over SendGrid (2026-03-12)

**Context.** Transactional + marketing email.
**Decision.** Resend.
**Why.** DX, modern API, React Email templates we already use elsewhere.
**Consequence.** Less mature deliverability tooling. Revisit at $5k MRR.

## ADR-004 — pgvector over Pinecone (2026-04-02)

**Context.** Need vector similarity for AI features.
**Decision.** pgvector + HNSW in the existing Supabase Postgres.
**Why.** No extra vendor. JOINs with relational data are free. HNSW is fast enough up to ~10M vectors.
**Consequence.** When we exceed ~10M vectors we'll need to evaluate dedicated vector DB. Not soon.

## ADR-005 — Tailwind 4 over CSS Modules (2026-04-08)

**Context.** Component styling.
**Decision.** Tailwind 4 + a thin design-token layer.
**Why.** Faster iteration, smaller CSS bundle, shadcn/ui parity.
**Consequence.** Class lists get long. Use `clsx` + extracting to constants when a list exceeds 6 utilities.

## ADR-006 — Vercel AI Gateway over direct Anthropic SDK (2026-04-22)

**Context.** Multiple AI providers for failover.
**Decision.** Route through Vercel AI Gateway.
**Why.** Provider failover, zero data retention, observability built-in. Same vendor as hosting.
**Consequence.** One more hop in the request path. Latency p95 +30ms — acceptable.

## ADR-007 — Postgres over DynamoDB (2026-05-08)

**Context.** Block-level content with complex relationships.
**Decision.** Postgres.
**Why.** Three customer interviews flagged needs that require joins (cross-page analytics, block-level templates, A/B variant aggregation). Cost model showed PG cheaper up to ~50M rows.
**Consequence.** Will feel pain at ~100M rows. Revisit then.


---

## Concepts in this document
- **Supabase** _(entity)_
  Backend-as-a-service providing authentication, database, and row-level security without separate auth overhead.
- **Vendor consolidation** _(concept)_
  The operational principle of reducing authentication surfaces, SDKs, and control planes by keeping vector search within the existing Postgres infrastructure.
- **pgvector** _(entity)_
  PostgreSQL extension providing vector data type and HNSW indexing for efficient similarity search.
- **Authentication** _(tag)_
  Core security domain covering user identity, session management, and authorization patterns.
- **Database Design** _(tag)_
  Data modeling domain including schema design, migrations, and query optimization strategies.
- **API Design** _(tag)_
  RESTful interface design covering endpoints, error handling, and client-server communication.
- **Resend** _(entity)_
  Email service provider supporting both transactional and marketing communication channels.
- **Next.js App Router** _(entity)_
  Chosen routing framework leveraging RSC and Server Actions to match the project's data-heavy, read-mostly workload.
- **Vercel AI Gateway** _(entity)_
  AI provider abstraction layer offering failover and zero data retention for model access.
- **Next.js 15** _(entity)_
  Chosen frontend framework leveraging React Server Components and caching for performance.
- **Row-level security** _(concept)_
  Supabase RLS capability co-locating authentication and authorization with data, justifying single-vendor consolidation.
- **React Hook Form** _(entity)_
  Primary form handling library paired with Zod schemas for both client and server validation.

## Concept relations (within this doc's concepts)
- **Supabase** enables approach **Vendor consolidation**
- **Supabase** implements **Row-level security**
- **Supabase** hosts **pgvector**
- **Vercel AI Gateway** similar pattern **Resend**
- **Supabase** exemplifies approach **Vendor consolidation**
- **Row-level security** supports decision **Vendor consolidation**
- **Supabase** reduces complexity **Vendor consolidation**
- **Row-level security** supports **Vendor consolidation**
- **Supabase** integrates **pgvector**
- **Supabase** exemplifies strategy **Vendor consolidation**
- **Supabase** provides **Row-level security**
- **Vendor consolidation** guides **Supabase**
- **Vendor consolidation** guides **Vercel AI Gateway**

## Bundles containing this document
- [Cross-tool dev workflow](https://memory.wiki/b/p_mdtSk0)
  > Acme Pulse, a fictional landing-page builder. The seven docs in this bundle are the project's living context — README, auth pattern, DB schema, API conventions, UI patterns, decision log, open questio

_Hub canonical:_ https://memory.wiki/hub/demo
_Concept digest:_ https://memory.wiki/raw/hub/demo?digest=1&compact=1
