anhedral 0.4.2 → 0.6.1

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.
Files changed (89) hide show
  1. package/README.md +35 -265
  2. package/assets/anhedral-cli-init-technical.svg +322 -0
  3. package/assets/anhedral-cli-init.svg +257 -173
  4. package/dist/bin.js +28 -191
  5. package/dist/dependencies.d.ts +7 -57
  6. package/dist/dependencies.js +96 -308
  7. package/dist/index.d.ts +2 -7
  8. package/dist/index.js +1 -4
  9. package/dist/platforms/desktop.js +401 -0
  10. package/dist/platforms/extension.js +401 -0
  11. package/dist/platforms/mobile.js +232 -0
  12. package/dist/project.d.ts +0 -26
  13. package/dist/standard-products.d.ts +2 -0
  14. package/dist/standard-products.js +6 -0
  15. package/dist/standard.d.ts +18 -0
  16. package/dist/standard.js +595 -0
  17. package/dist/version.d.ts +1 -1
  18. package/dist/version.js +1 -1
  19. package/docs/application-stack-standard.md +700 -0
  20. package/package.json +29 -51
  21. package/CHANGELOG.md +0 -178
  22. package/CONTRIBUTING.md +0 -77
  23. package/SECURITY.md +0 -37
  24. package/SKILL.md +0 -339
  25. package/assets/images/svg/ably-symbol-color.svg +0 -8
  26. package/bin/anhedral.js +0 -2
  27. package/dist/architecture/contributions.d.ts +0 -28
  28. package/dist/architecture/contributions.js +0 -125
  29. package/dist/architecture/index.d.ts +0 -12
  30. package/dist/architecture/index.js +0 -6
  31. package/dist/architecture/manifest.d.ts +0 -53
  32. package/dist/architecture/manifest.js +0 -283
  33. package/dist/architecture/modules.d.ts +0 -41
  34. package/dist/architecture/modules.js +0 -187
  35. package/dist/architecture/plan.d.ts +0 -58
  36. package/dist/architecture/plan.js +0 -145
  37. package/dist/architecture/templates.d.ts +0 -10
  38. package/dist/architecture/templates.js +0 -23
  39. package/dist/cli.d.ts +0 -32
  40. package/dist/cli.js +0 -281
  41. package/dist/composers/root.d.ts +0 -6
  42. package/dist/composers/root.js +0 -35
  43. package/dist/print.d.ts +0 -8
  44. package/dist/print.js +0 -48
  45. package/dist/prompts.d.ts +0 -6
  46. package/dist/prompts.js +0 -41
  47. package/dist/scaffold.d.ts +0 -64
  48. package/dist/scaffold.js +0 -2102
  49. package/dist/template-source.d.ts +0 -20
  50. package/dist/template-source.js +0 -180
  51. package/dist/templates/api.d.ts +0 -2
  52. package/dist/templates/api.js +0 -3187
  53. package/dist/templates/assets-private-proxy.d.ts +0 -3
  54. package/dist/templates/assets-private-proxy.js +0 -277
  55. package/dist/templates/desktop.js +0 -792
  56. package/dist/templates/electron-updater.d.ts +0 -3
  57. package/dist/templates/electron-updater.js +0 -358
  58. package/dist/templates/extension.js +0 -856
  59. package/dist/templates/first-run.d.ts +0 -2
  60. package/dist/templates/first-run.js +0 -167
  61. package/dist/templates/mobile.js +0 -861
  62. package/dist/templates/shared.d.ts +0 -2
  63. package/dist/templates/shared.js +0 -577
  64. package/dist/templates/web.d.ts +0 -2
  65. package/dist/templates/web.js +0 -569
  66. package/dist/toolchain.d.ts +0 -3
  67. package/dist/toolchain.js +0 -8
  68. package/dist/ui.d.ts +0 -33
  69. package/dist/ui.js +0 -199
  70. package/dist/workspace-config.d.ts +0 -11
  71. package/dist/workspace-config.js +0 -372
  72. package/docs/NORTHSTAR.md +0 -114
  73. package/docs/conventions.md +0 -94
  74. package/docs/engineering-principles.md +0 -88
  75. package/docs/master-stack-map.md +0 -199
  76. package/docs/output-tree-contract.md +0 -493
  77. package/docs/references/manual-scaffolding.md +0 -421
  78. package/docs/references/provisioning.md +0 -577
  79. package/scripts/render-master-stack-map.mjs +0 -510
  80. package/templates/api-fastify/apps/api/tsconfig.json +0 -20
  81. package/templates/catalog.json +0 -23
  82. package/templates/db-drizzle/packages/db/tsconfig.json +0 -14
  83. package/templates/desktop-electron/apps/desktop/tsconfig.json +0 -37
  84. package/templates/extension-wxt/apps/extension/tsconfig.json +0 -41
  85. package/templates/mobile-expo/apps/mobile/expo-env.d.ts +0 -1
  86. package/templates/web-next/apps/web/next-env.d.ts +0 -6
  87. /package/dist/{templates → platforms}/desktop.d.ts +0 -0
  88. /package/dist/{templates → platforms}/extension.d.ts +0 -0
  89. /package/dist/{templates → platforms}/mobile.d.ts +0 -0
@@ -1,493 +0,0 @@
1
- # Generated Output-Tree Contract
2
-
3
- <!-- Generated by tests/update-output-tree-contracts.js. Do not edit by hand. -->
4
-
5
- These source-only trees are generated with the stable toolchain and `--skip-install`.
6
- Each contract records every file or symlink path, Unix mode, byte length, and SHA-256 digest.
7
- Installed dependencies, compiler output, and framework caches are forbidden.
8
- Deterministic provider-placeholder `.env.example` files are hashed by the contract; generated real `.env` files are forbidden.
9
-
10
- Runtime E2E builds use disposable operating-system temp directories and are not part of these golden trees.
11
- A generated project may contain only the root `pnpm-workspace.yaml` and root `pnpm-lock.yaml`; nested pnpm workspace islands are rejected.
12
-
13
- Regenerate after an intentional scaffold change:
14
-
15
- ```sh
16
- pnpm build
17
- node tests/update-output-tree-contracts.js
18
- ```
19
-
20
- ## Scenario summary
21
-
22
- | Scenario | Apps | Features | Contract | Entries | Tree SHA-256 |
23
- | --- | --- | --- | --- | ---: | --- |
24
- | `expo-extension` | web, mobile, api, desktop, extension | database, auth, billing, storage, nativeSubscriptions, electronUpdater | deterministic golden | 150 | `4fcbb6a1bc51387abe3a5f629a6a6f83b4580da668aa00514d24471e50ef652b` |
25
- | `web-api-minimal` | web, api | database, auth | deterministic golden | 67 | `512f2af0a3ef250d43c24400df730488dee50bc81616dd9f58c4f4e3125aed3a` |
26
- | `api-only` | api | | deterministic golden | 33 | `3d4c80296467bb735456fc2e2485889b6583e9daac8934e6c3205a0dc47ad04e` |
27
- | `add-desktop-flow` | api, desktop | database, auth | deterministic golden | 69 | `79e0686d8a0b50f34334b73ffc3c766cbe1a13283a0bc7dfe814c9e7d63cc75c` |
28
-
29
- ## expo-extension
30
-
31
- All app surfaces and feature modules
32
-
33
- ```text
34
- expo-extension-sample/
35
- ├── .env.example
36
- ├── .github/
37
- │ └── workflows/
38
- │ └── anhedral-ci.yml
39
- ├── .gitignore
40
- ├── .vercelignore
41
- ├── ANHEDRAL.md
42
- ├── PRODUCTION.md
43
- ├── README.md
44
- ├── SKILL.md
45
- ├── anhedral.json
46
- ├── apps/
47
- │ ├── api/
48
- │ │ ├── .env.example
49
- │ │ ├── .gitignore
50
- │ │ ├── package.json
51
- │ │ ├── src/
52
- │ │ │ ├── application.ts
53
- │ │ │ ├── auth.ts
54
- │ │ │ ├── billing.ts
55
- │ │ │ ├── env.ts
56
- │ │ │ ├── index.ts
57
- │ │ │ ├── realtime.ts
58
- │ │ │ ├── routes/
59
- │ │ │ │ └── app.ts
60
- │ │ │ ├── routes.ts
61
- │ │ │ └── storage.ts
62
- │ │ ├── tests/
63
- │ │ │ ├── env.test.ts
64
- │ │ │ ├── health.test.ts
65
- │ │ │ ├── revenuecat-webhook.test.ts
66
- │ │ │ └── storage.test.ts
67
- │ │ ├── tsconfig.json
68
- │ │ └── vitest.config.ts
69
- │ ├── assets-private-proxy/
70
- │ │ ├── package.json
71
- │ │ ├── src/
72
- │ │ │ └── index.js
73
- │ │ └── wrangler.jsonc
74
- │ ├── desktop/
75
- │ │ ├── .env.example
76
- │ │ ├── components.json
77
- │ │ ├── electron-builder.env.example
78
- │ │ ├── index.html
79
- │ │ ├── package.json
80
- │ │ ├── postcss.config.mjs
81
- │ │ ├── scripts/
82
- │ │ │ ├── dev.mjs
83
- │ │ │ └── publish-updates.mjs
84
- │ │ ├── src/
85
- │ │ │ ├── main/
86
- │ │ │ │ ├── app-window.ts
87
- │ │ │ │ ├── main.ts
88
- │ │ │ │ └── preload.cts
89
- │ │ │ └── renderer/
90
- │ │ │ ├── components/
91
- │ │ │ │ ├── item-list.tsx
92
- │ │ │ │ └── ui/
93
- │ │ │ │ └── button.tsx
94
- │ │ │ ├── hooks/
95
- │ │ │ │ └── use-entitlement.ts
96
- │ │ │ ├── lib/
97
- │ │ │ │ ├── api.ts
98
- │ │ │ │ ├── auth.ts
99
- │ │ │ │ └── utils.ts
100
- │ │ │ ├── main.tsx
101
- │ │ │ └── styles.css
102
- │ │ ├── tsconfig.json
103
- │ │ ├── tsconfig.main.json
104
- │ │ └── vite.config.ts
105
- │ ├── desktop-updater-worker/
106
- │ │ ├── package.json
107
- │ │ ├── src/
108
- │ │ │ └── index.js
109
- │ │ ├── tests/
110
- │ │ │ └── worker.test.js
111
- │ │ └── wrangler.jsonc
112
- │ ├── extension/
113
- │ │ ├── .env.example
114
- │ │ ├── README.md
115
- │ │ ├── components.json
116
- │ │ ├── package.json
117
- │ │ ├── postcss.config.cjs
118
- │ │ ├── src/
119
- │ │ │ ├── components/
120
- │ │ │ │ ├── item-list.tsx
121
- │ │ │ │ └── ui/
122
- │ │ │ │ └── button.tsx
123
- │ │ │ ├── contexts/
124
- │ │ │ │ └── auth-context.tsx
125
- │ │ │ ├── entrypoints/
126
- │ │ │ │ ├── background.ts
127
- │ │ │ │ └── sidepanel/
128
- │ │ │ │ ├── app.tsx
129
- │ │ │ │ ├── index.html
130
- │ │ │ │ └── main.tsx
131
- │ │ │ ├── hooks/
132
- │ │ │ │ └── use-entitlement.ts
133
- │ │ │ ├── lib/
134
- │ │ │ │ ├── api.ts
135
- │ │ │ │ └── utils.ts
136
- │ │ │ └── styles/
137
- │ │ │ └── main.css
138
- │ │ ├── tailwind.config.cjs
139
- │ │ ├── tsconfig.json
140
- │ │ └── wxt.config.ts
141
- │ ├── mobile/
142
- │ │ ├── .env.example
143
- │ │ ├── .gitignore
144
- │ │ ├── app/
145
- │ │ │ ├── _layout.tsx
146
- │ │ │ └── index.tsx
147
- │ │ ├── app.json
148
- │ │ ├── babel.config.js
149
- │ │ ├── components/
150
- │ │ │ ├── account-controls.tsx
151
- │ │ │ └── item-list.tsx
152
- │ │ ├── components.json
153
- │ │ ├── eas.json
154
- │ │ ├── expo-env.d.ts
155
- │ │ ├── global.css
156
- │ │ ├── hooks/
157
- │ │ │ ├── use-api-client.ts
158
- │ │ │ └── use-entitlement.ts
159
- │ │ ├── lib/
160
- │ │ │ ├── api.ts
161
- │ │ │ ├── subscriptions.ts
162
- │ │ │ └── utils.ts
163
- │ │ ├── metro.config.js
164
- │ │ ├── nativewind-env.d.ts
165
- │ │ ├── package.json
166
- │ │ ├── tailwind.config.js
167
- │ │ └── tsconfig.json
168
- │ └── web/
169
- │ ├── .env.example
170
- │ ├── app/
171
- │ │ ├── globals.css
172
- │ │ ├── layout.tsx
173
- │ │ └── page.tsx
174
- │ ├── components/
175
- │ │ ├── account-actions.tsx
176
- │ │ ├── item-list.tsx
177
- │ │ ├── subscription-status.tsx
178
- │ │ └── ui/
179
- │ │ ├── button.tsx
180
- │ │ └── card.tsx
181
- │ ├── components.json
182
- │ ├── hooks/
183
- │ │ ├── use-api-client.ts
184
- │ │ └── use-entitlement.ts
185
- │ ├── lib/
186
- │ │ ├── api.ts
187
- │ │ └── utils.ts
188
- │ ├── next-env.d.ts
189
- │ ├── next.config.ts
190
- │ ├── package.json
191
- │ ├── postcss.config.mjs
192
- │ └── tsconfig.json
193
- ├── cloudflare/
194
- │ ├── README.md
195
- │ ├── desktop-updates.md
196
- │ └── r2-cors.template.json
197
- ├── docs/
198
- │ ├── DEVELOPMENT.md
199
- │ └── STACK.md
200
- ├── package.json
201
- ├── packages/
202
- │ ├── api-client/
203
- │ │ ├── package.json
204
- │ │ ├── src/
205
- │ │ │ ├── app.ts
206
- │ │ │ ├── generated.ts
207
- │ │ │ └── index.ts
208
- │ │ └── tsconfig.json
209
- │ ├── contracts/
210
- │ │ ├── package.json
211
- │ │ ├── src/
212
- │ │ │ ├── app.ts
213
- │ │ │ ├── generated.ts
214
- │ │ │ └── index.ts
215
- │ │ └── tsconfig.json
216
- │ ├── db/
217
- │ │ ├── .env.example
218
- │ │ ├── drizzle.config.ts
219
- │ │ ├── migrations/
220
- │ │ │ └── .gitkeep
221
- │ │ ├── package.json
222
- │ │ ├── src/
223
- │ │ │ ├── app-schema.ts
224
- │ │ │ ├── generated-schema.ts
225
- │ │ │ ├── index.ts
226
- │ │ │ ├── migrate.ts
227
- │ │ │ └── schema.ts
228
- │ │ └── tsconfig.json
229
- │ └── realtime/
230
- │ ├── package.json
231
- │ ├── src/
232
- │ │ └── index.ts
233
- │ └── tsconfig.json
234
- ├── pnpm-workspace.yaml
235
- ├── scripts/
236
- │ ├── first-run.mjs
237
- │ └── verify-db-migrations.mjs
238
- ├── turbo.json
239
- └── vercel.json
240
- ```
241
-
242
- ## web-api-minimal
243
-
244
- Next.js, Fastify, database, and auth
245
-
246
- ```text
247
- web-api-minimal/
248
- ├── .env.example
249
- ├── .github/
250
- │ └── workflows/
251
- │ └── anhedral-ci.yml
252
- ├── .gitignore
253
- ├── .vercelignore
254
- ├── ANHEDRAL.md
255
- ├── PRODUCTION.md
256
- ├── README.md
257
- ├── SKILL.md
258
- ├── anhedral.json
259
- ├── apps/
260
- │ ├── api/
261
- │ │ ├── .env.example
262
- │ │ ├── .gitignore
263
- │ │ ├── package.json
264
- │ │ ├── src/
265
- │ │ │ ├── application.ts
266
- │ │ │ ├── auth.ts
267
- │ │ │ ├── env.ts
268
- │ │ │ ├── index.ts
269
- │ │ │ ├── routes/
270
- │ │ │ │ └── app.ts
271
- │ │ │ └── routes.ts
272
- │ │ ├── tests/
273
- │ │ │ ├── env.test.ts
274
- │ │ │ └── health.test.ts
275
- │ │ ├── tsconfig.json
276
- │ │ └── vitest.config.ts
277
- │ └── web/
278
- │ ├── .env.example
279
- │ ├── app/
280
- │ │ ├── globals.css
281
- │ │ ├── layout.tsx
282
- │ │ └── page.tsx
283
- │ ├── components/
284
- │ │ ├── account-actions.tsx
285
- │ │ ├── item-list.tsx
286
- │ │ └── ui/
287
- │ │ ├── button.tsx
288
- │ │ └── card.tsx
289
- │ ├── components.json
290
- │ ├── hooks/
291
- │ │ └── use-api-client.ts
292
- │ ├── lib/
293
- │ │ ├── api.ts
294
- │ │ └── utils.ts
295
- │ ├── next-env.d.ts
296
- │ ├── next.config.ts
297
- │ ├── package.json
298
- │ ├── postcss.config.mjs
299
- │ └── tsconfig.json
300
- ├── docs/
301
- │ ├── DEVELOPMENT.md
302
- │ └── STACK.md
303
- ├── package.json
304
- ├── packages/
305
- │ ├── api-client/
306
- │ │ ├── package.json
307
- │ │ ├── src/
308
- │ │ │ ├── app.ts
309
- │ │ │ ├── generated.ts
310
- │ │ │ └── index.ts
311
- │ │ └── tsconfig.json
312
- │ ├── contracts/
313
- │ │ ├── package.json
314
- │ │ ├── src/
315
- │ │ │ ├── app.ts
316
- │ │ │ ├── generated.ts
317
- │ │ │ └── index.ts
318
- │ │ └── tsconfig.json
319
- │ └── db/
320
- │ ├── .env.example
321
- │ ├── drizzle.config.ts
322
- │ ├── migrations/
323
- │ │ └── .gitkeep
324
- │ ├── package.json
325
- │ ├── src/
326
- │ │ ├── app-schema.ts
327
- │ │ ├── generated-schema.ts
328
- │ │ ├── index.ts
329
- │ │ ├── migrate.ts
330
- │ │ └── schema.ts
331
- │ └── tsconfig.json
332
- ├── pnpm-workspace.yaml
333
- ├── scripts/
334
- │ ├── first-run.mjs
335
- │ └── verify-db-migrations.mjs
336
- ├── turbo.json
337
- └── vercel.json
338
- ```
339
-
340
- ## api-only
341
-
342
- Minimal Fastify API without database or auth
343
-
344
- ```text
345
- api-only/
346
- ├── .env.example
347
- ├── .github/
348
- │ └── workflows/
349
- │ └── anhedral-ci.yml
350
- ├── .gitignore
351
- ├── .vercelignore
352
- ├── ANHEDRAL.md
353
- ├── PRODUCTION.md
354
- ├── README.md
355
- ├── SKILL.md
356
- ├── anhedral.json
357
- ├── apps/
358
- │ └── api/
359
- │ ├── .env.example
360
- │ ├── .gitignore
361
- │ ├── package.json
362
- │ ├── src/
363
- │ │ ├── application.ts
364
- │ │ ├── env.ts
365
- │ │ ├── index.ts
366
- │ │ ├── routes/
367
- │ │ │ └── app.ts
368
- │ │ └── routes.ts
369
- │ ├── tests/
370
- │ │ ├── env.test.ts
371
- │ │ └── health.test.ts
372
- │ ├── tsconfig.json
373
- │ └── vitest.config.ts
374
- ├── docs/
375
- │ ├── DEVELOPMENT.md
376
- │ └── STACK.md
377
- ├── package.json
378
- ├── packages/
379
- │ └── contracts/
380
- │ ├── package.json
381
- │ ├── src/
382
- │ │ ├── app.ts
383
- │ │ ├── generated.ts
384
- │ │ └── index.ts
385
- │ └── tsconfig.json
386
- ├── pnpm-workspace.yaml
387
- ├── scripts/
388
- │ └── first-run.mjs
389
- ├── turbo.json
390
- └── vercel.json
391
- ```
392
-
393
- ## add-desktop-flow
394
-
395
- API-first project with desktop added afterward
396
-
397
- ```text
398
- add-desktop-flow/
399
- ├── .env.example
400
- ├── .github/
401
- │ └── workflows/
402
- │ └── anhedral-ci.yml
403
- ├── .gitignore
404
- ├── .vercelignore
405
- ├── ANHEDRAL.md
406
- ├── PRODUCTION.md
407
- ├── README.md
408
- ├── SKILL.md
409
- ├── anhedral.json
410
- ├── apps/
411
- │ ├── api/
412
- │ │ ├── .env.example
413
- │ │ ├── .gitignore
414
- │ │ ├── package.json
415
- │ │ ├── src/
416
- │ │ │ ├── application.ts
417
- │ │ │ ├── auth.ts
418
- │ │ │ ├── env.ts
419
- │ │ │ ├── index.ts
420
- │ │ │ ├── routes/
421
- │ │ │ │ └── app.ts
422
- │ │ │ └── routes.ts
423
- │ │ ├── tests/
424
- │ │ │ ├── env.test.ts
425
- │ │ │ └── health.test.ts
426
- │ │ ├── tsconfig.json
427
- │ │ └── vitest.config.ts
428
- │ └── desktop/
429
- │ ├── .env.example
430
- │ ├── components.json
431
- │ ├── index.html
432
- │ ├── package.json
433
- │ ├── postcss.config.mjs
434
- │ ├── scripts/
435
- │ │ └── dev.mjs
436
- │ ├── src/
437
- │ │ ├── main/
438
- │ │ │ ├── app-window.ts
439
- │ │ │ ├── main.ts
440
- │ │ │ └── preload.cts
441
- │ │ └── renderer/
442
- │ │ ├── components/
443
- │ │ │ ├── item-list.tsx
444
- │ │ │ └── ui/
445
- │ │ │ └── button.tsx
446
- │ │ ├── lib/
447
- │ │ │ ├── api.ts
448
- │ │ │ ├── auth.ts
449
- │ │ │ └── utils.ts
450
- │ │ ├── main.tsx
451
- │ │ └── styles.css
452
- │ ├── tsconfig.json
453
- │ ├── tsconfig.main.json
454
- │ └── vite.config.ts
455
- ├── docs/
456
- │ ├── DEVELOPMENT.md
457
- │ └── STACK.md
458
- ├── package.json
459
- ├── packages/
460
- │ ├── api-client/
461
- │ │ ├── package.json
462
- │ │ ├── src/
463
- │ │ │ ├── app.ts
464
- │ │ │ ├── generated.ts
465
- │ │ │ └── index.ts
466
- │ │ └── tsconfig.json
467
- │ ├── contracts/
468
- │ │ ├── package.json
469
- │ │ ├── src/
470
- │ │ │ ├── app.ts
471
- │ │ │ ├── generated.ts
472
- │ │ │ └── index.ts
473
- │ │ └── tsconfig.json
474
- │ └── db/
475
- │ ├── .env.example
476
- │ ├── drizzle.config.ts
477
- │ ├── migrations/
478
- │ │ └── .gitkeep
479
- │ ├── package.json
480
- │ ├── src/
481
- │ │ ├── app-schema.ts
482
- │ │ ├── generated-schema.ts
483
- │ │ ├── index.ts
484
- │ │ ├── migrate.ts
485
- │ │ └── schema.ts
486
- │ └── tsconfig.json
487
- ├── pnpm-workspace.yaml
488
- ├── scripts/
489
- │ ├── first-run.mjs
490
- │ └── verify-db-migrations.mjs
491
- ├── turbo.json
492
- └── vercel.json
493
- ```