Overview
Ten decisions that shaped Banquee. Each has context, choice, why, and trade-off — grounded in the repository's own ADR records (docs/adr/0001–0012), where every one of these choices is written up in full.
ADR-001: Design tokens are the only source of visual truth
Status
Accepted
Context
Eleven landing sections and four content pages, written largely by an AI agent, invite visual drift — the fifth slightly-different green is invisible in a code review but obvious on screen. The brand identity (mint and ink, tonal layering instead of shadows) had to survive dozens of hands-off commits.
Decision
The Figma design system is distilled into a written spec (DESIGN.md), then implemented once as StyleX tokens in src/styles/tokens.stylex.ts. Components consume tokens; they never invent colors, radii, or spacing. Directional CSS is banned in favor of logical properties (padding-inline, inset-inline-start) so RTL comes free.
Why
One change point for the entire visual language, compile-time style generation, and an RTL-correct system by construction rather than by testing.
Trade-off
Every new visual idea starts in the token file, not in the component that needs it — a deliberate tax that keeps the system from fragmenting.
Alternatives
Tailwind (utility classes drift token discipline is meant to enforce); CSS Modules (no token composition); runtime CSS-in-JS like Emotion (ships styling cost to the client).
ADR-002: Frontend-only, and honest about it
Status
Accepted
Context
A banking site implies accounts, money, and flows. Building a fake API to pretend would add moving parts without adding anything to show.
Decision
No backend, no auth, no persistence. Content is static and local; account flows are visibly simulated, and the README says so plainly.
Why
The skills on display — design fidelity, four locales, motion, accessibility — don't need a server, and a mock API would dilute them with plumbing that fools no one.
Trade-off
Nothing persists; interactive flows end where a real bank's would begin.
Alternatives
A mock API layer (complexity pretending to be depth); a real backend (a different project entirely).
ADR-003: Server components by default, client components as islands
Status
Accepted
Context
Marketing content is static, but the site's personality lives in interactions — a header that hides on scroll, demos that play themselves, a searchable FAQ.
Decision
App Router with React Server Components as the default. 'use client' marks deliberate islands: the demos, the language switcher, the back-to-top button, the FAQ search.
Why
The page ships as static HTML with JavaScript only where interaction actually lives, and the island list doubles as a map of everything interactive on the site.
Trade-off
Island boundaries must be chosen carefully — a component accidentally rendered on the client drags its subtree into the bundle.
Alternatives
Everything client-side (heavy first paint for content that never changes); everything static (kills the demos, which are the point).
ADR-004: Locale in the URL, not in the user's pocket
Status
Accepted
Context
Four locales — English, German, Spanish, and Arabic — with Arabic rendering right-to-left. Each version must be linkable, crawlable, and structurally its own page.
Decision
next-intl with a [locale] route segment. Dictionaries live in messages/<locale>.json (English is the source of truth); direction and font stacks switch with the locale, pairing Sora/Inter with Cairo/Tajawal for Arabic.
Why
Every locale has a shareable, indexable URL; switching languages is a navigation, not a page mutation; and RTL is handled by the framework plus the logical-property rule from ADR-001.
Trade-off
Adding a locale means a full dictionary, a currency decision, and a font pairing — deliberately expensive so it's never done casually.
Alternatives
Client-side language switching without URL changes (unshareable, uncrawlable); react-i18next (less native to App Router); per-locale builds (multiplicative maintenance).
ADR-005: Currency follows language, through one function
Status
Accepted
Context
A banking site that reads German but prices in dollars breaks its own spell. Money appears in nearly every section, and no component should be trusted to format it consistently.
Decision
One centralized utility (i18n/currency.ts) maps each locale to its natural currency — USD, EUR, EUR, SAR — and one formatter, built on Intl.NumberFormat, renders every monetary value through a useCurrency hook.
Why
Decimal separators, grouping, and symbol placement follow each locale's real conventions (including Arabic) with exactly one place to audit them; the mapping is unit-tested.
Trade-off
A reader wanting a currency other than their language's default has no option — acceptable on a site with no user settings.
Alternatives
Hardcoded USD (foreign symbols mid-sentence in localized copy); per-component Intl calls (drift, the thing tokens exist to prevent); a currency picker (weight without value on a marketing site).
ADR-006: Demos are scripted components, not videos
Status
Accepted
Context
The features and landing pages need to show the phone app in use. Screen recordings are the industry default — and they can't inherit design tokens, ignore reduced-motion preferences, and never quite match the site's fonts.
Decision
Each demo is a composition: a shared phone frame, a data file describing what the screens show, a sequencing hook (use-demo-sequence) that walks the steps, and a gesture layer that draws taps, swipes, and drags so the sequence reads as a person using the app. Gestures are constrained to their stage — an indicator never escapes the phone bounds — and reduced motion collapses the sequence to its end state.
Why
Demos inherit the design system, their logic is unit-testable (including the bounds rule), and motion is a preference the site respects.
Trade-off
Real choreography code that had real bugs — gesture escapes were found and fixed in a follow-up pass. Video would have "just worked" and quietly broken everything else.
Alternatives
Video/GIF embeds (heavy, unthemeable, reduced-motion-hostile); static screenshots (no story); a fully interactive embedded app (hijacks scroll and focus).
ADR-007: Almost no client state, on purpose
Status
Accepted
Context
A marketing site's state needs are tiny: which language, which FAQ filter, which scroll direction. State frameworks would solve a problem this site doesn't have.
Decision
Client state is minimal and local — a scroll-direction hook here, a controlled input there. There is no global state library, and nothing that needs one.
Why
Less state is fewer bugs; every piece of interactivity is explainable in one sentence because it owns everything it needs.
Alternatives
Zustand or Redux for "when we need it" (YAGNI, and an invitation to scatter state across the tree).
Trade-off
When a real flow arrives (a sign-up simulation), its state design will be its own decision — made then, with the requirements in hand.
ADR-008: Motion with an exit for everyone
Status
Accepted
Context
The site leans on motion for personality — header reveal, card flips, gesture choreography. Motion libraries make adding animation easy; respecting users who don't want it is what's hard.
Decision
Motion (formerly Framer Motion) drives the scroll and gesture interactions, and every animated element has a reduced-motion path: the header stays put, the card flip becomes an instant swap, the demos collapse to their end state.
Why
Personality without excluding anyone — prefers-reduced-motion is treated as a design constraint, not an accessibility chore.
Trade-off
Every animation is written twice: the moving version and the still one.
Alternatives
CSS-only animation (fine for transitions, unworkable for choreographed sequences); no motion (the site loses its signature); motion without fallbacks (common, and wrong).
ADR-009: Tests live next to the code they test
Status
Accepted
Context
Agent-written code merges fast, so regressions surface fast too — especially in logic-heavy pieces like demo sequencing and currency mapping.
Decision
Vitest with jsdom and Testing Library, tests colocated with their components. Nineteen test files cover the sequence hooks, the currency hook, comparison data, the scroll-direction hook, the bank card flip, and FAQ filtering. Playwright and axe-core are configured for a future end-to-end accessibility pass.
Why
Colocation keeps coverage visible from the folder structure; Vitest's watch loop is fast enough to run as part of every change; Testing Library queries mirror how users actually interact.
Trade-off
jsdom doesn't do layout, so anything depending on real browser geometry still awaits the e2e suite.
Alternatives
Jest (more configuration, slower loop); Playwright for everything (too heavy for logic tests); no tests (untenable with agent-velocity merges).
ADR-010: Headless Radix under custom skin, only where it counts
Status
Accepted
Context
Interactive primitives — a language dropdown, menu triggers — are easy to build badly: focus handling, keyboard navigation, and ARIA wiring are where DIY components fail.
Decision
Radix UI provides the behavior for the handful of primitives that need it (the language switcher above all), styled entirely with the project's own tokens.
Why
Accessibility correctness (focus traps, ESC, roles) comes battle-tested, while the visual language stays 100% ours.
Trade-off
A dependency for a small number of components — justified because each one is an accessibility trap when hand-rolled.
Alternatives
Hand-rolled primitives (the failure modes are invisible until audited); a full component library like shadcn/ui (would fight the design system rather than feed it).
Smaller calls, same reasoning
- Lucide React for stroke icons — imported per icon, one 2px-stroke visual language. Icon fonts and mega-bundles rejected for the usual reasons.
- React Hook Form + Zod, installed ahead of the upcoming form flows — schemas define validity once, errors map to locale dictionaries. Formik rejected: whole-tree re-renders.
- Playwright + axe-core configured but not yet written — the e2e accessibility pass is the acknowledged hole in the testing story, tracked rather than hidden.
Common thread
Every decision optimizes for the same two things: one source of truth (tokens, one currency formatter, one demo architecture) and honesty (no fake backend, reduced-motion exits everywhere, unwritten tests declared unwritten). The design system set the bar; the code was held to it.