Skip to content
Docs

Command palette

Jump to a page or view, or find a todo by name.

Changelog

BJJ Travel maps the ARD onto this template

The repository's architectural decision, rationale and consequences.

Markdown

Status: accepted · Date: 2026-11-13 · Related: ADR-0017, ADR-0018, ADR-0019, ADR-0020, ADR-0021, ADR-0022, ADR-0023

Enforcement: [convention] — this ADR is an index; each linked ADR names its own checks.

The product package in docs/bjj-travel/ (ARD section, ADR-01…ADR-07) was written for PostgreSQL + PostGIS + Drizzle, a Postgres queue (graphile-worker or pg-boss) with isolated workers, Stripe Connect and Hetzner in Germany. This repository is the template-cloudflare monorepo: TanStack Start on one Cloudflare Worker, Expo, oRPC, Better Auth, Drizzle on Neon, R2, a one-minute cron tick with leased queue jobs, and row-level security per Organization.

Decision

Keep the product ADRs where the template already agrees and record each deviation as its own ADR:

Product ADRTemplateOutcome
ADR-01 Expo + RN, expo-sqlite, SkiaExpo SDK 58, Skia 2.14 and react-native-svg installedkept; offline store decided per story (S5/S6)
ADR-02 TanStack Start for web and APITanStack Start + oRPC on one Workerkept; "server functions" are oRPC procedures (createServerFn is banned here)
ADR-03 Postgres + PostGIS, queue in PostgresNeon + Drizzle, cron tick + leased jobsdeviates → ADR-0017, ADR-0020, ADR-0021
ADR-04 Own hex map, no tiles—kept → ADR-0017
ADR-05 Location = city + window—kept → ADR-0018
ADR-06 Stripe Connect, separate charges and transfersStripe/Polar/RevenueCat behind BILLING_PROVIDERSkept; Connect is a new adapter → ADR-0022
ADR-07 AI suggests, rules decideAssistant + Tool catalogkept; deterministic *.rules.ts leaves own dates and money → ADR-0022
Hetzner (Germany)Cloudflare Workersdeviates → ADR-0020

Consequences

  • The domain lives in packages/api/src/features/<feature>/ with the template's roles (ADR-0011): instructor, atlas, and later network, route, tour, outreach, seminar, academy, privacy.
  • Every product number that is a hypothesis (split, deposit, fee, payout delay, cancellation window) lives in one leaf (instructor.rules.ts → MONEY_HYPOTHESES).
Edit on GitHubDocumentation is in English.
Cookie settings
We use essential cookies to make our app work. With your consent, we also use optional cookies to improve your experience.

Read our Cookie Policy and Privacy Policy.