anhedral 0.16.0 → 0.17.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 +75 -18
- package/assets/ui/UPSTREAM.json +1 -18
- package/dist/capabilities.d.ts +1 -1
- package/dist/dependencies.d.ts +0 -3
- package/dist/dependencies.js +0 -54
- package/dist/registry/resolve.js +2 -0
- package/dist/scaffold/documentation.js +17 -48
- package/dist/scaffold/workspace.js +0 -6
- package/dist/stack-registry.d.ts +2 -4
- package/dist/stack-registry.js +1 -11
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/anhedral-stack.md +10 -5
- package/docs/assets/anhedral-stack-light.png +0 -0
- package/docs/assets/anhedral-stack.png +0 -0
- package/docs/capabilities.md +1 -1
- package/docs/native-ui.md +47 -102
- package/docs/software-factory.md +37 -24
- package/docs/stack-standard.md +19 -21
- package/docs/ui.md +1 -1
- package/docs/verification.md +6 -1067
- package/package.json +10 -6
- package/assets/ui/native/_controls.tsx +0 -521
- package/assets/ui/native/_core.tsx +0 -118
- package/assets/ui/native/_data.tsx +0 -200
- package/assets/ui/native/_display.tsx +0 -453
- package/assets/ui/native/_feedback.tsx +0 -242
- package/assets/ui/native/_legacy-dialog.tsx +0 -38
- package/assets/ui/native/_motion.tsx +0 -520
- package/assets/ui/native/_overlay.tsx +0 -402
- package/assets/ui/native/_selection.tsx +0 -366
- package/assets/ui/native/accordion.tsx +0 -1
- package/assets/ui/native/alert-dialog.tsx +0 -11
- package/assets/ui/native/alert.tsx +0 -1
- package/assets/ui/native/aspect-ratio.tsx +0 -1
- package/assets/ui/native/attachment.tsx +0 -8
- package/assets/ui/native/avatar.tsx +0 -8
- package/assets/ui/native/badge.tsx +0 -1
- package/assets/ui/native/breadcrumb.tsx +0 -9
- package/assets/ui/native/bubble.tsx +0 -1
- package/assets/ui/native/button-group.tsx +0 -1
- package/assets/ui/native/button.tsx +0 -86
- package/assets/ui/native/calendar.tsx +0 -170
- package/assets/ui/native/card.tsx +0 -44
- package/assets/ui/native/carousel.tsx +0 -1
- package/assets/ui/native/chart.tsx +0 -193
- package/assets/ui/native/checkbox.tsx +0 -1
- package/assets/ui/native/code-block.tsx +0 -137
- package/assets/ui/native/collapsible.tsx +0 -1
- package/assets/ui/native/combobox.tsx +0 -1
- package/assets/ui/native/command.tsx +0 -11
- package/assets/ui/native/context-menu.tsx +0 -16
- package/assets/ui/native/data-table.tsx +0 -1
- package/assets/ui/native/date-picker.tsx +0 -43
- package/assets/ui/native/dialog.tsx +0 -15
- package/assets/ui/native/direction.tsx +0 -1
- package/assets/ui/native/drawer.tsx +0 -10
- package/assets/ui/native/dropdown-menu.tsx +0 -16
- package/assets/ui/native/empty.tsx +0 -8
- package/assets/ui/native/field.tsx +0 -13
- package/assets/ui/native/hover-card.tsx +0 -1
- package/assets/ui/native/input-group.tsx +0 -8
- package/assets/ui/native/input-otp.tsx +0 -1
- package/assets/ui/native/input.tsx +0 -28
- package/assets/ui/native/item.tsx +0 -12
- package/assets/ui/native/kbd.tsx +0 -1
- package/assets/ui/native/label.tsx +0 -4
- package/assets/ui/native/layout.tsx +0 -26
- package/assets/ui/native/marker.tsx +0 -1
- package/assets/ui/native/menubar.tsx +0 -17
- package/assets/ui/native/message-scroller.tsx +0 -6
- package/assets/ui/native/message.tsx +0 -10
- package/assets/ui/native/native-select.tsx +0 -1
- package/assets/ui/native/navigation-menu.tsx +0 -10
- package/assets/ui/native/pagination.tsx +0 -9
- package/assets/ui/native/popover.tsx +0 -1
- package/assets/ui/native/progress.tsx +0 -1
- package/assets/ui/native/questionnaire.tsx +0 -130
- package/assets/ui/native/radio-group.tsx +0 -1
- package/assets/ui/native/registry.json +0 -1103
- package/assets/ui/native/resizable.tsx +0 -1
- package/assets/ui/native/scroll-area.tsx +0 -1
- package/assets/ui/native/select.tsx +0 -11
- package/assets/ui/native/separator.tsx +0 -1
- package/assets/ui/native/sheet.tsx +0 -10
- package/assets/ui/native/sidebar.tsx +0 -22
- package/assets/ui/native/skeleton.tsx +0 -1
- package/assets/ui/native/slider.tsx +0 -1
- package/assets/ui/native/spinner.tsx +0 -1
- package/assets/ui/native/switch.tsx +0 -1
- package/assets/ui/native/table.tsx +0 -10
- package/assets/ui/native/tabs.tsx +0 -1
- package/assets/ui/native/text.tsx +0 -20
- package/assets/ui/native/textarea.tsx +0 -1
- package/assets/ui/native/theme-switcher.tsx +0 -22
- package/assets/ui/native/toast.tsx +0 -11
- package/assets/ui/native/toggle-group.tsx +0 -1
- package/assets/ui/native/toggle.tsx +0 -1
- package/assets/ui/native/tooltip.tsx +0 -1
- package/assets/ui/native/trace.tsx +0 -20
- package/assets/ui/native/typography.tsx +0 -15
- package/assets/ui/theme-storage.ts +0 -25
- package/assets/ui/theme.tsx +0 -66
- package/dist/platforms/mobile.d.ts +0 -2
- package/dist/platforms/mobile.js +0 -137
- package/dist/scaffold/expo-runtime.d.ts +0 -3
- package/dist/scaffold/expo-runtime.js +0 -42
- package/dist/scaffold/native-ui.d.ts +0 -2
- package/dist/scaffold/native-ui.js +0 -74
package/README.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Anhedral CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> **Under construction.** Anhedral CLI is under active development. Commands, generated source and integrations are evolving, and breaking changes are expected. Commands and source-generation details are documented below.
|
|
5
|
+
|
|
6
|
+
Anhedral CLI scaffolds applications progressively: Next.js on Cloudflare Workers, a Hono API, Drizzle/D1 and Better Auth, then mobile, browser extension and desktop clients, storage, payments, realtime and AI. Each addition writes editable source into your project.
|
|
7
|
+
|
|
8
|
+
<picture>
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="docs/assets/anhedral-stack-light.png">
|
|
10
|
+
<img alt="Progressive scaffold: Next.js, then Hono, then Drizzle/D1 and Better Auth, with optional storage, services, clients and payments." src="docs/assets/anhedral-stack.png" width="1600">
|
|
11
|
+
</picture>
|
|
12
|
+
|
|
13
|
+
## Start a project
|
|
14
|
+
|
|
15
|
+
Start with a Next.js application configured for OpenNext on Cloudflare Workers, with Anhedral UI included as editable source:
|
|
4
16
|
|
|
5
17
|
```sh
|
|
6
18
|
anhedral init my-app
|
|
@@ -8,38 +20,83 @@ cd my-app
|
|
|
8
20
|
pnpm dev
|
|
9
21
|
```
|
|
10
22
|
|
|
11
|
-
|
|
23
|
+
Preview initialization with `anhedral init my-app --dry-run --json`, or use `--skip-install --no-git` to handle dependency installation and Git setup yourself.
|
|
24
|
+
|
|
25
|
+
Init creates `apps/web` plus shared tooling and tokens. It includes three reviewed web starter components (Button, Input and Label), official shadcn configuration and Anhedral UI metadata.
|
|
26
|
+
|
|
27
|
+
## Build the stack progressively
|
|
28
|
+
|
|
29
|
+
Scaffold the API, database, authentication and Expo app as your product grows:
|
|
12
30
|
|
|
13
31
|
```sh
|
|
14
|
-
anhedral
|
|
15
|
-
anhedral
|
|
16
|
-
anhedral ui
|
|
17
|
-
anhedral ui add card --web
|
|
18
|
-
anhedral ui diff card --web
|
|
19
|
-
anhedral ui doctor --web
|
|
32
|
+
anhedral add hono
|
|
33
|
+
anhedral add database-auth
|
|
34
|
+
anhedral add expo native-ui
|
|
20
35
|
```
|
|
21
36
|
|
|
22
|
-
|
|
37
|
+
Or add that complete foundation to a newly initialized project in one step:
|
|
23
38
|
|
|
24
|
-
|
|
39
|
+
```sh
|
|
40
|
+
anhedral add expo native-ui --with-dependencies
|
|
41
|
+
```
|
|
25
42
|
|
|
26
|
-
|
|
43
|
+
Explore additional capabilities and preview their generated source:
|
|
27
44
|
|
|
28
45
|
```sh
|
|
29
46
|
anhedral stack list
|
|
30
|
-
anhedral add hono
|
|
31
|
-
anhedral add database-auth
|
|
32
|
-
anhedral add expo native-ui --dry-run --json
|
|
33
47
|
anhedral add side-panel --with-dependencies --dry-run --json
|
|
34
48
|
```
|
|
35
49
|
|
|
36
|
-
The
|
|
50
|
+
The core progression is **Next.js → Hono → Drizzle/D1 + Better Auth**. After that, choose the capabilities your application needs:
|
|
51
|
+
|
|
52
|
+
| Add | Scaffolded source and configuration | Requires |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| `hono` | Hono API Worker, health route and web/API connection | Next.js foundation |
|
|
55
|
+
| `database-auth` | Drizzle schema and migrations, D1 binding, Better Auth and sign-in starter | `hono` |
|
|
56
|
+
| `r2` | Private R2 binding and authenticated, owner-scoped file routes | `database-auth` |
|
|
57
|
+
| `stripe` | Stripe subscription Checkout, signed webhooks and server-side access checks | `database-auth` |
|
|
58
|
+
| `realtime` | Durable events and resumable server-sent event streams | `database-auth` |
|
|
59
|
+
| `rtc` | Cloudflare Realtime SFU session and track API adapter | `database-auth` |
|
|
60
|
+
| `ai` | Workers AI text-generation route, authentication and daily quota | `database-auth` |
|
|
61
|
+
| `expo` | Expo iOS/Android app with Better Auth and SecureStore session integration | `database-auth` |
|
|
62
|
+
| `native-ui` | NativeWind 4, shared theme styling and RNR Button/Text starter for Expo | `expo` |
|
|
63
|
+
| `revenuecat` | Mobile subscription SDK/UI, webhooks and server-side entitlement reconciliation | `expo`, `stripe` |
|
|
64
|
+
| `wxt`, with optional `side-panel` | WXT browser extension; `side-panel` adds Chrome Side Panel API support to render the extension in the browser side panel | `wxt` requires `database-auth`; `side-panel` requires `wxt` |
|
|
65
|
+
| `gpui` | Rust/GPUI native desktop application and build scripts | `database-auth` |
|
|
66
|
+
|
|
67
|
+
Include prerequisites explicitly or use `--with-dependencies` to add them in order. These dependencies define the Anhedral scaffold's composition rules. Additions preserve edited application source.
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
anhedral add r2 stripe realtime rtc ai
|
|
71
|
+
anhedral add revenuecat --with-dependencies
|
|
72
|
+
anhedral add wxt side-panel --with-dependencies
|
|
73
|
+
anhedral add gpui --with-dependencies
|
|
74
|
+
anhedral stack status
|
|
75
|
+
anhedral stack doctor
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The CLI generates application source, bindings, configuration examples and migration tooling. Complete service activation with resource provisioning, credentials, reviewed migrations and runtime validation, then deploy the server applications and build/distribute the selected clients. Better Auth methods become usable after you explicitly enable and configure them. The [capability guide](docs/capabilities.md) covers setup and acceptance for each addition. `stack status` and `stack doctor` report the installed source and its completeness.
|
|
79
|
+
|
|
80
|
+
## Anhedral UI
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
anhedral ui list
|
|
84
|
+
anhedral ui add card --web
|
|
85
|
+
anhedral ui diff card --web
|
|
86
|
+
anhedral ui doctor --web
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Anhedral UI is a small catalog and CLI over official shadcn on web and React Native Reusables on native. Components are copied into your application. Native resolution prefers a reviewed Anhedral extension when one exists, then RNR; unsupported components are reported. You own and customize the installed source.
|
|
90
|
+
|
|
91
|
+
For an existing Expo app, complete the upstream React Native Reusables NativeWind 4 setup first, then use `anhedral ui init --native`. Ambiguous workspaces require `--web`, `--native`, `--all` or an application-specific `--cwd`.
|
|
92
|
+
|
|
93
|
+
Install additional components as needed with `anhedral ui add`. Use `ui list` to explore availability, `ui diff` to review changes and `ui doctor` to check setup. Shared theme tokens connect the web and native design language while each platform receives its own component source.
|
|
37
94
|
|
|
38
|
-
|
|
95
|
+
## Documentation
|
|
39
96
|
|
|
40
|
-
|
|
97
|
+
See [stack standard](docs/stack-standard.md), [workflow](docs/software-factory.md), [UI commands](docs/ui.md) and [stack additions](docs/capabilities.md).
|
|
41
98
|
|
|
42
|
-
|
|
99
|
+
## Develop the CLI
|
|
43
100
|
|
|
44
101
|
For source development, run `pnpm install --frozen-lockfile && pnpm build`, then `node dist/bin.js init my-app`.
|
|
45
102
|
|
package/assets/ui/UPSTREAM.json
CHANGED
|
@@ -10,30 +10,13 @@
|
|
|
10
10
|
"source": "https://ui.shadcn.com/r/styles/base-nova/input.json",
|
|
11
11
|
"sha256": "b4d1fa668ce203a2d78af7eb23e3769de303d46c983e3e40bed7018423efccb2"
|
|
12
12
|
},
|
|
13
|
-
"card": {
|
|
14
|
-
"source": "https://ui.shadcn.com/r/styles/base-nova/card.json",
|
|
15
|
-
"sha256": "a3b2cb98311bb9ce9475b6cf07d28b9a8eaac282ea6ff51ea77d1d3516947e54"
|
|
16
|
-
},
|
|
17
13
|
"label": {
|
|
18
14
|
"source": "https://ui.shadcn.com/r/styles/base-nova/label.json",
|
|
19
15
|
"sha256": "ef2ca2ddbd0eb67f3a0f59ee5d970c213172a8edc7bb2b28c9d69020bc6ba950"
|
|
20
|
-
},
|
|
21
|
-
"dialog": {
|
|
22
|
-
"source": "https://ui.shadcn.com/r/styles/base-nova/dialog.json",
|
|
23
|
-
"sha256": "ace3d5ba732f66e14bd1062306f9022a32040f7c168a697ebb483b4e80cbd7fd"
|
|
24
16
|
}
|
|
25
17
|
},
|
|
26
18
|
"adaptations": [
|
|
27
19
|
"The Base Nova web Button uses the local cn utility, an explicit React client boundary and a public variant export.",
|
|
28
|
-
"Native components are Anhedral-maintained React Native ports, isolated from DOM components and without React Native Reusables.",
|
|
29
|
-
"Native themes derive their colors from the generated shared semantic tokens; no separate native palette is installed.",
|
|
30
|
-
"Native Dialog restores focus to its actionable trigger on both iOS dismissal and Android close transitions.",
|
|
31
20
|
"Recovered Input and Label use the local cn utility; Input delegates keyboard focus styling to the existing shared global focus rule."
|
|
32
|
-
]
|
|
33
|
-
"native": {
|
|
34
|
-
"catalog": "native/registry.json",
|
|
35
|
-
"baseline": "https://ui.shadcn.com/docs/components",
|
|
36
|
-
"retrieved": "2026-10-24",
|
|
37
|
-
"implementation": "Anhedral-owned React Native semantic adaptations. Native APIs replace browser-only DOM and interaction APIs; device acceptance is tracked separately."
|
|
38
|
-
}
|
|
21
|
+
]
|
|
39
22
|
}
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare function createSetupPlan(options: StandardOptions, registry?: imp
|
|
|
4
4
|
cliVersion: string;
|
|
5
5
|
root: string;
|
|
6
6
|
name: string;
|
|
7
|
-
products: ("hono" | "
|
|
7
|
+
products: ("hono" | "r2" | "next" | "styling" | "d1")[];
|
|
8
8
|
dryRun: boolean;
|
|
9
9
|
registry: import("./registry/resolve.js").ResolvedStackRegistry;
|
|
10
10
|
resourcesProvisioned: boolean;
|
package/dist/dependencies.d.ts
CHANGED
|
@@ -2,10 +2,7 @@ export interface DependencyGroup {
|
|
|
2
2
|
dependencies?: Record<string, string>;
|
|
3
3
|
devDependencies?: Record<string, string>;
|
|
4
4
|
}
|
|
5
|
-
export declare const NATIVE_ESLINT_VERSION = "10.0.3";
|
|
6
|
-
export declare const MOBILE_APP_DEPENDENCIES: DependencyGroup;
|
|
7
5
|
export declare const WEB_DEPENDENCIES: DependencyGroup;
|
|
8
|
-
export declare const NATIVE_UI_DEPENDENCIES: DependencyGroup;
|
|
9
6
|
export declare const OPENNEXT_GLOB_VERSION = "10.5.0";
|
|
10
7
|
export declare const WORKSPACE_NODE_ENGINE = "^22.13.0 || >=24.0.0";
|
|
11
8
|
export declare const PACKAGE_MANAGER = "pnpm@10.34.5";
|
package/dist/dependencies.js
CHANGED
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
// renovate: datasource=npm depName=eslint
|
|
2
|
-
export const NATIVE_ESLINT_VERSION = '10.0.3';
|
|
3
|
-
export const MOBILE_APP_DEPENDENCIES = {
|
|
4
|
-
dependencies: {
|
|
5
|
-
// renovate: datasource=npm depName=expo
|
|
6
|
-
expo: '57.0.8',
|
|
7
|
-
// renovate: datasource=npm depName=expo-dev-client
|
|
8
|
-
'expo-dev-client': '57.0.20',
|
|
9
|
-
// renovate: datasource=npm depName=expo-linking
|
|
10
|
-
'expo-linking': '57.0.4',
|
|
11
|
-
// renovate: datasource=npm depName=expo-router
|
|
12
|
-
'expo-router': '57.0.8',
|
|
13
|
-
// renovate: datasource=npm depName=expo-status-bar
|
|
14
|
-
'expo-status-bar': '57.0.1',
|
|
15
|
-
// renovate: datasource=npm depName=react
|
|
16
|
-
react: '19.2.3',
|
|
17
|
-
// renovate: datasource=npm depName=react-native
|
|
18
|
-
'react-native': '0.86.0',
|
|
19
|
-
// renovate: datasource=npm depName=react-native-reanimated
|
|
20
|
-
'react-native-reanimated': '4.5.0',
|
|
21
|
-
// renovate: datasource=npm depName=react-native-safe-area-context
|
|
22
|
-
'react-native-safe-area-context': '5.7.0',
|
|
23
|
-
// renovate: datasource=npm depName=react-native-screens
|
|
24
|
-
'react-native-screens': '4.26.2',
|
|
25
|
-
// renovate: datasource=npm depName=react-native-worklets
|
|
26
|
-
'react-native-worklets': '0.10.0',
|
|
27
|
-
},
|
|
28
|
-
devDependencies: {
|
|
29
|
-
// renovate: datasource=npm depName=@babel/core
|
|
30
|
-
'@babel/core': '7.29.7',
|
|
31
|
-
// renovate: datasource=npm depName=babel-preset-expo
|
|
32
|
-
'babel-preset-expo': '57.0.14',
|
|
33
|
-
// renovate: datasource=npm depName=@testing-library/dom
|
|
34
|
-
'@testing-library/dom': '10.4.1',
|
|
35
|
-
// renovate: datasource=npm depName=@react-native/metro-config
|
|
36
|
-
'@react-native/metro-config': '0.86.0',
|
|
37
|
-
// renovate: datasource=npm depName=@types/react
|
|
38
|
-
'@types/react': '19.2.10',
|
|
39
|
-
// renovate: datasource=npm depName=typescript
|
|
40
|
-
typescript: '6.0.3',
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
1
|
export const WEB_DEPENDENCIES = {
|
|
44
2
|
dependencies: {
|
|
45
3
|
// renovate: datasource=npm depName=next
|
|
@@ -82,18 +40,6 @@ export const WEB_DEPENDENCIES = {
|
|
|
82
40
|
wrangler: '4.151.0',
|
|
83
41
|
},
|
|
84
42
|
};
|
|
85
|
-
export const NATIVE_UI_DEPENDENCIES = {
|
|
86
|
-
dependencies: {
|
|
87
|
-
// renovate: datasource=npm depName=react-native-svg
|
|
88
|
-
'react-native-svg': '15.15.4',
|
|
89
|
-
// renovate: datasource=npm depName=expo-clipboard
|
|
90
|
-
'expo-clipboard': '57.0.2',
|
|
91
|
-
// renovate: datasource=npm depName=@react-native-async-storage/async-storage
|
|
92
|
-
'@react-native-async-storage/async-storage': '2.2.0',
|
|
93
|
-
// renovate: datasource=npm depName=expo-system-ui
|
|
94
|
-
'expo-system-ui': '57.0.3',
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
43
|
// renovate: datasource=npm depName=glob
|
|
98
44
|
export const OPENNEXT_GLOB_VERSION = '10.5.0';
|
|
99
45
|
export const WORKSPACE_NODE_ENGINE = '^22.13.0 || >=24.0.0';
|
package/dist/registry/resolve.js
CHANGED
|
@@ -15,6 +15,8 @@ export function resolveStandardProducts(selected, hosting) {
|
|
|
15
15
|
export function resolveStackRegistry(options) {
|
|
16
16
|
if (options.hosting !== 'cloudflare')
|
|
17
17
|
throw new Error('Anhedral applications use Cloudflare Workers.');
|
|
18
|
+
if (options.products.includes('expo'))
|
|
19
|
+
throw new Error('Legacy Expo source composition is retired. Use anhedral add expo, then anhedral add native-ui. Existing applications are not changed.');
|
|
18
20
|
for (const id of options.products)
|
|
19
21
|
if (!STANDARD_PRODUCTS.includes(id))
|
|
20
22
|
throw new Error(`Unknown stack product: ${id}.`);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { capabilityReferences } from '../capability-references.js';
|
|
2
2
|
import { put } from './files.js';
|
|
3
3
|
export function writeSetupDocumentation(root, options) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
put(root, 'README.md', `# ${options.name}
|
|
4
|
+
for (const [file, source] of Object.entries(capabilityReferences()))
|
|
5
|
+
put(root, file, source);
|
|
6
|
+
put(root, 'README.md', `# ${options.name}
|
|
8
7
|
|
|
9
8
|
Next.js on Cloudflare Workers through OpenNext, with Anhedral UI from the start.
|
|
10
|
-
Init
|
|
9
|
+
Init starts with apps/web. Review anhedral.json for explicitly composed API/data source.
|
|
10
|
+
Use anhedral stack status to inspect later source additions.
|
|
11
11
|
No providers are provisioned by source generation.
|
|
12
12
|
|
|
13
13
|
## Develop
|
|
@@ -42,8 +42,14 @@ to review changes, then apply them. Missing parents require explicit selection o
|
|
|
42
42
|
source-protection contract. No provision or deployment command is implemented here.
|
|
43
43
|
Consumers own integrations, deployment and application distribution. Run pnpm check
|
|
44
44
|
and review your changes before deployment. Builds/startup never migrate databases.
|
|
45
|
+
|
|
46
|
+
Hono owns privileged API operations when selected. Clients and Next server actions
|
|
47
|
+
call the API; applications never import one another's source. Keep database and
|
|
48
|
+
storage credentials server-side. Implement identity, authorization and ownership
|
|
49
|
+
checks before exposing data or files; private storage is not user authorization.
|
|
50
|
+
Review generated SQL and apply migrations explicitly through the selected database tooling.
|
|
45
51
|
`);
|
|
46
|
-
|
|
52
|
+
put(root, 'AGENTS.md', `# Minimal application foundation
|
|
47
53
|
|
|
48
54
|
Start with Next.js/OpenNext/Workers and source-owned Anhedral UI. Do not add an API,
|
|
49
55
|
database, authentication, R2 or native client without a concrete feature need.
|
|
@@ -56,47 +62,10 @@ UI requires its application platform, not Hono or a database. Share tokens, not
|
|
|
56
62
|
DOM/native primitives. Preserve consumer edits, attribution and upstream metadata.
|
|
57
63
|
Never automatically overwrite installed components. Read version-matched framework
|
|
58
64
|
guides and run pnpm check. Never migrate a configured database during checks/builds.
|
|
65
|
+
Hono owns privileged operations when present. Clients call its API; applications
|
|
66
|
+
must not import another application's source. Keep database/storage secrets on
|
|
67
|
+
the server and implement authorization before exposing private data or files.
|
|
59
68
|
`);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
put(root, 'README.md', `# ${options.name}
|
|
65
|
-
|
|
66
|
-
Next.js App Router/OpenNext + Expo native + shadcn UI + Hono/workerd + Drizzle/D1 + private R2.
|
|
67
|
-
|
|
68
|
-
## Develop locally
|
|
69
|
-
|
|
70
|
-
Use the Node and pnpm versions in package.json. Run pnpm install if generation used --skip-install. Run pnpm dev and open the web URL printed by Next (normally http://localhost:3000). Hono runs on http://127.0.0.1:8787; web /api/health proxies to it. No accounts or secrets are needed for the starter health flow.
|
|
71
|
-
|
|
72
|
-
Start native separately with pnpm --dir apps/mobile start. Copy apps/mobile/.env.example to apps/mobile/.env and set EXPO_PUBLIC_API_URL to the API origin reachable from the device. Local HTTP is development-only; use HTTPS outside development.
|
|
73
|
-
|
|
74
|
-
## UI and device capabilities
|
|
75
|
-
|
|
76
|
-
Web uses DOM shadcn; native uses editable source in packages/native-ui. Share tokens through packages/styling. The shadcn fork is an upstream review source, not an application runtime dependency. Review copied provenance and licenses; adopt later UI changes explicitly without overwriting your edits.
|
|
77
|
-
|
|
78
|
-
Use Expo SDK packages directly for application capabilities. UI components may compose them for presentation, such as a Copy button using Expo Clipboard; application permissions, background work, uploads and push registration belong to your application. Keep the tested Expo/React Native/React runtime consistent with native-ui peers. Add packages as needed from apps/mobile with pnpm expo install <package>, checking platform support and native configuration. Rebuild the development client after native dependency/configuration changes. Validate web separately from Android/iOS; use physical devices for device-only capabilities.
|
|
79
|
-
|
|
80
|
-
## Data and private storage
|
|
81
|
-
|
|
82
|
-
Add tables in packages/db/src/schema.ts. Run pnpm db:generate, review SQL, then explicitly run pnpm db:migrate (local by default). Builds and startup do not migrate databases. Configure real D1 and private R2 identities in apps/api/wrangler.jsonc for your own deployment. Never enable public bucket access or put service credentials in clients.
|
|
83
|
-
|
|
84
|
-
apps/api/src/private-storage.ts is a server-side helper; it exposes no file routes. Implement your application's identity, authorization, ownership and limits before exposing database or object APIs.
|
|
85
|
-
|
|
86
|
-
## Your application
|
|
87
|
-
|
|
88
|
-
You own development, authentication, email, payments and hosting. Add Stripe or RevenueCat yourself if needed. This scaffold has no Platform account, managed provider connection or production activation. Generated configuration and scripts are yours to change. See docs/stack.md and run pnpm check before reviewing changes.
|
|
89
|
-
`);
|
|
90
|
-
put(root, 'AGENTS.md', `# Application foundation
|
|
91
|
-
|
|
92
|
-
Use Next.js App Router/OpenNext for web, Expo for native, DOM shadcn and the Anhedral native shadcn port, Hono on Workers/workerd, Drizzle/D1 and private R2. Shared contracts belong in packages/contracts, native components in packages/native-ui, tokens in packages/styling, and server schema/migrations in packages/db.
|
|
93
|
-
|
|
94
|
-
Hono owns privileged operations. Clients and Next server actions call the API; apps never import one another's source. Keep database/storage credentials server-side. The starter has no authentication, payment integration or public file APIs. Implement identity and authorization before exposing private data. A private bucket is not user authorization.
|
|
95
|
-
|
|
96
|
-
Keep DOM shadcn and native UI implementations separate, sharing tokens and contracts. Import editable application-local UI source; preserve its provenance, licenses and consumer edits during explicit updates. Use Expo SDK APIs directly for feature capabilities, adding UI adapters only for meaningful presentation or interaction. Keep permission policy and background/provider behavior in application services. The mobile app owns the tested Expo/React Native/React runtime; native-ui peers must match it. Add only needed SDK packages using Expo's compatible installer from apps/mobile and inspect platform support/autolinking/config plugins. Rebuild development clients for native changes and verify Android/iOS behavior separately from browser rendering. Consider @expo/ui controls selectively; do not replace the native port wholesale.
|
|
97
|
-
|
|
98
|
-
Use pnpm dev for web/API and pnpm --dir apps/mobile start for native. Read version-matched framework documentation. Run pnpm check and exercise changed flows. Review generated SQL and apply migrations explicitly; never migrate a configured remote database during tests, build or startup. Consumers own integration and hosting decisions. Preserve existing source; never reinitialize over an application.
|
|
99
|
-
`);
|
|
100
|
-
put(root, 'docs/architecture.md', '# Architecture\n\nNext.js / Expo → Hono → Drizzle/D1 and private R2. Record application-owned identity, access rules and integrations here.\n');
|
|
101
|
-
put(root, 'docs/verification.md', '# Verification\n\nRecord commands, outcomes and environment. Generated source is not production acceptance.\n');
|
|
69
|
+
put(root, 'docs/architecture.md', '# Architecture\n\nNext.js → OpenNext → Cloudflare Workers, with Anhedral UI. Record feature-driven additions here.\n');
|
|
70
|
+
put(root, 'docs/verification.md', '# Verification\n\nRecord commands, outcomes and environment. Source generation is not deployment acceptance.\n');
|
|
102
71
|
}
|
|
@@ -42,10 +42,6 @@ if (result.error) throw result.error;
|
|
|
42
42
|
process.exitCode = result.status ?? 1;
|
|
43
43
|
`);
|
|
44
44
|
json(root, '.fallowrc.json', {
|
|
45
|
-
publicPackages: options.products.includes('expo') ? ['@workspace/native-ui'] : [],
|
|
46
|
-
ignoreDependencies: options.products.includes('expo')
|
|
47
|
-
? ['react-native-reanimated', 'react-native-worklets']
|
|
48
|
-
: [],
|
|
49
45
|
ignorePatterns: [
|
|
50
46
|
'scripts/audit.mjs',
|
|
51
47
|
'scripts/audit-deps.mjs',
|
|
@@ -90,8 +86,6 @@ process.exitCode = result.status ?? 1;
|
|
|
90
86
|
// OpenNext's node-minify dependency pins the vulnerable glob CLI.
|
|
91
87
|
overrides: {
|
|
92
88
|
'@node-minify/core>glob': OPENNEXT_GLOB_VERSION,
|
|
93
|
-
// Expo CLI's two schema consumers use APIs supported by the patched Zod release.
|
|
94
|
-
...(options.products.includes('expo') ? { '@expo/cli>zod': STACK_DEPENDENCIES.zod } : {}),
|
|
95
89
|
'miniflare>undici': STACK_DEPENDENCIES.undici,
|
|
96
90
|
},
|
|
97
91
|
sharedWorkspaceLockfile: true,
|
package/dist/stack-registry.d.ts
CHANGED
|
@@ -2,17 +2,15 @@ import type { ItemDefinition, StackRegistryItem, RecipeContext } from './registr
|
|
|
2
2
|
/** Every product owns its source recipe, setup requirements and composition policy here. */
|
|
3
3
|
declare const PRODUCT_ITEMS: {
|
|
4
4
|
next: ItemDefinition;
|
|
5
|
-
expo: ItemDefinition;
|
|
6
5
|
hono: ItemDefinition;
|
|
7
6
|
d1: ItemDefinition;
|
|
8
7
|
r2: ItemDefinition;
|
|
9
8
|
styling: ItemDefinition;
|
|
10
9
|
};
|
|
11
10
|
export type StandardProduct = keyof typeof PRODUCT_ITEMS;
|
|
12
|
-
export declare const STANDARD_PRODUCTS: readonly ("hono" | "
|
|
11
|
+
export declare const STANDARD_PRODUCTS: readonly ("hono" | "r2" | "next" | "styling" | "d1")[];
|
|
13
12
|
declare const DEFINITIONS: {
|
|
14
13
|
next: ItemDefinition;
|
|
15
|
-
expo: ItemDefinition;
|
|
16
14
|
hono: ItemDefinition;
|
|
17
15
|
d1: ItemDefinition;
|
|
18
16
|
r2: ItemDefinition;
|
|
@@ -24,7 +22,7 @@ declare const DEFINITIONS: {
|
|
|
24
22
|
export type StackItemId = keyof typeof DEFINITIONS;
|
|
25
23
|
export declare function getStackDefinition(name: string): ItemDefinition;
|
|
26
24
|
export declare function getStackItem(name: string): StackRegistryItem;
|
|
27
|
-
export declare const STACK_ITEMS: Record<"hono" | "
|
|
25
|
+
export declare const STACK_ITEMS: Record<"hono" | "r2" | "next" | "eslint" | "typescript" | "workspace" | "styling" | "d1", StackRegistryItem>;
|
|
28
26
|
export declare const STACK_REGISTRY: {
|
|
29
27
|
schemaVersion: number;
|
|
30
28
|
name: string;
|
package/dist/stack-registry.js
CHANGED
|
@@ -5,7 +5,6 @@ import { GENERATOR_VERSION } from './version.js';
|
|
|
5
5
|
import { scaffoldApi } from './scaffold/api.js';
|
|
6
6
|
import { scaffoldDatabase } from './scaffold/database.js';
|
|
7
7
|
import { scaffoldWeb } from './platforms/web.js';
|
|
8
|
-
import { scaffoldExpo } from './platforms/mobile.js';
|
|
9
8
|
import { scaffoldPrivateStorage } from './scaffold/storage.js';
|
|
10
9
|
import { sharedPackage } from './scaffold/files.js';
|
|
11
10
|
function requirements(purpose, tools, access, credentials, resources, verify) {
|
|
@@ -39,15 +38,6 @@ const PRODUCT_ITEMS = defineItems({
|
|
|
39
38
|
install: scaffoldWeb,
|
|
40
39
|
environment: ['ANHEDRAL_PREVIEW_ORIGIN'],
|
|
41
40
|
},
|
|
42
|
-
expo: {
|
|
43
|
-
type: 'application',
|
|
44
|
-
description: 'Native Expo iOS and Android application with Anhedral native shadcn UI',
|
|
45
|
-
targets: ['apps/mobile', 'packages/native-ui'],
|
|
46
|
-
registryDependencies: ['workspace', 'typescript', 'eslint', 'styling'],
|
|
47
|
-
setup: requirements('Native iOS and Android application', ['Simulator or device'], ['For requested native distribution only: client-owned Apple/Google developer accounts'], ['For requested native builds only: platform signing credentials and EAS access when used'], ['Expo native client; signing and store configuration'], ['Simulator/device and signed-build acceptance']),
|
|
48
|
-
install: scaffoldExpo,
|
|
49
|
-
environment: ['EXPO_PUBLIC_API_URL'],
|
|
50
|
-
},
|
|
51
41
|
hono: {
|
|
52
42
|
type: 'application',
|
|
53
43
|
description: 'Shared Hono OpenAPI Worker',
|
|
@@ -95,7 +85,7 @@ const PRODUCT_ITEMS = defineItems({
|
|
|
95
85
|
description: 'Shared platform-independent styling tokens',
|
|
96
86
|
targets: ['packages/styling'],
|
|
97
87
|
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
98
|
-
setup: requirements('Shared styling definitions', [], [], [], ['Shared light/dark tokens, web CSS and
|
|
88
|
+
setup: requirements('Shared styling definitions', [], [], [], ['Shared light/dark tokens, web CSS and optional RNR/NativeWind source'], ['Consistency across selected interfaces; preserve platform-specific components']),
|
|
99
89
|
package: packageSource('styling', `import { light, dark, spacing } from './tokens.cjs';
|
|
100
90
|
|
|
101
91
|
export const styling = {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GENERATOR_VERSION = "0.
|
|
1
|
+
export declare const GENERATOR_VERSION = "0.17.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const GENERATOR_VERSION = '0.
|
|
1
|
+
export const GENERATOR_VERSION = '0.17.0';
|
package/docs/anhedral-stack.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Stack diagram
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The [README](https://github.com/anhedral/anhedral-cli#readme) shows the complete
|
|
4
|
+
progressive scaffold. [Stack standard](stack-standard.md) owns architecture and
|
|
5
|
+
[capabilities](capabilities.md) owns composition and acceptance.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
Regenerate the 1920 × 1080 light/dark SVGs with
|
|
8
|
+
`node docs/assets/render-stack.mjs`; add `--png` to export the README PNGs. This
|
|
9
|
+
uses checked-in vendor logo data offline. Supply `sharp` through the checkout or
|
|
10
|
+
`DOCS_NODE_MODULES`. Commit both themes/formats together. Keep vendor attribution
|
|
11
|
+
and the website's neutral theme adaptations when refreshing its shared layout.
|
|
12
|
+
The CLI README retains its navy artwork.
|
|
Binary file
|
|
Binary file
|
package/docs/capabilities.md
CHANGED
|
@@ -107,4 +107,4 @@ GPUI uses the upstream `runtime_shaders` feature, without a vendored fork or web
|
|
|
107
107
|
|
|
108
108
|
## Repository acceptance fixture
|
|
109
109
|
|
|
110
|
-
After generating/installing a local consumer under this CLI checkout's `.artifacts/`, mark it with `.anhedral-fixture.json` containing `{"fixture":true}` and run `node tests/test-capability-runtime.mjs <fixture-directory>`. The fixture must include R2, Stripe, RevenueCat, events, RTC and AI source. This test refuses other paths, applies SQL only to isolated Miniflare D1, blocks unexpected outbound requests, and restores its temporary auth-method opt-in. Its billing providers are local read-only fixtures. Keep this marker out of deployed application source.
|
|
110
|
+
After generating/installing a local consumer under this CLI checkout's `.artifacts/`, mark it with `.anhedral-fixture.json` containing `{"fixture":true}` and run `node tests/test-capability-runtime.mjs <fixture-directory>`. The fixture must include R2, Stripe, RevenueCat, events, RTC and AI source. This test refuses other paths, applies SQL only to isolated Miniflare D1, blocks unexpected outbound requests, and restores its temporary auth-method opt-in. Its billing providers are local read-only fixtures. Keep this marker out of deployed application source. Keep revision-scoped build results and limitations in the CLI repository’s `docs/agent-notes/`.
|