|
| 1 | +--- |
| 2 | +date: 2026-04-18 |
| 3 | +topic: expo-template |
| 4 | +--- |
| 5 | + |
| 6 | +# Expo Template |
| 7 | + |
| 8 | +## Problem Frame |
| 9 | + |
| 10 | +`kitcn init -t` currently has web-first fresh-app scaffolds (`next`, `start`, |
| 11 | +`vite`) plus auth layering that assumes web/react project shapes. There is no |
| 12 | +first-class Expo lane, so mobile users either start elsewhere or force a web |
| 13 | +template into a native-shaped app. |
| 14 | + |
| 15 | +The goal is to add a first-party Expo template that feels like current kitcn |
| 16 | +templates: start from an official upstream shell, overlay the minimum kitcn |
| 17 | +Convex wiring, and prove the app is real with one tiny live demo. V1 should |
| 18 | +solve fresh mobile bootstrap only. It should not drag in auth, styling stack |
| 19 | +wars, or existing-app adoption. |
| 20 | + |
| 21 | +```mermaid |
| 22 | +flowchart TB |
| 23 | + A["User runs `kitcn init -t expo --yes`"] --> B["kitcn creates app from official `create-expo-app` template"] |
| 24 | + B --> C["kitcn overlays Convex config, env, and client wiring"] |
| 25 | + C --> D["kitcn replaces starter content with one live messages demo screen"] |
| 26 | + D --> E["User can run Expo app against Convex without extra manual setup"] |
| 27 | +``` |
| 28 | + |
| 29 | +## Requirements |
| 30 | + |
| 31 | +**Official Base** |
| 32 | +- R1. `kitcn init -t expo` must scaffold from the official Expo CLI path rather |
| 33 | + than from a kitcn-owned handwritten Expo shell. |
| 34 | +- R2. V1 must use `create-expo-app` as the source of truth for the app shell, |
| 35 | + mirroring the repo's shadcn-owned Next approach. |
| 36 | +- R3. As of April 18, 2026, the intended upstream base is |
| 37 | + `create-expo-app --template default@sdk-55`; planning must verify that this |
| 38 | + still matches Expo's current official recommendation before implementation. |
| 39 | + |
| 40 | +**Generated App Shape** |
| 41 | +- R4. The generated app must be a fresh Expo Router app with a single-screen |
| 42 | + shell, not tabs or drawer navigation. |
| 43 | +- R5. kitcn must overlay the minimum Convex runtime wiring needed for a working |
| 44 | + native app instead of replacing the whole Expo project structure. |
| 45 | +- R6. The scaffolded app must include one live Convex-backed messages screen |
| 46 | + with list and create behavior, matching the current tiny demo posture used in |
| 47 | + other kitcn templates. |
| 48 | +- R7. The demo should replace upstream starter content enough that the scaffold |
| 49 | + clearly reads as a kitcn+Convex app rather than a stock Expo welcome screen. |
| 50 | + |
| 51 | +**Scope and Compatibility** |
| 52 | +- R8. V1 must support fresh scaffolding only via `kitcn init -t expo`. |
| 53 | +- R9. V1 must not include auth scaffolding, auth-ready shell behavior, or |
| 54 | + `kitcn add auth` support for Expo. |
| 55 | +- R10. V1 must not pick a styling system beyond the official Expo baseline; no |
| 56 | + NativeWind, Unistyles, or other opinionated styling stack should be part of |
| 57 | + the initial template. |
| 58 | +- R11. Planning must treat existing Expo app adoption as a separate future lane, |
| 59 | + not as hidden scope inside this template work. |
| 60 | + |
| 61 | +**CLI Contract** |
| 62 | +- R12. `kitcn init` help, template validation, and machine-readable output must |
| 63 | + recognize `expo` as a supported fresh-app template. |
| 64 | +- R13. Repo project detection and scaffold-context logic must gain an explicit |
| 65 | + Expo/native lane rather than misclassifying Expo as generic React or leaving |
| 66 | + it unsupported. |
| 67 | +- R14. The Expo template must preserve current kitcn expectations around |
| 68 | + deterministic `--yes` behavior and fresh-app bootstrap flow. |
| 69 | + |
| 70 | +## Success Criteria |
| 71 | +- `kitcn init -t expo --yes` produces a runnable Expo app with Convex wired in. |
| 72 | +- The generated app opens to one live messages screen backed by Convex. |
| 73 | +- The implementation keeps Expo shell ownership upstream and keeps kitcn-owned |
| 74 | + changes narrowly scoped to overlay files and minimal patch points. |
| 75 | +- V1 does not accidentally expand into auth, existing-app adoption, tabs/drawer |
| 76 | + shells, or styling-framework decisions. |
| 77 | + |
| 78 | +## Scope Boundaries |
| 79 | +- No Expo auth support in v1. |
| 80 | +- No `kitcn add auth` Expo path in v1. |
| 81 | +- No existing Expo app adoption in v1. |
| 82 | +- No tabs or drawer starter shell in v1. |
| 83 | +- No NativeWind, Unistyles, or other opinionated mobile styling layer in v1. |
| 84 | +- No attempt to reuse `create-better-t-stack` as the generator source of truth. |
| 85 | + |
| 86 | +## Key Decisions |
| 87 | +- Official Expo base wins: use `create-expo-app`, not a kitcn-owned Expo shell. |
| 88 | +- kitcn overlays Convex onto the upstream app instead of replacing the app |
| 89 | + structure wholesale. |
| 90 | +- V1 is fresh scaffold only: adoption work is deferred. |
| 91 | +- V1 is unauthenticated: auth is intentionally out of scope. |
| 92 | +- Demo shape is the existing tiny messages pattern: enough proof, low carrying |
| 93 | + cost. |
| 94 | +- `create-better-t-stack` is a donor for Expo choices when useful, not the |
| 95 | + baseline owner. |
| 96 | + |
| 97 | +## Dependencies / Assumptions |
| 98 | +- Expo's official template contract remains stable enough to wrap from the CLI. |
| 99 | +- The repo is willing to add a native/Expo project-context lane in CLI |
| 100 | + detection and scaffold planning. |
| 101 | +- Convex's current React/React Native client surface is sufficient for a simple |
| 102 | + Expo messages demo without introducing auth-specific runtime dependencies. |
| 103 | + |
| 104 | +## Outstanding Questions |
| 105 | + |
| 106 | +### Deferred to Planning |
| 107 | +- [Affects R1][Technical] Which exact files from the official Expo scaffold |
| 108 | + should stay upstream-owned versus receive kitcn overlay patches? |
| 109 | +- [Affects R5][Technical] What is the smallest durable scaffold-context model |
| 110 | + for Expo/native without contorting the current `next-app` vs `react` split? |
| 111 | +- [Affects R6][Technical] Which existing messages demo assets can be reused |
| 112 | + directly versus needing Expo-native variants? |
| 113 | +- [Affects R12][Needs research] Which current CLI tests should be mirrored for |
| 114 | + Expo template bootstrap, detection, and JSON output? |
| 115 | +- [Affects R3][Needs research] At implementation time, does Expo still |
| 116 | + recommend `default@sdk-55`, or has the official template target changed? |
| 117 | + |
| 118 | +## Next Steps |
| 119 | +→ `/ce:plan` for structured implementation planning |
0 commit comments