anhedral 0.13.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -229
- package/assets/patches/audit-deps.mjs +12 -2
- package/assets/stack/ai-schema.ts.txt +5 -0
- package/assets/stack/ai.ts.txt +30 -0
- package/assets/stack/api-index.ts.txt +15 -0
- package/assets/stack/auth-features.ts.txt +4 -0
- package/assets/stack/auth-journal.json.txt +13 -0
- package/assets/stack/auth-migration.sql.txt +53 -0
- package/assets/stack/auth-routes.ts.txt +11 -0
- package/assets/stack/auth-schema.ts.txt +64 -0
- package/assets/stack/auth-snapshot.json.txt +346 -0
- package/assets/stack/auth.ts.txt +32 -0
- package/assets/stack/billing-mode.ts.txt +8 -0
- package/assets/stack/billing-schema.ts.txt +11 -0
- package/assets/stack/desktop.rs.txt +21 -0
- package/assets/stack/entitlement-guard.ts.txt +32 -0
- package/assets/stack/entitlements.ts.txt +8 -0
- package/assets/stack/events-schema.ts.txt +12 -0
- package/assets/stack/events.ts.txt +59 -0
- package/assets/stack/mobile-auth.ts.txt +25 -0
- package/assets/stack/mobile-billing.tsx.txt +63 -0
- package/assets/stack/mobile-session.tsx.txt +83 -0
- package/assets/stack/native-button.tsx.txt +108 -0
- package/assets/stack/native-global.css.txt +4 -0
- package/assets/stack/native-lib-utils.ts.txt +5 -0
- package/assets/stack/native-metro.config.js.txt +6 -0
- package/assets/stack/native-nativewind-env.d.ts.txt +1 -0
- package/assets/stack/native-tailwind.config.js.txt +73 -0
- package/assets/stack/native-text.tsx.txt +89 -0
- package/assets/stack/purchases.ts.txt +65 -0
- package/assets/stack/revenuecat.ts.txt +88 -0
- package/assets/stack/rtc-schema.ts.txt +10 -0
- package/assets/stack/rtc.ts.txt +122 -0
- package/assets/stack/security.ts.txt +31 -0
- package/assets/stack/storage.ts.txt +36 -0
- package/assets/stack/stripe.ts.txt +126 -0
- package/assets/stack/web-sign-in.tsx.txt +51 -0
- package/assets/ui/LICENSE.react-native-reusables +21 -0
- package/assets/ui/LICENSE.shadcn +21 -0
- package/assets/ui/UPSTREAM.json +39 -0
- package/assets/ui/catalog.json +891 -0
- package/assets/ui/extensions/registry.json +6 -0
- package/assets/ui/native/_controls.tsx +521 -0
- package/assets/ui/native/_core.tsx +118 -0
- package/assets/ui/native/_data.tsx +200 -0
- package/assets/ui/native/_display.tsx +453 -0
- package/assets/ui/native/_feedback.tsx +242 -0
- package/assets/ui/native/_legacy-dialog.tsx +38 -0
- package/assets/ui/native/_motion.tsx +520 -0
- package/assets/ui/native/_overlay.tsx +402 -0
- package/assets/ui/native/_selection.tsx +366 -0
- package/assets/ui/native/accordion.tsx +1 -0
- package/assets/ui/native/alert-dialog.tsx +11 -0
- package/assets/ui/native/alert.tsx +1 -0
- package/assets/ui/native/aspect-ratio.tsx +1 -0
- package/assets/ui/native/attachment.tsx +8 -0
- package/assets/ui/native/avatar.tsx +8 -0
- package/assets/ui/native/badge.tsx +1 -0
- package/assets/ui/native/breadcrumb.tsx +9 -0
- package/assets/ui/native/bubble.tsx +1 -0
- package/assets/ui/native/button-group.tsx +1 -0
- package/assets/ui/native/button.tsx +86 -0
- package/assets/ui/native/calendar.tsx +170 -0
- package/assets/ui/native/card.tsx +44 -0
- package/assets/ui/native/carousel.tsx +1 -0
- package/assets/ui/native/chart.tsx +193 -0
- package/assets/ui/native/checkbox.tsx +1 -0
- package/assets/ui/native/code-block.tsx +137 -0
- package/assets/ui/native/collapsible.tsx +1 -0
- package/assets/ui/native/combobox.tsx +1 -0
- package/assets/ui/native/command.tsx +11 -0
- package/assets/ui/native/context-menu.tsx +16 -0
- package/assets/ui/native/data-table.tsx +1 -0
- package/assets/ui/native/date-picker.tsx +43 -0
- package/assets/ui/native/dialog.tsx +15 -0
- package/assets/ui/native/direction.tsx +1 -0
- package/assets/ui/native/drawer.tsx +10 -0
- package/assets/ui/native/dropdown-menu.tsx +16 -0
- package/assets/ui/native/empty.tsx +8 -0
- package/assets/ui/native/field.tsx +13 -0
- package/assets/ui/native/hover-card.tsx +1 -0
- package/assets/ui/native/input-group.tsx +8 -0
- package/assets/ui/native/input-otp.tsx +1 -0
- package/assets/ui/native/input.tsx +28 -0
- package/assets/ui/native/item.tsx +12 -0
- package/assets/ui/native/kbd.tsx +1 -0
- package/assets/ui/native/label.tsx +4 -0
- package/assets/ui/native/layout.tsx +26 -0
- package/assets/ui/native/marker.tsx +1 -0
- package/assets/ui/native/menubar.tsx +17 -0
- package/assets/ui/native/message-scroller.tsx +6 -0
- package/assets/ui/native/message.tsx +10 -0
- package/assets/ui/native/native-select.tsx +1 -0
- package/assets/ui/native/navigation-menu.tsx +10 -0
- package/assets/ui/native/pagination.tsx +9 -0
- package/assets/ui/native/popover.tsx +1 -0
- package/assets/ui/native/progress.tsx +1 -0
- package/assets/ui/native/questionnaire.tsx +130 -0
- package/assets/ui/native/radio-group.tsx +1 -0
- package/assets/ui/native/registry.json +1103 -0
- package/assets/ui/native/resizable.tsx +1 -0
- package/assets/ui/native/scroll-area.tsx +1 -0
- package/assets/ui/native/select.tsx +11 -0
- package/assets/ui/native/separator.tsx +1 -0
- package/assets/ui/native/sheet.tsx +10 -0
- package/assets/ui/native/sidebar.tsx +22 -0
- package/assets/ui/native/skeleton.tsx +1 -0
- package/assets/ui/native/slider.tsx +1 -0
- package/assets/ui/native/spinner.tsx +1 -0
- package/assets/ui/native/switch.tsx +1 -0
- package/assets/ui/native/table.tsx +10 -0
- package/assets/ui/native/tabs.tsx +1 -0
- package/assets/ui/native/text.tsx +20 -0
- package/assets/ui/native/textarea.tsx +1 -0
- package/assets/ui/native/theme-switcher.tsx +22 -0
- package/assets/ui/native/toast.tsx +11 -0
- package/assets/ui/native/toggle-group.tsx +1 -0
- package/assets/ui/native/toggle.tsx +1 -0
- package/assets/ui/native/tooltip.tsx +1 -0
- package/assets/ui/native/trace.tsx +20 -0
- package/assets/ui/native/typography.tsx +15 -0
- package/assets/ui/theme-storage.ts +25 -0
- package/assets/ui/theme.tsx +66 -0
- package/assets/ui/web/button.tsx +59 -0
- package/assets/ui/web/input.tsx +21 -0
- package/assets/ui/web/label.tsx +19 -0
- package/dist/bin.js +7 -12
- package/dist/capabilities.d.ts +4 -33
- package/dist/capabilities.js +2 -84
- package/dist/capability-catalog.d.ts +83 -0
- package/dist/capability-catalog.js +121 -0
- package/dist/capability-command.d.ts +3 -0
- package/dist/capability-command.js +188 -0
- package/dist/capability-editor.d.ts +17 -0
- package/dist/capability-editor.js +97 -0
- package/dist/capability-recipes.d.ts +4 -0
- package/dist/capability-recipes.js +520 -0
- package/dist/capability-references.d.ts +4 -0
- package/dist/capability-references.js +7 -0
- package/dist/cli-commands.d.ts +1 -2
- package/dist/cli-commands.js +10 -104
- package/dist/cli-output.d.ts +1 -2
- package/dist/cli-output.js +6 -251
- package/dist/command-schema.js +40 -374
- package/dist/dependencies.d.ts +34 -62
- package/dist/dependencies.js +112 -199
- package/dist/index.d.ts +1 -45
- package/dist/index.js +1 -30
- package/dist/platforms/mobile.js +29 -139
- package/dist/platforms/web.d.ts +3 -0
- package/dist/platforms/web.js +251 -0
- package/dist/project-config.d.ts +2 -13
- package/dist/project-config.js +10 -83
- package/dist/registry/context.js +0 -1
- package/dist/registry/options.js +6 -40
- package/dist/registry/resolve.d.ts +3 -4
- package/dist/registry/resolve.js +18 -108
- package/dist/registry/types.d.ts +1 -7
- package/dist/registry/usage.js +3 -9
- package/dist/runtime-policy.d.ts +0 -2
- package/dist/runtime-policy.js +0 -16
- package/dist/scaffold/backend.d.ts +0 -4
- package/dist/scaffold/backend.js +1 -189
- package/dist/scaffold/bootstrap.d.ts +2 -3
- package/dist/scaffold/bootstrap.js +37 -43
- package/dist/scaffold/compose.js +2 -14
- package/dist/scaffold/database.d.ts +1 -1
- package/dist/scaffold/database.js +19 -126
- package/dist/scaffold/documentation.d.ts +0 -1
- package/dist/scaffold/documentation.js +82 -84
- package/dist/scaffold/expo-runtime.d.ts +2 -2
- package/dist/scaffold/expo-runtime.js +9 -101
- package/dist/scaffold/native-ui.d.ts +2 -0
- package/dist/scaffold/native-ui.js +74 -0
- package/dist/scaffold/stack-documentation.d.ts +0 -1
- package/dist/scaffold/stack-documentation.js +3 -49
- package/dist/scaffold/storage.d.ts +2 -0
- package/dist/scaffold/storage.js +21 -0
- package/dist/scaffold/styling.d.ts +1 -1
- package/dist/scaffold/styling.js +20 -28
- package/dist/scaffold/workspace.js +63 -199
- package/dist/stack-registry.d.ts +2 -58
- package/dist/stack-registry.js +22 -446
- package/dist/standard.js +7 -24
- package/dist/ui-catalog.d.ts +26 -0
- package/dist/ui-catalog.js +31 -0
- package/dist/ui-command.d.ts +3 -0
- package/dist/ui-command.js +219 -0
- package/dist/ui-project.d.ts +22 -0
- package/dist/ui-project.js +110 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/anhedral-stack.md +4 -119
- package/docs/capabilities.md +110 -0
- package/docs/native-ui.md +102 -0
- package/docs/software-factory.md +16 -577
- package/docs/stack-standard.md +11 -307
- package/docs/ui.md +33 -0
- package/docs/verification.md +511 -0
- package/package.json +26 -27
- package/dist/access.d.ts +0 -10
- package/dist/access.js +0 -93
- package/dist/auth-schema-snapshot.d.ts +0 -346
- package/dist/auth-schema-snapshot.js +0 -347
- package/dist/auth-schema.d.ts +0 -1
- package/dist/auth-schema.js +0 -57
- package/dist/capability-contract.d.ts +0 -47
- package/dist/capability-contract.js +0 -168
- package/dist/catalog-model.d.ts +0 -24
- package/dist/catalog-model.js +0 -1
- package/dist/catalog-registration.d.ts +0 -16
- package/dist/catalog-registration.js +0 -22
- package/dist/catalog-snapshot.d.ts +0 -5
- package/dist/catalog-snapshot.js +0 -97
- package/dist/cli-delivery.d.ts +0 -3
- package/dist/cli-delivery.js +0 -172
- package/dist/cloudflare.d.ts +0 -25
- package/dist/cloudflare.js +0 -226
- package/dist/delivery-evidence.d.ts +0 -62
- package/dist/delivery-evidence.js +0 -186
- package/dist/delivery.d.ts +0 -88
- package/dist/delivery.js +0 -570
- package/dist/inspector-model.d.ts +0 -123
- package/dist/inspector-model.js +0 -1
- package/dist/integration-service-readers.d.ts +0 -13
- package/dist/integration-service-readers.js +0 -173
- package/dist/lifecycle-model.d.ts +0 -15
- package/dist/lifecycle-model.js +0 -20
- package/dist/lifecycle.d.ts +0 -11
- package/dist/lifecycle.js +0 -91
- package/dist/management.d.ts +0 -3
- package/dist/management.js +0 -47
- package/dist/mobile-delivery.d.ts +0 -77
- package/dist/mobile-delivery.js +0 -366
- package/dist/neon-service-data.d.ts +0 -8
- package/dist/neon-service-data.js +0 -117
- package/dist/platforms/desktop.d.ts +0 -2
- package/dist/platforms/desktop.js +0 -415
- package/dist/platforms/extension.d.ts +0 -2
- package/dist/platforms/extension.js +0 -328
- package/dist/project-catalog.d.ts +0 -41
- package/dist/project-catalog.js +0 -288
- package/dist/project-inspector.d.ts +0 -4
- package/dist/project-inspector.js +0 -702
- package/dist/project-lifecycle.d.ts +0 -25
- package/dist/project-lifecycle.js +0 -57
- package/dist/project-state.d.ts +0 -49
- package/dist/project-state.js +0 -563
- package/dist/provider-auth.d.ts +0 -41
- package/dist/provider-auth.js +0 -215
- package/dist/provider-readiness.d.ts +0 -30
- package/dist/provider-readiness.js +0 -104
- package/dist/providers/adapters.d.ts +0 -17
- package/dist/providers/adapters.js +0 -278
- package/dist/providers/api.d.ts +0 -29
- package/dist/providers/api.js +0 -253
- package/dist/providers/config.d.ts +0 -15
- package/dist/providers/config.js +0 -182
- package/dist/providers/definitions.d.ts +0 -318
- package/dist/providers/definitions.js +0 -127
- package/dist/providers/provision.d.ts +0 -24
- package/dist/providers/provision.js +0 -76
- package/dist/providers/receipts.d.ts +0 -20
- package/dist/providers/receipts.js +0 -66
- package/dist/providers/recovery-verification.d.ts +0 -7
- package/dist/providers/recovery-verification.js +0 -112
- package/dist/providers/recovery.d.ts +0 -30
- package/dist/providers/recovery.js +0 -34
- package/dist/providers/runtime.d.ts +0 -10
- package/dist/providers/runtime.js +0 -265
- package/dist/providers/schema.d.ts +0 -28
- package/dist/providers/schema.js +0 -49
- package/dist/providers/state.d.ts +0 -55
- package/dist/providers/state.js +0 -289
- package/dist/provision.d.ts +0 -55
- package/dist/provision.js +0 -284
- package/dist/r2-service-data.d.ts +0 -2
- package/dist/r2-service-data.js +0 -136
- package/dist/readiness.d.ts +0 -23
- package/dist/readiness.js +0 -122
- package/dist/registry/add.d.ts +0 -24
- package/dist/registry/add.js +0 -270
- package/dist/registry/bootstrap.d.ts +0 -2
- package/dist/registry/bootstrap.js +0 -14
- package/dist/registry/commands.d.ts +0 -3
- package/dist/registry/commands.js +0 -85
- package/dist/registry/presets.d.ts +0 -4
- package/dist/registry/presets.js +0 -41
- package/dist/registry/preview.d.ts +0 -11
- package/dist/registry/preview.js +0 -91
- package/dist/registry/receipt.d.ts +0 -3
- package/dist/registry/receipt.js +0 -68
- package/dist/repository.d.ts +0 -24
- package/dist/repository.js +0 -96
- package/dist/scaffold/auth.d.ts +0 -3
- package/dist/scaffold/auth.js +0 -151
- package/dist/scaffold/billing-config.d.ts +0 -1
- package/dist/scaffold/billing-config.js +0 -73
- package/dist/scaffold/billing-contracts.d.ts +0 -2
- package/dist/scaffold/billing-contracts.js +0 -48
- package/dist/scaffold/billing-providers.d.ts +0 -1
- package/dist/scaffold/billing-providers.js +0 -249
- package/dist/scaffold/billing-schema.d.ts +0 -1
- package/dist/scaffold/billing-schema.js +0 -34
- package/dist/scaffold/billing-security.d.ts +0 -1
- package/dist/scaffold/billing-security.js +0 -46
- package/dist/scaffold/billing-server.d.ts +0 -1
- package/dist/scaffold/billing-server.js +0 -139
- package/dist/scaffold/billing-store.d.ts +0 -1
- package/dist/scaffold/billing-store.js +0 -72
- package/dist/scaffold/billing.d.ts +0 -2
- package/dist/scaffold/billing.js +0 -216
- package/dist/scaffold/cloudflare-services.d.ts +0 -8
- package/dist/scaffold/cloudflare-services.js +0 -198
- package/dist/scaffold/expo-auth.d.ts +0 -3
- package/dist/scaffold/expo-auth.js +0 -192
- package/dist/scaffold/expo-billing.d.ts +0 -3
- package/dist/scaffold/expo-billing.js +0 -292
- package/dist/scaffold/integrations.d.ts +0 -4
- package/dist/scaffold/integrations.js +0 -12
- package/dist/scaffold/lint.d.ts +0 -4
- package/dist/scaffold/lint.js +0 -56
- package/dist/scaffold/neon-realtime.d.ts +0 -2
- package/dist/scaffold/neon-realtime.js +0 -97
- package/dist/scaffold/services.d.ts +0 -5
- package/dist/scaffold/services.js +0 -108
- package/dist/scaffold/stream.d.ts +0 -2
- package/dist/scaffold/stream.js +0 -114
- package/dist/scaffold/void.d.ts +0 -4
- package/dist/scaffold/void.js +0 -264
- package/dist/scaffold/web.d.ts +0 -2
- package/dist/scaffold/web.js +0 -130
- package/dist/service-deletion.d.ts +0 -29
- package/dist/service-deletion.js +0 -195
- package/dist/service-descriptor.d.ts +0 -10
- package/dist/service-descriptor.js +0 -78
- package/dist/service-model.d.ts +0 -49
- package/dist/service-model.js +0 -8
- package/dist/service-operations.d.ts +0 -29
- package/dist/service-operations.js +0 -78
- package/dist/service-readers.d.ts +0 -8
- package/dist/service-readers.js +0 -247
- package/dist/services-command.d.ts +0 -39
- package/dist/services-command.js +0 -102
- package/dist/ship.d.ts +0 -348
- package/dist/ship.js +0 -239
- package/dist/vercel-project.d.ts +0 -101
- package/dist/vercel-project.js +0 -305
- package/dist/vercel.d.ts +0 -67
- package/dist/vercel.js +0 -581
- package/dist/vinext.d.ts +0 -2
- package/dist/vinext.js +0 -86
- package/dist/void-execution.d.ts +0 -10
- package/dist/void-execution.js +0 -94
- package/dist/void-migrations.d.ts +0 -6
- package/dist/void-migrations.js +0 -110
- package/dist/void-state.d.ts +0 -16
- package/dist/void-state.js +0 -65
- package/dist/void.d.ts +0 -3
- package/dist/void.js +0 -5
package/docs/stack-standard.md
CHANGED
|
@@ -1,319 +1,23 @@
|
|
|
1
1
|
# Stack standard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
New applications begin with Next.js App Router, OpenNext for Cloudflare Workers and Anhedral UI. Init writes `apps/web`, shared tokens and workspace tooling. It does not generate Expo, Hono, database/contracts packages, authentication, private R2 or managed services.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
Native Reusables using shadcn conventions, NativeWind, shared styling, TypeScript,
|
|
7
|
-
pnpm and Turborepo. Cloudflare serves the static web export. Hono, auth, databases,
|
|
8
|
-
private storage and paid integrations are generated only when selected or required
|
|
9
|
-
by a selected capability. Initialization never provisions or activates services.
|
|
5
|
+
## Progressive composition
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
Add Hono when a separate API is useful, then Drizzle/D1 and Better Auth when persistence and identity are useful. Add private R2, payments, realtime and AI for actual product requirements. Additional clients may use Expo, WXT with the Side Panel API, or GPUI for a native desktop application. Anhedral UI for Expo and RevenueCat remain conditional choices. The precise “if needed” conditions remain open; these are optional additions, without commercial tier labels.
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
| --- | --- | --- |
|
|
15
|
-
| Clients | Expo / React Native / Expo Router | WXT side panel, Electron, explicit web alternatives |
|
|
16
|
-
| Styling | NativeWind, shared tokens, shadcn conventions | Platform-specific components and effects |
|
|
17
|
-
| Workspace | pnpm, Turborepo, shared TypeScript/ESLint, one lockfile | Public contracts when Hono is selected |
|
|
18
|
-
| Web hosting | Cloudflare static asset Worker | Service binding to a separate Hono API Worker |
|
|
19
|
-
| Backend | None | Hono for server capabilities |
|
|
20
|
-
| Data / identity / files | None | Drizzle/D1, Better Auth, private R2 independently |
|
|
9
|
+
The public source interface implements `init`, progressive `add`, `stack list/status/doctor` and the `ui` family. See [capability recipes and safety](capabilities.md). Retired operational `auth`, `ship`, `inspect` and provider-management commands remain unavailable. The reintroduced `add` command composes source only. The programmatic generator retains explicit legacy recipes for compatibility tests; they are not the new-project default or the new UI architecture.
|
|
21
10
|
|
|
22
|
-
|
|
23
|
-
`eslint`, `ui` and the conditional server-only `cloudflare-api` transport. The first three accompany every project; `ui` accompanies
|
|
24
|
-
explicit Next.js/Vinext apps. Expo and WXT resolve shared styling. Shared packages
|
|
25
|
-
are generated for selected responsibilities, not empty future architecture.
|
|
11
|
+
When a backend is introduced, Hono owns privileged data and application authorization. Next server actions adapt forms and call that API. Share framework-independent contracts and tokens without cross-importing application source. Keep R2 private; implement identity, ownership and limits before exposing files. Database migrations are deliberate operations and never part of startup or build.
|
|
26
12
|
|
|
27
|
-
##
|
|
13
|
+
## Anhedral UI
|
|
28
14
|
|
|
29
|
-
|
|
30
|
-
anhedral init my-app
|
|
31
|
-
anhedral init accounts --better-auth
|
|
32
|
-
anhedral init ai-tool --workers-ai
|
|
33
|
-
anhedral init complete --preset full-product --dry-run --json
|
|
34
|
-
anhedral add better-auth --cwd my-app --dry-run --json
|
|
35
|
-
anhedral add stripe revenuecat --cwd my-app --dry-run --json
|
|
36
|
-
```
|
|
15
|
+
Anhedral UI is thin orchestration over official shadcn web and React Native Reusables native source. Its maintained surface is a versioned component catalog, CLI routing, setup metadata and a small reviewed native extension registry. Native resolution prefers an Anhedral extension, then RNR, then reports unavailable. The extension registry is initially empty. Do not revive the exhaustive native shadcn fork or require every component to reach parity before shipping a useful feature.
|
|
37
16
|
|
|
38
|
-
|
|
39
|
-
auth; `--better-auth` adds Hono and D1 unless Neon was selected. Billing adds Hono,
|
|
40
|
-
identity (Better Auth unless Clerk was selected) and a database; RevenueCat does
|
|
41
|
-
not require Stripe. `--workers-ai`, `--images` or `--r2` adds the server capability
|
|
42
|
-
without adding user accounts, billing or unrelated storage. Capabilities resolve
|
|
43
|
-
dependencies to a fixed point independently of flag order. The direct registry API
|
|
44
|
-
remains strict; it validates already-resolved selections rather than inventing them.
|
|
17
|
+
New web applications include a bounded Button/Input/Label starter and MIT attribution. Additional components are installed by the pinned shadcn CLI. Native currently supports the RNR NativeWind 4 registry only, in an already configured Expo application. Keep matching React/React Native/Expo dependencies and test the consuming app. The UI layer has no dependency on Hono, D1 or Better Auth.
|
|
45
18
|
|
|
46
|
-
|
|
47
|
-
RevenueCat, Workers AI, Analytics Engine, Basin/Pipelines, Durable Object rooms,
|
|
48
|
-
RealtimeKit, Images, Stream live video, on-demand video, Queues, Cron, Workflows,
|
|
49
|
-
Resend and Sentry. It is a compatible complete product foundation, not every
|
|
50
|
-
mutually exclusive vendor or a finished implementation. Explicit Next.js/Vinext,
|
|
51
|
-
Neon and Clerk replace the corresponding preset defaults. Electron, local-data,
|
|
52
|
-
OpenAI/AI SDK, PostHog and Neon Realtime remain separately selectable alternatives
|
|
53
|
-
or specialized additions. The preset does not activate paid services or configure
|
|
54
|
-
all provider accounts. Inspect `registry capabilities` for support and evidence.
|
|
19
|
+
Components belong to the consumer's source tree. Retain upstream licenses, use semantic theme tokens, review diffs and preserve local edits. No runtime UI package or automatic overwrite/update is introduced. Catalog availability means an upstream source exists; it does not assert API parity, accessibility or device acceptance. See [UI commands](ui.md).
|
|
55
20
|
|
|
56
|
-
##
|
|
21
|
+
## Operations and compatibility
|
|
57
22
|
|
|
58
|
-
|
|
59
|
-
| --- | --- |
|
|
60
|
-
| Default / `--expo` | Expo universal client and Cloudflare static gateway |
|
|
61
|
-
| `--next` | Next.js on Vercel, the usual explicit web alternative |
|
|
62
|
-
| `--vinext` | Vinext on Cloudflare |
|
|
63
|
-
| `--next --hosting=cloudflare` | Explicit OpenNext compatibility profile |
|
|
64
|
-
| `--hono` | Standalone Hono API, no implicit frontend |
|
|
65
|
-
| `--wxt` | Standalone WXT Chrome side panel; combine with Expo explicitly |
|
|
66
|
-
| `--electron` | Standalone Electron client |
|
|
67
|
-
|
|
68
|
-
Selecting only service capabilities retains Expo as the default client. Explicit
|
|
69
|
-
application selections replace that implicit choice. When server capabilities are
|
|
70
|
-
selected, new profiles use Hono for identity, authorization, persistence and
|
|
71
|
-
privileged integrations; web routes adapt/proxy calls. Existing web-owned backends
|
|
72
|
-
retain their owner, and `add` rejects a required relocation or edited-source
|
|
73
|
-
replacement rather than performing an implicit migration.
|
|
74
|
-
|
|
75
|
-
Hono creates `packages/contracts` for public Zod schemas and HTTP transport.
|
|
76
|
-
Browser clients use `/api/*` through the web gateway; native clients use public
|
|
77
|
-
`EXPO_PUBLIC_API_URL`. Next.js on Vercel uses server-only `API_URL`; a private
|
|
78
|
-
Cloudflare Access API also requires scoped server-only service credentials.
|
|
79
|
-
Clients never import auth/database server packages or another app's source.
|
|
80
|
-
|
|
81
|
-
Adding Hono to an existing minimal Expo app wires its gateway and API client without
|
|
82
|
-
regenerating product screens. Adding auth exposes `/sign-in` and `/account`; connect
|
|
83
|
-
those routes to the product navigation explicitly. Existing edited generated files
|
|
84
|
-
remain protected by transaction fingerprints. No addition removes capabilities.
|
|
85
|
-
|
|
86
|
-
Root `pnpm dev` runs the exported Expo gateway on 3000; Hono joins on 8787 when
|
|
87
|
-
selected. Native Metro uses `pnpm --dir apps/mobile start`. Re-export browser changes
|
|
88
|
-
with `pnpm --dir apps/mobile build:web`; this loop is not HMR. Keep SDK 57 pinned
|
|
89
|
-
unless upgrading deliberately. Static dynamic routes need `generateStaticParams`
|
|
90
|
-
or a supported explicit alternative; static export does not supply SSR.
|
|
91
|
-
|
|
92
|
-
New Expo, OpenNext, Queues, Basin, Images and Analytics Engine selections use
|
|
93
|
-
Wrangler. Preserve existing engines; incompatible additions to Void need a
|
|
94
|
-
reviewed migration. Expo + Better Auth generates browser/native transport and
|
|
95
|
-
screens, but device acceptance remains separate. Full-stack CLI capabilities do
|
|
96
|
-
not automatically upgrade the portal's legacy publisher.
|
|
97
|
-
|
|
98
|
-
## Select data and identity
|
|
99
|
-
|
|
100
|
-
| Selection | Destination and generated scope | Required implementation/setup |
|
|
101
|
-
| --------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
|
|
102
|
-
| `--d1` | `packages/db`; Drizzle/D1 factory, schema and explicit migration tooling; `DB` Worker binding | Create/reconcile the database, define product tables and review SQL; one deployment migration owner |
|
|
103
|
-
| `--neon` | `packages/db`; Drizzle/Neon HTTP factory, schema and transactional migration tooling | Select project/role, configure runtime and separate direct migration connections, review SQL |
|
|
104
|
-
| `--better-auth` | `packages/auth` and database schema; auth routes on the selected server | Private secret, public auth origin, migrations, sign-up policy and resource authorization |
|
|
105
|
-
| `--clerk` | Web provider, sign-in/up pages and middleware when web is selected; `packages/auth` backend helper when Hono is selected | Configure keys, origins, protected routes and native client integration as needed |
|
|
106
|
-
| `--local-data` | `packages/local-data`; async read/write interface | Implement platform-specific SQLite/filesystem adapters, offline behavior and synchronization |
|
|
107
|
-
|
|
108
|
-
D1 is the standard choice when Worker-local SQL fits. Choose Neon when the application needs PostgreSQL semantics. Better Auth supplies application-controlled identity; Clerk supplies hosted identity. Hosting audience protection is a separate access layer from either choice.
|
|
109
|
-
|
|
110
|
-
## Select services
|
|
111
|
-
|
|
112
|
-
| Selection | Destination and generated scope | Required implementation/setup |
|
|
113
|
-
| ----------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
114
|
-
| `--r2` | Selected server's private `FILES` binding and `private-files.md` | Authorized upload/download/delete endpoints and file ownership checks; no public bucket or generic file API is generated |
|
|
115
|
-
| `--kv` | Selected server's `CONFIG` binding | Keys, TTLs and propagation handling; never use KV as transactional authority |
|
|
116
|
-
| `--realtime` | `apps/realtime`; SQLite-backed Durable Object rooms and WebSocket message forwarding | Authenticate connections, authorize membership, isolate rooms and handle reconnects; public entry returns 501 until implemented |
|
|
117
|
-
| `--neon-realtime` | `packages/neon-realtime`; separate sealing server/subscription client factories and Drizzle adapter | Manually activate the selected branch, configure origins and implement authorized queries, renewal and cleanup |
|
|
118
|
-
| `--stream` | `packages/stream`; server-only Cloudflare Stream live input factory for WHIP/WHEP broadcasts | Activate Stream manually; implement creator/player UI, input ownership, media negotiation, playback privacy and teardown |
|
|
119
|
-
| `--queues` | `apps/jobs`; queue producer/consumer, retry limits and dead-letter configuration; producer binding on a selected server | Transactional idempotency, processing and dead-letter recovery; the starter retries messages instead of acknowledging unimplemented work |
|
|
120
|
-
| `--cron` | `apps/scheduled`; scheduled Worker with an hourly starter trigger | Product schedule, task implementation, overlap policy, idempotency and failure visibility |
|
|
121
|
-
| `--workflows` | `apps/workflows`; durable workflow and a retryable validation step | Authorized invocation, product steps, retry/resume/cancel behavior and recovery |
|
|
122
|
-
| `--workers-ai` | Selected server's `AI` Worker binding | Model calls, authorization, input handling, usage and spending limits |
|
|
123
|
-
| `--analytics-engine` | `EVENTS` dataset binding and `packages/analytics-engine/server` helper | Define privacy-safe events; verify ingestion and sampled queries; not a billing ledger |
|
|
124
|
-
| `--images` | `IMAGES` binding and private raw-byte transform helper | Activate Images, authorize source objects and enforce transform/cache limits |
|
|
125
|
-
| `--realtimekit` | Server-only meeting and participant-token factory | Activate app/presets, implement authorized routes and platform media SDK/UI |
|
|
126
|
-
| `--video` | Stream private direct-upload URL helper | Activate Stream, implement processing checks, retention and signed playback |
|
|
127
|
-
|
|
128
|
-
`--realtime` and `--neon-realtime` are independent and can coexist. The former supplies room-based messaging infrastructure; the latter supplies live SQL query integration. Neither generates a complete collaboration or subscription feature.
|
|
129
|
-
|
|
130
|
-
## Select SDKs and integrations
|
|
131
|
-
|
|
132
|
-
| Selection | Destination and generated scope | Required implementation/setup |
|
|
133
|
-
| -------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
134
|
-
| `--openai` | `packages/ai`; direct server-side OpenAI SDK factory | Models, routes, failure handling and usage limits |
|
|
135
|
-
| `--ai-sdk` | `packages/ai`; AI SDK `generateText`/`streamText` exports and OpenAI provider | Streaming, tools, cancellation and provider configuration; generated credentials default to OpenAI |
|
|
136
|
-
| `--resend` | `packages/email`; server SDK factory | Verified sending domain, templates, delivery/bounce handling and webhook verification |
|
|
137
|
-
| `--stripe` | `packages/billing`; Hono Checkout/portal, verified webhooks, DB projection and entitlement guard | Configure plans/prices/origin/secrets, review/apply SQL, verify sandbox/live purchase lifecycle |
|
|
138
|
-
| `--revenuecat` | `packages/billing`; native purchase/restore/manage, verified webhooks and shared entitlement projection | Configure project/app IDs, platform keys/offerings/store products, migrate and verify real development-build purchases |
|
|
139
|
-
| `--sentry` | `packages/observability`; integration boundary and redaction fields | Install/init platform SDKs, configure private source-map uploads and verify alerts |
|
|
140
|
-
| `--posthog` | `packages/analytics`; server analytics factory | Event schema, consent, privacy filtering and event delivery |
|
|
141
|
-
| `--basin` | `packages/analytics`, or `packages/basin` alongside PostHog; event helper and private `ANALYTICS` stream binding | Event schema, ingestion verification and application-specific sink/transformation design |
|
|
142
|
-
| `--styling` | `packages/styling`; light/dark tokens and Tailwind v3 preset used by Expo/WXT | Platform typography/components and adoption by other interfaces; automatically selected with Expo and WXT |
|
|
143
|
-
|
|
144
|
-
OpenAI and AI SDK are alternative recipes for `packages/ai`; Workers AI can accompany either. PostHog and Basin can coexist: the Basin recipe changes its package destination to avoid a collision. Electron starts with its own renderer styling; shared tokens do not imply one component library across every platform.
|
|
145
|
-
|
|
146
|
-
The provider adapters can configure selected Neon projects/connections, Clerk applications/keys, Resend domains/sending keys, Stripe account/webhook setup, RevenueCat projects/apps/keys, Sentry projects/DSNs, PostHog projects and OpenAI projects/service accounts. This automation is separate from the generated application integration. See [provider configuration](software-factory.md#provider-configuration) for fields, credentials, permissions and remaining owner steps. Neon Realtime activation is manual.
|
|
147
|
-
|
|
148
|
-
Optional `--stripe` and `--revenuecat` now generate shared Hono billing, DB schema and validated contracts. Stripe supplies web Checkout/customer portal; RevenueCat supplies native purchase/restore/manage wiring. Each provider projects independently to the signed-in account; Hono unions verified grants and enforces access. Configuration, reviewed SQL migration and provider/store acceptance remain required. Neither provider is selected by plain init.
|
|
149
|
-
|
|
150
|
-
Existing billing-guidance/scaffold projects retain their recorded provenance. New billing implementation requires an explicitly reviewed migration; do not silently replace edited source or treat an old SDK factory as the new entitlement contract.
|
|
151
|
-
|
|
152
|
-
## Composition and compatibility
|
|
153
|
-
|
|
154
|
-
| Choice | Resolver behavior |
|
|
155
|
-
| ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
156
|
-
| No application flag | Adds Expo universal frontend; explicit Vercel hosting selects Next.js |
|
|
157
|
-
| `--next` without a hosting flag | Selects Vercel |
|
|
158
|
-
| Vinext with Vercel | Rejected; Vinext requires Cloudflare |
|
|
159
|
-
| Vinext and Next.js; D1 and Neon; Better Auth and Clerk; OpenAI and AI SDK | Each pair is mutually exclusive |
|
|
160
|
-
| Better Auth without a database | Adds D1; an explicit Neon selection uses PostgreSQL instead |
|
|
161
|
-
| Neon Realtime without a database | Adds Neon; an explicit D1 selection is rejected |
|
|
162
|
-
| Better Auth with Neon Realtime | Resolves to Neon regardless of flag order |
|
|
163
|
-
| RevenueCat without Stripe | Supported independent selection; billing remains optional |
|
|
164
|
-
| Expo or WXT | Includes the shared styling package |
|
|
165
|
-
| Database/auth or Neon Realtime without a server | Init includes Hono; existing additions require a compatible server |
|
|
166
|
-
| Native Next.js/Vercel with Worker-bound capabilities such as D1, R2, KV or Workers AI | Adds Hono on Cloudflare when required |
|
|
167
|
-
| New Expo workspaces, OpenNext, Queues, Basin, Images or Analytics Engine | Uses Wrangler for all Cloudflare targets in the workspace |
|
|
168
|
-
| Later addition that changes the engine or relocates existing runtime source | Rejected; `add` does not migrate delivery engines or runtime ownership |
|
|
169
|
-
|
|
170
|
-
Hono owns the shared database/auth runtime and server resource bindings. Other interfaces consume its endpoints. Worker services such as realtime, cron and workflows have their own deployable applications.
|
|
171
|
-
|
|
172
|
-
```sh
|
|
173
|
-
# Web with D1 and Better Auth (D1 is also the conditional auth default).
|
|
174
|
-
anhedral init my-app --better-auth
|
|
175
|
-
|
|
176
|
-
# Universal web/iOS/Android and API with PostgreSQL.
|
|
177
|
-
anhedral init my-app --expo --neon
|
|
178
|
-
|
|
179
|
-
# Vercel web with an automatically selected Hono backend for R2.
|
|
180
|
-
anhedral init my-app --next --r2
|
|
181
|
-
|
|
182
|
-
# Independent room messaging and live PostgreSQL queries.
|
|
183
|
-
anhedral init my-app --realtime --neon-realtime
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
The bundled registry is authoritative for exact dependencies, destinations and compatibility:
|
|
187
|
-
|
|
188
|
-
```sh
|
|
189
|
-
anhedral registry list --json
|
|
190
|
-
anhedral registry view better-auth --json
|
|
191
|
-
anhedral init my-app --vinext --hono --d1 --better-auth --r2 --dry-run --json
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Append `--dry-run --json` to an initialization command to inspect its resolved products, destinations and setup requirements without writes or network requests. There is no `--all` or external registry support. Recipes create integration foundations; provider resources, credentials and finished features have their own setup and acceptance requirements.
|
|
195
|
-
|
|
196
|
-
## Organize the source
|
|
197
|
-
|
|
198
|
-
| Location | Owns |
|
|
199
|
-
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
200
|
-
| `apps/mobile`, `apps/api`, explicit `apps/web`, other selected `apps/*` | Deployable applications and services, runtime entry points and configuration |
|
|
201
|
-
| `packages/ui` | Shared web UI components |
|
|
202
|
-
| `packages/db` | Server-only database factory, schemas and migrations |
|
|
203
|
-
| `packages/auth`, other selected `packages/*` | Reusable integration code with explicit inputs |
|
|
204
|
-
| `packages/typescript-config`, `packages/eslint-config` | Shared tooling conventions |
|
|
205
|
-
| `anhedral.json` | Committed Anhedral configuration and provenance |
|
|
206
|
-
| `docs/stack.md` | Generated selection, destinations and setup requirements |
|
|
207
|
-
| `.anhedral/` | Ignored local delivery journals and private state |
|
|
208
|
-
|
|
209
|
-
Use one root `pnpm-lock.yaml` and the root task graph. Keep framework-specific lint dependencies in the consuming app; shared lint configuration stays usable by non-web clients. Shared packages receive bindings, connections and configuration through factories. Extract code around actual consumers, and keep runtime/network relationships explicit.
|
|
210
|
-
|
|
211
|
-
Validate browser/API routing through the Cloudflare gateway and Hono separately from iOS/Android exports. Static/native exports establish compilation, not device, auth or store acceptance.
|
|
212
|
-
|
|
213
|
-
See the [full-stack example](https://github.com/anhedral/anhedral-cli/tree/main/examples/full-stack) for a source-only composition. It demonstrates the structure; it is not a running production system.
|
|
214
|
-
|
|
215
|
-
### One Anhedral configuration
|
|
216
|
-
|
|
217
|
-
The root `anhedral.json` has an envelope with `schemaVersion: 1` and validated named sections. Each section retains its own domain schema. Only selected hosting sections are present.
|
|
218
|
-
|
|
219
|
-
| Section | Purpose |
|
|
220
|
-
| ------------ | --------------------------------------------------------------------- |
|
|
221
|
-
| `identity` | Stable application identity and local catalog registration |
|
|
222
|
-
| `setup` | Products, hosting, environment requirements and owner setup |
|
|
223
|
-
| `standard` | Scaffold conventions and version provenance |
|
|
224
|
-
| `registry` | Recipe versions, generated-file fingerprints and workspace references |
|
|
225
|
-
| `providers` | Nonsecret integration settings and resource selections |
|
|
226
|
-
| `cloudflare` | Delivery engine, account, audience and targets |
|
|
227
|
-
| `vercel` | Repository, team, project and audience |
|
|
228
|
-
|
|
229
|
-
Preserve unrelated sections when editing. Credentials and delivery history stay outside this document. Native tooling files remain with their applications: a single Anhedral document does not replace `package.json`, Vite configuration or per-app deployment configuration.
|
|
230
|
-
|
|
231
|
-
## Data and migrations
|
|
232
|
-
|
|
233
|
-
All database-backed selections use the server-only `@workspace/db` package:
|
|
234
|
-
|
|
235
|
-
| Path | Responsibility |
|
|
236
|
-
| ------------------------------- | ----------------------------------------------------- |
|
|
237
|
-
| `packages/db/src/index.ts` | Factory receiving a D1 binding or connection string |
|
|
238
|
-
| `packages/db/src/schema.ts` | Shared Drizzle schema, including selected auth tables |
|
|
239
|
-
| `packages/db/src/migrate.ts` | Explicit migration entry point |
|
|
240
|
-
| `packages/db/drizzle/` | SQL, snapshots and migration journal |
|
|
241
|
-
| `packages/db/drizzle.config.ts` | Configuration with paths relative to itself |
|
|
242
|
-
|
|
243
|
-
The factory does not load environment files or migrate on startup. Review generated SQL from `pnpm db:generate` before running `pnpm db:migrate`. Both tasks are uncached and excluded from builds and checks. Exactly one server owns deployment migrations; other consumers share the database without becoming migration writers.
|
|
244
|
-
|
|
245
|
-
D1 manual migration defaults to local. `pnpm db:migrate -- --remote` explicitly targets the configured database in the migration owner's Worker configuration. Void deployment validates an ignored, byte-identical app-local copy against the authoritative shared SQL; the copy is not another migration source.
|
|
246
|
-
|
|
247
|
-
Neon runtime queries use server-supplied `DATABASE_URL` through the HTTP adapter. Interactive transactions require a reviewed WebSocket or PostgreSQL adapter. Migrations use a transactional WebSocket connection and direct `DATABASE_URL_UNPOOLED` from the environment or `packages/db/.env.local`/`.env`. Test migrations on the intended development branch before production. Runtime provisioning does not supply migration credentials automatically.
|
|
248
|
-
|
|
249
|
-
## Live video with Cloudflare Stream
|
|
250
|
-
|
|
251
|
-
Select `--stream` for one-to-many ultra-low latency live video: browser or supported encoder publishes with WHIP and viewers play with WHEP. [Stream Live WebRTC reached GA on October 15, 2026](https://developers.cloudflare.com/changelog/post/2026-10-15-stream-live-webrtc-ga/). It is the preferred broadcast service when a product needs live video. Add it only when needed; it can coexist with `--realtime` Durable Object messaging and `--neon-realtime` live SQL. Many-to-many calls use the separately selected `--realtimekit` server helpers and platform client implementation.
|
|
252
|
-
|
|
253
|
-
The recipe creates `packages/stream` with a server-only `@workspace/stream/server` export. `createStream({ accountId, apiToken })` exposes live input creation and retrieval. It requires a server, works with Vinext, native Next.js or Hono, and adds no Worker resource binding or SDK dependency. Follow the generated package README. Stream activation, live inputs and runtime credentials are configured explicitly; CLI provisioning and `ship` do not automate this integration.
|
|
254
|
-
|
|
255
|
-
Keep `STREAM_API_TOKEN` server-only and scope it to Stream Write in the customer account selected by `STREAM_ACCOUNT_ID`. Authorize creators, persist input ownership and enforce quotas before management calls. The returned `webRTC.url` is a publish credential: disclose it only to the authorized broadcaster, never to viewers, logs or static assets. Viewer responses contain only the approved WHEP endpoint or short-lived playback token. Choose `requireSignedURLs` explicitly when creating an input; implement and verify playback token issuance for private broadcasts. Hosting access protection does not protect Stream media endpoints.
|
|
256
|
-
|
|
257
|
-
Media goes directly between the browser and Stream. The application server owns identity, input ownership and endpoint/token issuance. Implement camera/microphone consent, HTTPS, ICE negotiation, user-facing errors, reconnect and session cleanup. Delete signaling sessions, close peer connections and stop capture tracks when a broadcast ends. No finished player, broadcaster or conferencing feature is generated.
|
|
258
|
-
|
|
259
|
-
As reviewed October 16, 2026, the [WebRTC documentation](https://developers.cloudflare.com/stream/webrtc-beta/) requires paired WHIP/WHEP and excludes recording, WHIP-to-HLS/DASH playback, RTMP/SRT-to-WHEP bridging, restreaming and live viewer counts. Usage is visible in Stream analytics/billing; broadcast and player-experience metrics remain unsupported. The URL retains `webrtc-beta` although the feature is GA. [Delivery billing](https://developers.cloudflare.com/stream/pricing/) began October 15 at standard Stream rates; budget viewer-minutes and check current account eligibility before activation. Verify creator/viewer access, private media denial, cross-tenant isolation, reconnect and teardown against the actual provider before claiming live acceptance.
|
|
260
|
-
|
|
261
|
-
```sh
|
|
262
|
-
anhedral init my-app --stream
|
|
263
|
-
anhedral add stream --dry-run --json
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
## Neon Realtime
|
|
267
|
-
|
|
268
|
-
`--neon-realtime` selects live PostgreSQL query foundations and adds Neon if no database was chosen. It requires a server and rejects an explicit conflicting database. It can coexist with `--realtime`, which means Durable Object WebSocket rooms.
|
|
269
|
-
|
|
270
|
-
The recipe creates `@workspace/neon-realtime/server` and `/client` exports in `packages/neon-realtime`. The server receives private `NEON_REALTIME_SECRET` and `DATABASE_URL`; the client receives public `NEON_REALTIME_URL`. Follow the generated package README for framework-specific public environment mapping.
|
|
271
|
-
|
|
272
|
-
Enable Realtime on the intended Neon branch and configure exact allowed origins, secret and endpoint manually. Authenticate sealing requests, derive user/tenant scope from verified identity, and construct bounded read-only queries on the server. Clients subscribe with short-lived sealed queries; implement authorized renewal, reconnect behavior and isolation tests. No arbitrary SQL endpoint or complete subscription feature is generated.
|
|
273
|
-
|
|
274
|
-
The pinned integration targets the [Neon Realtime beta](https://neon.com/docs/realtime/overview), whose reviewed authorization model has no RLS support. Scope the queries you seal and review the provider's current limits before production use. Recipe tests do not establish live subscription or cross-tenant acceptance.
|
|
275
|
-
|
|
276
|
-
## Runtime and delivery configuration
|
|
277
|
-
|
|
278
|
-
| Profile | Engine and configuration | Project runtime floor |
|
|
279
|
-
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
|
|
280
|
-
| Supported Cloudflare selections | Void `0.27.0`; app-local `anhedral.cloudflare.json`, `void.config.ts`, `env.ts`, `env.example`, committed `void.lock.json` | Node.js `24.21.0+` |
|
|
281
|
-
| Explicit OpenNext, Queues/DLQ or Basin | Wrangler; app-local `wrangler.jsonc` | Node.js `22.13+` on 22.x, or `24+` |
|
|
282
|
-
| Native Next.js/Vercel and other non-Void profiles | Native framework/platform tools | Node.js `22.13+` on 22.x, or `24+` |
|
|
283
|
-
|
|
284
|
-
Use pnpm `10.34.5`. The CLI's own supported Node range is broader than the generated toolchains' requirements. For a new development environment, Node.js `24.21.0+` satisfies these documented floors.
|
|
285
|
-
|
|
286
|
-
Existing projects keep their recorded backend ownership during readiness checks and additions. A pre-contracts Hono project needs an explicit contracts/proxy migration before adding web/auth UI wiring; unrelated additions preserve its API source. There is one Cloudflare engine per workspace. `add` refuses selections that would switch the engine or relocate existing runtime source. Anhedral owns composition, account/audience selection, shared packages and independent verification; Void owns its supported provisioning, deployment and code rollback mechanics. Native Void framework features are not implied by deploying Vinext through Void.
|
|
287
|
-
|
|
288
|
-
Void apps read one private app-root `.env`, copied from `env.example`. Avoid `.env.*` companions and `.dev.vars` in those apps. Wrangler and native Vercel use their generated runtime templates. Keep production secrets server-side; public `VITE_*`, `NEXT_PUBLIC_*` and `EXPO_PUBLIC_*` values are build inputs, not server secrets. Vinext maps `NEXT_PUBLIC_*` into client bundles. The [provider reference](software-factory.md#provider-configuration) describes credential transport and each integration's prerequisites.
|
|
289
|
-
|
|
290
|
-
### Delivery scope by target
|
|
291
|
-
|
|
292
|
-
| Target | Supported automation | Remaining delivery work |
|
|
293
|
-
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
294
|
-
| Cloudflare web/API/services | Selected resource setup, bindings/secrets, deployment, provider evidence, verification and recorded code rollback | Account/audience selection, product acceptance and data compatibility; rollback does not reverse SQL or restore data |
|
|
295
|
-
| Native Next.js/Vercel | Project connection, environment configuration, CLI delivery or adoption of connected Git deployments, provider evidence and recorded rollback | Eligible account plan, audience protection, repository/CI policy and product acceptance |
|
|
296
|
-
| Mixed Cloudflare/Vercel | Cloudflare first, then Vercel, with per-target receipts | Handle partial success; there is no atomic cross-provider release or rollback |
|
|
297
|
-
| Expo | Explicit platform/profile EAS build, project/source checks, queued-build resume and artifact receipt | Signing, device acceptance, store enrollment and submission; a simulator build is not a store artifact |
|
|
298
|
-
| Electron | Local build and packaging scripts | Platform signing, notarization, installers, updates and distribution |
|
|
299
|
-
| WXT | Local extension build and ZIP tooling | Installed-browser acceptance, store review and publication |
|
|
300
|
-
|
|
301
|
-
Hosting audience starts unconfigured and must be selected explicitly. Hosting protection, application authentication and resource authorization are separate decisions. Generated SDK factories and configured provider resources do not establish completed user flows.
|
|
302
|
-
|
|
303
|
-
The optional Codex inspector uses the same project and service domain logic as the CLI. Opening it reads local configuration and recorded evidence. Live status, analytics and bounded data reads require explicit service actions; supported deletion requires its separate confirmation flow. The inspector is development tooling, not a generated application dependency.
|
|
304
|
-
|
|
305
|
-
## Source ownership and dependency policy
|
|
306
|
-
|
|
307
|
-
Generated source belongs to the application and remains editable. Preview bundled additions with `add --dry-run`, `--diff` or `--view`; additions preserve edited/untracked source and record provenance. They require current registry receipts. When `filesChecked: false`, the selection plan is available but a new upstream web bootstrap cannot be previewed offline. Actual installation checks conflicts before committing files.
|
|
308
|
-
|
|
309
|
-
The catalog in `src/stack-registry.ts` defines composition, `src/dependencies.ts` pins dependencies, and `src/scaffold/` implements recipes. Generated plugin references come from these maintained sources and documents.
|
|
310
|
-
|
|
311
|
-
Commit the resolved lockfile and any generated `patches/*` plus `pnpm-workspace.yaml` patch mappings. Conditional reviewed patches apply only to `braces@3.0.3` and `node-forge@1.4.0`. `pnpm audit:deps` retains raw upstream findings in `.anhedral-audit-report.json` and blocks high/critical advisories except the exact reviewed advisory/version/patch combinations (`GHSA-vfj7-8cjw-p6xm` and `GHSA-86w9-cpqp-85rv`). Frozen pnpm installation applies patches; detailed runtime regressions belong to this repository's `pnpm test:patch`. These temporary mitigations must be reviewed each release and retired when a compatible verified fix replaces them. Compatible brace-expansion overrides do not create an exception for an affected 3.x consumer.
|
|
312
|
-
|
|
313
|
-
Validate the resolved dependency graph for each application selection. A clean CLI dependency graph does not establish a clean generated application graph.
|
|
314
|
-
|
|
315
|
-
## Product requirements
|
|
316
|
-
|
|
317
|
-
A completed application has server-side resource authorization, private file access, reviewed migrations, meaningful error/loading/empty states and tests for its actual user flows. Jobs and webhooks must tolerate duplicates; paid operations need limits and ownership. Verify the selected runtime and any native packaging, permissions and signing.
|
|
318
|
-
|
|
319
|
-
Use the [software factory](software-factory.md) for the implementation and acceptance process. Detailed delivery evidence and outstanding live acceptance gaps belong in the [Void verification reference](verification.md#void-delivery-verification) and the application's own verification record, rather than in this architecture standard.
|
|
23
|
+
Init writes editable source and can install dependencies and initialize Git. It never provisions providers, creates credentials, deploys or registers a managed project. Consumers own application security and operations; Platform is a separate managed product. Existing applications, native port work and Platform runtime artifacts retain their explicit reviewed pins until separately adopted. A CLI build or release does not update them.
|
package/docs/ui.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Anhedral UI
|
|
2
|
+
|
|
3
|
+
One CLI routes source installation to official shadcn for Next.js and React Native Reusables for Expo. It owns the catalog and a small native extension registry, rather than a fork of either library. New `anhedral init` applications already have web UI configuration and three starter components.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
anhedral ui list --json
|
|
7
|
+
anhedral ui init --web
|
|
8
|
+
anhedral ui add button card --web
|
|
9
|
+
anhedral ui add button --native
|
|
10
|
+
anhedral ui diff button --native
|
|
11
|
+
anhedral ui doctor --all
|
|
12
|
+
anhedral ui add card --all --dry-run --json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
All commands accept the global `--cwd`, `--json` and `--quiet` options. `--web`, `--native` and `--all` are mutually exclusive. Without a selector, a single detected Next.js or Expo app is used; ambiguous workspaces require selection. Detection supports an app itself or applications immediately under a workspace's `apps/` directory. Web and native use separate directories.
|
|
16
|
+
|
|
17
|
+
`list` reads the packaged catalog without network access. `doctor` checks static configuration and exits unsuccessfully for missing setup; it does not claim runtime acceptance. `--dry-run` previews init/add/diff without network or writes. Every selected target is preflighted before installation starts. Upstream installation can still fail after an earlier target succeeds; source installation is not a cross-project transaction, so review Git changes before retrying.
|
|
18
|
+
|
|
19
|
+
`init --web` delegates new configuration to pinned shadcn with Base UI defaults. Existing `components.json` is validated and preserved. `init --native` requires a prepared Expo/NativeWind 4 project using the [RNR manual setup](https://reactnativereusables.com/docs/installation/manual). It does not create Expo, rewrite Metro/root layouts, choose device permissions or add a second styling engine. Complete RNR's dependencies, CSS variables, Tailwind/Metro configuration, aliases, `cn` helper and portal host first. It can create the conventional native `components.json`, then adds Anhedral metadata and attribution without replacing existing files.
|
|
20
|
+
|
|
21
|
+
`add` validates canonical names against the catalog. Native chooses a packaged reviewed Anhedral extension when declared, otherwise RNR's NativeWind item, otherwise fails clearly before installing. The extension registry starts empty. Web uses official shadcn items. The pinned shadcn CLI owns registry dependency resolution and copying source. We do not use the universal-only `@shadcn/registry` installer for component projects.
|
|
22
|
+
|
|
23
|
+
`add` never requests `--overwrite`; upstream protects existing component files. `diff` delegates to shadcn's `add --diff` preview. Commit or inspect consumer changes before updating, and reconcile changes explicitly. Native `diff` availability follows the upstream CLI and registry behavior; it is not a custom merge engine.
|
|
24
|
+
|
|
25
|
+
## Ownership and provenance
|
|
26
|
+
|
|
27
|
+
`assets/ui/catalog.json` records the catalog revision, upstream sources, dependency metadata and pinned installer. Availability is not parity or runtime certification. RNR URLs are live upstream endpoints; the catalog's recorded source revision describes the inventory, not an immutable downloaded artifact. Review registry changes before installing into sensitive consumers.
|
|
28
|
+
|
|
29
|
+
`.anhedral-ui.json` records platform, catalog revision and source ownership; it does not automatically update components. `ANHEDRAL_UI_LICENSES/` retains the relevant MIT notice. No Anhedral runtime package is introduced. Theme through consumer CSS variables and existing tokens. Future native extensions require a focused product need, upstream provenance/license and native consumer evidence; broad parity is not a release prerequisite.
|
|
30
|
+
|
|
31
|
+
Validate web flows in a browser. Validate native interactions in Android/iOS development builds, including accessibility, overlays, keyboard and lifecycle. Typechecking or an Expo web export does not establish device acceptance. Legacy `docs/native-ui.md` describes the retained earlier port, not this new default UI layer.
|
|
32
|
+
|
|
33
|
+
For a generated Anhedral workspace, `anhedral add expo` creates the native application after its core source prerequisites, and `anhedral add native-ui` prepares its NativeWind/RNR integration without replacing product UI. The UI component commands remain independent of backend activation. See [stack additions](capabilities.md).
|