anhedral 0.13.0 → 0.15.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 +35 -232
- package/assets/patches/audit-deps.mjs +12 -2
- package/assets/ui/LICENSE.shadcn +21 -0
- package/assets/ui/UPSTREAM.json +33 -0
- package/assets/ui/native/button.tsx +85 -0
- package/assets/ui/native/card.tsx +33 -0
- package/assets/ui/native/dialog.tsx +75 -0
- package/assets/ui/native/input.tsx +27 -0
- package/assets/ui/native/label.tsx +4 -0
- package/assets/ui/native/layout.tsx +26 -0
- package/assets/ui/native/text.tsx +20 -0
- package/assets/ui/native/theme-switcher.tsx +22 -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/capabilities.d.ts +5 -5
- package/dist/capabilities.js +3 -21
- package/dist/capability-contract.d.ts +3 -3
- package/dist/capability-contract.js +11 -50
- package/dist/cli-delivery.d.ts +1 -1
- package/dist/cli-delivery.js +5 -65
- package/dist/cli-output.js +3 -3
- package/dist/command-schema.js +35 -86
- package/dist/delivery-evidence.d.ts +1 -1
- package/dist/delivery-evidence.js +7 -36
- package/dist/delivery.d.ts +2 -8
- package/dist/delivery.js +20 -101
- package/dist/dependencies.d.ts +6 -57
- package/dist/dependencies.js +54 -188
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1 -4
- package/dist/inspector-model.d.ts +2 -2
- package/dist/integration-service-readers.d.ts +1 -2
- package/dist/integration-service-readers.js +3 -84
- package/dist/lifecycle-model.d.ts +1 -1
- package/dist/lifecycle-model.js +1 -1
- package/dist/mobile-delivery.d.ts +1 -1
- package/dist/mobile-delivery.js +4 -0
- package/dist/platforms/mobile.js +30 -121
- package/dist/platforms/web.d.ts +3 -0
- package/dist/platforms/web.js +299 -0
- package/dist/project-config.d.ts +1 -1
- package/dist/project-config.js +0 -1
- package/dist/project-inspector.js +5 -36
- package/dist/project-state.d.ts +1 -3
- package/dist/project-state.js +2 -85
- package/dist/provider-auth.js +3 -38
- package/dist/provider-readiness.d.ts +1 -1
- package/dist/provider-readiness.js +5 -24
- package/dist/providers/adapters.js +0 -175
- package/dist/providers/api.d.ts +1 -1
- package/dist/providers/api.js +3 -3
- package/dist/providers/config.js +2 -48
- package/dist/providers/definitions.d.ts +1 -204
- package/dist/providers/definitions.js +0 -85
- package/dist/providers/provision.d.ts +1 -1
- package/dist/providers/receipts.js +1 -11
- package/dist/providers/recovery-verification.js +1 -61
- package/dist/providers/runtime.js +4 -35
- package/dist/providers/state.js +1 -7
- package/dist/provision.d.ts +5 -13
- package/dist/provision.js +4 -80
- package/dist/readiness.d.ts +1 -1
- package/dist/readiness.js +3 -8
- package/dist/registry/add.js +10 -70
- package/dist/registry/bootstrap.d.ts +3 -2
- package/dist/registry/bootstrap.js +4 -13
- package/dist/registry/commands.js +8 -10
- package/dist/registry/context.js +0 -1
- package/dist/registry/options.js +8 -38
- package/dist/registry/resolve.d.ts +3 -4
- package/dist/registry/resolve.js +26 -108
- package/dist/registry/types.d.ts +1 -7
- package/dist/registry/usage.js +2 -2
- package/dist/runtime-policy.d.ts +0 -2
- package/dist/runtime-policy.js +0 -16
- package/dist/scaffold/auth.d.ts +1 -2
- package/dist/scaffold/auth.js +55 -130
- package/dist/scaffold/backend.d.ts +0 -4
- package/dist/scaffold/backend.js +1 -186
- package/dist/scaffold/billing-schema.d.ts +1 -1
- package/dist/scaffold/billing-schema.js +4 -4
- package/dist/scaffold/billing.js +11 -19
- 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 +18 -126
- package/dist/scaffold/documentation.d.ts +0 -1
- package/dist/scaffold/documentation.js +22 -86
- package/dist/scaffold/expo-auth.js +33 -22
- package/dist/scaffold/expo-billing.js +17 -52
- package/dist/scaffold/expo-runtime.d.ts +2 -2
- package/dist/scaffold/expo-runtime.js +6 -97
- package/dist/scaffold/integrations.d.ts +1 -3
- package/dist/scaffold/integrations.js +9 -10
- package/dist/scaffold/managed-email.d.ts +3 -0
- package/dist/scaffold/managed-email.js +47 -0
- package/dist/scaffold/native-ui.d.ts +2 -0
- package/dist/scaffold/native-ui.js +69 -0
- package/dist/scaffold/password-reset.d.ts +1 -0
- package/dist/scaffold/password-reset.js +99 -0
- package/dist/scaffold/private-files.d.ts +2 -0
- package/dist/scaffold/private-files.js +78 -0
- package/dist/scaffold/stack-documentation.d.ts +0 -1
- package/dist/scaffold/stack-documentation.js +3 -49
- package/dist/scaffold/styling.d.ts +1 -1
- package/dist/scaffold/styling.js +20 -28
- package/dist/scaffold/web-billing.d.ts +2 -0
- package/dist/scaffold/web-billing.js +48 -0
- package/dist/scaffold/workspace.js +53 -194
- package/dist/service-deletion.js +1 -1
- package/dist/service-descriptor.js +5 -12
- package/dist/service-model.d.ts +1 -1
- package/dist/service-operations.js +2 -32
- package/dist/service-readers.js +1 -32
- package/dist/services-command.d.ts +1 -1
- package/dist/services-command.js +3 -9
- package/dist/ship.d.ts +3 -316
- package/dist/ship.js +10 -142
- package/dist/stack-registry.d.ts +2 -52
- package/dist/stack-registry.js +55 -403
- package/dist/standard.js +7 -14
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/anhedral-stack.md +23 -122
- package/docs/assets/anhedral-stack-light.png +0 -0
- package/docs/assets/anhedral-stack.png +0 -0
- package/docs/software-factory.md +24 -557
- package/docs/stack-standard.md +47 -294
- package/docs/verification.md +320 -0
- package/package.json +20 -22
- 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/registry/presets.d.ts +0 -4
- package/dist/registry/presets.js +0 -41
- package/dist/scaffold/cloudflare-services.d.ts +0 -8
- package/dist/scaffold/cloudflare-services.js +0 -198
- 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/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/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const GENERATOR_VERSION = '0.
|
|
1
|
+
export const GENERATOR_VERSION = '0.15.0';
|
package/docs/anhedral-stack.md
CHANGED
|
@@ -1,122 +1,23 @@
|
|
|
1
|
-
# Anhedral
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
backend -.-> compute
|
|
25
|
-
backend -.-> media
|
|
26
|
-
backend -.-> payments
|
|
27
|
-
backend -.-> operations
|
|
28
|
-
clients -.->|"when a backend is needed"| backend
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
web ~~~ clients
|
|
32
|
-
web -.->|"add API service binding"| backend
|
|
33
|
-
client -.->|"native HTTPS when selected"| backend
|
|
34
|
-
|
|
35
|
-
subgraph full["3 · Full-product preset · selection summary"]
|
|
36
|
-
preset["Minimal app + all capabilities above<br/>22 selected products · no provider activation"]
|
|
37
|
-
end
|
|
38
|
-
core ~~~ preset
|
|
39
|
-
compute ~~~ preset
|
|
40
|
-
media ~~~ preset
|
|
41
|
-
payments ~~~ preset
|
|
42
|
-
operations ~~~ preset
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Solid lines show the minimal delivery path. Dashed lines summarize optional
|
|
46
|
-
integrations, not every network request or deployment. The full-product group is a
|
|
47
|
-
selection summary, not another runtime. Grouped capabilities remain separate
|
|
48
|
-
services; their exact connections depend on the implemented product.
|
|
49
|
-
|
|
50
|
-
## Minimal default
|
|
51
|
-
|
|
52
|
-
| Part | Default |
|
|
53
|
-
| --- | --- |
|
|
54
|
-
| Client | Expo + React Native + Expo Router |
|
|
55
|
-
| Components | React Native Reusables with **shadcn conventions** |
|
|
56
|
-
| Styling | NativeWind + shared design tokens |
|
|
57
|
-
| Workspace | TypeScript + pnpm + Turborepo; shared TypeScript/ESLint configuration |
|
|
58
|
-
| Web hosting | Static Expo export on a Cloudflare asset Worker |
|
|
59
|
-
| Native delivery | Local development; EAS and app stores when requested |
|
|
60
|
-
|
|
61
|
-
Plain `anhedral init my-app` creates no API, auth, database, storage binding or
|
|
62
|
-
billing package. Static dynamic routes need build-time paths; SSR is a deliberate
|
|
63
|
-
alternative.
|
|
64
|
-
|
|
65
|
-
**Growth is additive.** `hono` adds the API and contracts. `d1` adds Hono and SQL.
|
|
66
|
-
`better-auth` adds Hono and a database. `r2` adds private server-side file storage.
|
|
67
|
-
Dependencies resolve automatically: an AI tool can have an API without accounts,
|
|
68
|
-
and an anonymous app can use SQL. Additions preserve edited source; backend or
|
|
69
|
-
hosting-engine migrations require explicit review.
|
|
70
|
-
|
|
71
|
-
## Payments and AI
|
|
72
|
-
|
|
73
|
-
| Add | What it supplies |
|
|
74
|
-
| --- | --- |
|
|
75
|
-
| `stripe` | Web Checkout/customer portal; Hono, identity and durable billing state |
|
|
76
|
-
| `revenuecat` | Native purchase/restore/manage flows; shared identity and entitlements |
|
|
77
|
-
| `workers-ai` | Hono + AI binding; no implicit accounts, database or subscriptions |
|
|
78
|
-
|
|
79
|
-
Stripe and RevenueCat are independent. Hono verifies webhooks, reconciles provider
|
|
80
|
-
state and enforces paid access. Native purchases use Apple/Google billing;
|
|
81
|
-
RevenueCat synchronizes subscription state. Client purchase results never authorize
|
|
82
|
-
server operations. AI routes still need models, validation and usage limits.
|
|
83
|
-
|
|
84
|
-
## Services, add-ons and alternatives
|
|
85
|
-
|
|
86
|
-
| Capability | Selection | Scope |
|
|
87
|
-
| --- | --- | --- |
|
|
88
|
-
| Analytics | `analytics-engine`, `basin` | Event dataset/helper; private Pipelines stream |
|
|
89
|
-
| Images | `images` | Binding and private raw-byte transform helper |
|
|
90
|
-
| Video | `video`, `stream` | Private uploaded-video helper; WHIP/WHEP live input helper |
|
|
91
|
-
| Conferencing | `realtimekit` | Server meeting and participant-token helpers |
|
|
92
|
-
| App messaging | `realtime` | Durable Object room Worker |
|
|
93
|
-
| Jobs | `queues`, `cron`, `workflows` | Queue/DLQ, scheduled and durable Worker foundations |
|
|
94
|
-
| Cache | `kv` | Eventually consistent configuration/cache |
|
|
95
|
-
| Extension | `wxt` | Browser side panel API, entrypoints and permissions |
|
|
96
|
-
| Operations | `resend`, `sentry` | Email factory and monitoring integration boundary |
|
|
97
|
-
| **Next.js on Vercel** | `next` | Usual explicit web frontend alternative |
|
|
98
|
-
| **Vinext on Cloudflare** | `vinext` | Additional explicit web frontend alternative |
|
|
99
|
-
| Data / identity alternatives | `neon`, `clerk` | Replace D1 / Better Auth |
|
|
100
|
-
| Specialized additions | `neon-realtime`, `openai` / `ai-sdk`, `posthog`, `electron`, `local-data` | Live SQL, alternative AI, product analytics, desktop or local persistence |
|
|
101
|
-
|
|
102
|
-
**Full-product includes:** Expo, WXT, Hono, Better Auth, D1, R2, KV, Stripe,
|
|
103
|
-
RevenueCat, Workers AI, Analytics Engine, Basin, Images, RealtimeKit, Durable Object
|
|
104
|
-
rooms, uploaded video, live Stream video, Queues, Cron, Workflows, Resend and Sentry.
|
|
105
|
-
Explicit Next.js/Vinext, Neon and Clerk replace their corresponding preset defaults.
|
|
106
|
-
|
|
107
|
-
Cloudflare hosts selected web/API, data, storage, AI and media services. Payment
|
|
108
|
-
providers, app stores, Resend, Sentry and Vercel remain external. Media travels
|
|
109
|
-
directly between clients and media services; Hono handles authorization and token
|
|
110
|
-
issuance. Provider activation, product routes/UI and real acceptance remain work
|
|
111
|
-
after scaffolding—especially room authorization, media clients and job processing.
|
|
112
|
-
|
|
113
|
-
```sh
|
|
114
|
-
anhedral init my-app
|
|
115
|
-
anhedral add better-auth --cwd my-app --dry-run --json
|
|
116
|
-
anhedral init complete --preset full-product --dry-run --json
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Deployable code lives in `apps/*`; shared code lives in `packages/*`. Contracts,
|
|
120
|
-
database, auth, billing and service packages appear when selected. Small apps avoid
|
|
121
|
-
unneeded infrastructure; complex products use the same boundaries with more
|
|
122
|
-
capabilities.
|
|
1
|
+
# Anhedral application stack
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/anhedral-stack.png">
|
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="assets/anhedral-stack-light.png">
|
|
6
|
+
<img alt="Next.js web and Expo iOS/Android connect to Hono, Drizzle/D1 and private R2. Stripe and RevenueCat are optional payment additions." src="assets/anhedral-stack-light.png" width="1200">
|
|
7
|
+
</picture>
|
|
8
|
+
|
|
9
|
+
Every application starts with **Next.js web + Expo native + Hono + Drizzle/D1 + private R2**. Better Auth,
|
|
10
|
+
shared contracts and design tokens support the foundation. Stripe and RevenueCat are
|
|
11
|
+
the only optional additions; either can be selected independently.
|
|
12
|
+
|
|
13
|
+
Hono owns authentication, authorization, data and private files. The Next.js App Router supports SSR and React Server Components through Cloudflare
|
|
14
|
+
OpenNext. Web uses DOM shadcn UI; Expo iOS/Android uses the Anhedral native shadcn
|
|
15
|
+
port. UI implementations share contracts and tokens, not browser/native primitives.
|
|
16
|
+
Web API transport uses the `ANHEDRAL_API` service binding; native clients use the
|
|
17
|
+
configured HTTPS API. Stripe checkout and RevenueCat purchases reconcile to
|
|
18
|
+
shared server-enforced entitlements.
|
|
19
|
+
|
|
20
|
+
Source generation is separate from resource provisioning, migrations and deployment.
|
|
21
|
+
See the [stack standard](stack-standard.md) and [development workflow](software-factory.md).
|
|
22
|
+
The editable [diagram source](https://github.com/anhedral/anhedral-cli/blob/main/docs/assets/render-stack.mjs)
|
|
23
|
+
produces both themes from the same layout.
|
|
Binary file
|
|
Binary file
|