diff --git a/docs/decisions/0001-one-platform-shared-by-mobile-and-desktop.md b/docs/decisions/0001-one-platform-shared-by-mobile-and-desktop.md new file mode 100644 index 0000000..e38ec26 --- /dev/null +++ b/docs/decisions/0001-one-platform-shared-by-mobile-and-desktop.md @@ -0,0 +1,17 @@ +# 0001 One platform shared by mobile and desktop apps + +Status: Accepted · Area: architecture · Date: 2026-10-04 · Decided by: user + +## Context +The product ships two Next.js apps, `bull` (mobile) and `bear` (desktop), that serve the same Lumina product. Both apps serve under one domain; nginx proxies each request to the mobile or desktop app based on its user agent. The default rule gives each app its own platform. + +## Decision +Both `apps/bull` and `apps/bear` depend on one platform, `platforms/market`. Each app keeps only its routes, templates, bootstrap, and env; features, stores, models, and shared logic live in `platforms/market`. + +## Alternatives +- One platform per app (`platforms/bull`, `platforms/bear`): duplicates the same business logic in two places. + +## Consequences +- Nx tags: both apps and the platform use `scope:market`, so each app may import `platforms/market`, and neither app imports the other. +- Models and actions must stay viewport-agnostic; device-specific UI belongs in each app's templates and organisms. +- One URL serves two apps (dynamic serving): both apps keep the same route paths, and nginx sends `Vary: User-Agent` so caches and search engines don't mix the two versions. diff --git a/docs/decisions/0002-island-layout-and-element-over-native-tags.md b/docs/decisions/0002-island-layout-and-element-over-native-tags.md new file mode 100644 index 0000000..4a89b63 --- /dev/null +++ b/docs/decisions/0002-island-layout-and-element-over-native-tags.md @@ -0,0 +1,22 @@ +# 0002 Island Element, FlexBox, and GridBox over native tags + +Status: Accepted · Area: design · Date: 2026-10-04 · Decided by: user + +## Context +Island has three typed atoms, `Element`, `FlexBox`, and `GridBox`, that render tags and layouts. The user set them as the only way to render tags and layouts. + +## Decision +- Render every HTML or SVG tag through island `Element` (``), never as native JSX (``, `
`, `