create-monolayer-app 0.5.0 → 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 (86) hide show
  1. package/bin/index.js +91 -59
  2. package/package.json +19 -16
  3. package/template/.agents/skills/{monolayer-application-permissions → application-permissions}/SKILL.md +2 -2
  4. package/template/.agents/skills/application-permissions/agents/openai.yaml +4 -0
  5. package/template/.agents/skills/kysely/SKILL.md +48 -0
  6. package/template/.agents/skills/kysely/agents/openai.yaml +4 -0
  7. package/template/.agents/skills/kysely/references/execution-plugins-and-runtime.md +67 -0
  8. package/template/.agents/skills/kysely/references/expressions-and-helpers.md +102 -0
  9. package/template/.agents/skills/kysely/references/migrations.md +43 -0
  10. package/template/.agents/skills/kysely/references/official-docs-map.md +97 -0
  11. package/template/.agents/skills/kysely/references/query-building.md +119 -0
  12. package/template/.agents/skills/kysely/references/transactions.md +47 -0
  13. package/template/.agents/skills/kysely/references/troubleshooting-and-boundaries.md +67 -0
  14. package/template/.agents/skills/kysely/references/types.md +58 -0
  15. package/template/.agents/skills/persistent-app-data/SKILL.md +74 -0
  16. package/template/.agents/skills/persistent-app-data/agents/openai.yaml +4 -0
  17. package/template/.agents/skills/persistent-app-data/references/generated-types.md +23 -0
  18. package/template/.agents/skills/persistent-app-data/references/migrations.md +68 -0
  19. package/template/.agents/skills/vitest/GENERATION.md +25 -0
  20. package/template/.agents/skills/vitest/SKILL.md +59 -0
  21. package/template/.agents/skills/vitest/references/advanced-environments.md +26 -0
  22. package/template/.agents/skills/vitest/references/advanced-projects.md +31 -0
  23. package/template/.agents/skills/vitest/references/advanced-type-testing.md +30 -0
  24. package/template/.agents/skills/vitest/references/advanced-vi.md +23 -0
  25. package/template/.agents/skills/vitest/references/core-cli.md +23 -0
  26. package/template/.agents/skills/vitest/references/core-config.md +24 -0
  27. package/template/.agents/skills/vitest/references/core-describe.md +24 -0
  28. package/template/.agents/skills/vitest/references/core-expect.md +35 -0
  29. package/template/.agents/skills/vitest/references/core-hooks.md +26 -0
  30. package/template/.agents/skills/vitest/references/core-test-api.md +29 -0
  31. package/template/.agents/skills/vitest/references/features-benchmarking.md +25 -0
  32. package/template/.agents/skills/vitest/references/features-concurrency.md +20 -0
  33. package/template/.agents/skills/vitest/references/features-context.md +27 -0
  34. package/template/.agents/skills/vitest/references/features-coverage.md +17 -0
  35. package/template/.agents/skills/vitest/references/features-filtering.md +24 -0
  36. package/template/.agents/skills/vitest/references/features-mocking.md +32 -0
  37. package/template/.agents/skills/vitest/references/features-reporters.md +22 -0
  38. package/template/.agents/skills/vitest/references/features-snapshots.md +23 -0
  39. package/template/.agents/skills/vitest/references/features-test-tags.md +30 -0
  40. package/template/.agents/skills/vitest/references/version-compatibility.md +19 -0
  41. package/template/.claude/CLAUDE.md +2 -2
  42. package/template/.react-router/types/+routes.ts +41 -0
  43. package/template/.react-router/types/+server-build.d.ts +18 -0
  44. package/template/.react-router/types/app/+types/root.ts +68 -0
  45. package/template/.react-router/types/app/routes/+types/files.ts +71 -0
  46. package/template/.react-router/types/app/routes/+types/home.ts +71 -0
  47. package/template/AGENTS.md +6 -2
  48. package/template/app/routes/files.ts +3 -3
  49. package/template/build/client/assets/entry.client-Bc58m2-m.js +9 -0
  50. package/template/build/client/assets/errorBoundaries-CQxPIuVU.js +16 -0
  51. package/template/build/client/assets/files-BvRk9kiK.js +0 -0
  52. package/template/build/client/assets/home-CH2INc5e.js +1 -0
  53. package/template/build/client/assets/jsx-runtime-eLCqVKHJ.js +1 -0
  54. package/template/build/client/assets/logo-dark-pX2395Y0.svg +23 -0
  55. package/template/build/client/assets/logo-light-CVbx2LBR.svg +23 -0
  56. package/template/build/client/assets/manifest-2d65dd0f.js +1 -0
  57. package/template/build/client/assets/root-BeNS6njP.css +2 -0
  58. package/template/build/client/assets/root-C1tmjS9o.js +1 -0
  59. package/template/build/client/favicon.ico +0 -0
  60. package/template/build/server/index.js +1096 -0
  61. package/template/lib/db/client.ts +1 -27
  62. package/template/package-lock.json +8221 -0
  63. package/template/package.json +7 -3
  64. package/template/vendor/file-bucket/{client.ts → index.client.ts} +11 -9
  65. package/template/vendor/file-bucket/{server.ts → index.server.ts} +13 -8
  66. package/template/vendor/file-bucket/{index.ts → lib/file-bucket.ts} +2 -1
  67. package/template/vendor/file-bucket/{react-router.ts → react-router.server.ts} +15 -13
  68. package/template/vendor/kysely-dsql/dsql/dsql-kysely.ts +31 -3
  69. package/template/vendor/kysely-dsql/generator/migration-file.ts +3 -3
  70. package/template/vendor/kysely-dsql/plugins/index.ts +0 -2
  71. package/template/vendor/package-app/package-app.mjs +2 -2
  72. package/template/vite.config.ts +3 -1
  73. package/template/vitest.config.ts +1 -1
  74. package/template/.agents/skills/monolayer-application-permissions/agents/openai.yaml +0 -4
  75. package/template/vendor/kysely-dsql/plugins/soft-delete.plugin.ts +0 -217
  76. /package/template/.agents/skills/{monolayer-application-permissions → application-permissions}/references/development-and-verification.md +0 -0
  77. /package/template/.agents/skills/{monolayer-application-permissions → application-permissions}/references/interface-examples.md +0 -0
  78. /package/template/.agents/skills/{monolayer-application-permissions → application-permissions}/references/server-examples.md +0 -0
  79. /package/template/lib/{db/user-context.server.ts → user-context.server.ts} +0 -0
  80. /package/template/vendor/file-bucket/{errors.ts → lib/errors.server.ts} +0 -0
  81. /package/template/vendor/file-bucket/{multipart.ts → lib/multipart.ts} +0 -0
  82. /package/template/vendor/file-bucket/{protocol.ts → lib/protocol.ts} +0 -0
  83. /package/template/vendor/file-bucket/{transport.ts → lib/transport.client.ts} +0 -0
  84. /package/template/vendor/file-bucket/{types.ts → lib/types.ts} +0 -0
  85. /package/template/vendor/file-bucket/{transfers.ts → lib/upload-signed-url.ts} +0 -0
  86. /package/template/vendor/file-bucket/{xml.ts → lib/xml.ts} +0 -0
@@ -0,0 +1,68 @@
1
+ // Generated by React Router
2
+
3
+ import type { GetInfo, GetAnnotations } from "react-router/internal";
4
+
5
+ type Module = typeof import("../root.js")
6
+
7
+ type Info = GetInfo<{
8
+ file: "root.tsx",
9
+ module: Module
10
+ }>
11
+
12
+ type Matches = [{
13
+ id: "root";
14
+ module: typeof import("../root.js");
15
+ }];
16
+
17
+ type Annotations = GetAnnotations<Info & { module: Module, matches: Matches }>;
18
+
19
+ export namespace Route {
20
+ // links
21
+ export type LinkDescriptors = Annotations["LinkDescriptors"];
22
+ export type LinksFunction = Annotations["LinksFunction"];
23
+
24
+ // meta
25
+ export type MetaArgs = Annotations["MetaArgs"];
26
+ export type MetaDescriptors = Annotations["MetaDescriptors"];
27
+ export type MetaFunction = Annotations["MetaFunction"];
28
+
29
+ // headers
30
+ export type HeadersArgs = Annotations["HeadersArgs"];
31
+ export type HeadersFunction = Annotations["HeadersFunction"];
32
+
33
+ // middleware
34
+ export type MiddlewareFunction = Annotations["MiddlewareFunction"];
35
+
36
+ // clientMiddleware
37
+ export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
38
+
39
+ // loader
40
+ export type LoaderArgs = Annotations["LoaderArgs"];
41
+
42
+ // clientLoader
43
+ export type ClientLoaderArgs = Annotations["ClientLoaderArgs"];
44
+
45
+ // action
46
+ export type ActionArgs = Annotations["ActionArgs"];
47
+
48
+ // clientAction
49
+ export type ClientActionArgs = Annotations["ClientActionArgs"];
50
+
51
+ // HydrateFallback
52
+ export type HydrateFallbackProps = Annotations["HydrateFallbackProps"];
53
+
54
+ // ServerHydrateFallback
55
+ export type ServerHydrateFallbackProps = Annotations["ServerHydrateFallbackProps"];
56
+
57
+ // Component
58
+ export type ComponentProps = Annotations["ComponentProps"];
59
+
60
+ // ServerComponent
61
+ export type ServerComponentProps = Annotations["ServerComponentProps"];
62
+
63
+ // ErrorBoundary
64
+ export type ErrorBoundaryProps = Annotations["ErrorBoundaryProps"];
65
+
66
+ // ServerErrorBoundary
67
+ export type ServerErrorBoundaryProps = Annotations["ServerErrorBoundaryProps"];
68
+ }
@@ -0,0 +1,71 @@
1
+ // Generated by React Router
2
+
3
+ import type { GetInfo, GetAnnotations } from "react-router/internal";
4
+
5
+ type Module = typeof import("../files.js")
6
+
7
+ type Info = GetInfo<{
8
+ file: "routes/files.ts",
9
+ module: Module
10
+ }>
11
+
12
+ type Matches = [{
13
+ id: "root";
14
+ module: typeof import("../../root.js");
15
+ }, {
16
+ id: "routes/files";
17
+ module: typeof import("../files.js");
18
+ }];
19
+
20
+ type Annotations = GetAnnotations<Info & { module: Module, matches: Matches }>;
21
+
22
+ export namespace Route {
23
+ // links
24
+ export type LinkDescriptors = Annotations["LinkDescriptors"];
25
+ export type LinksFunction = Annotations["LinksFunction"];
26
+
27
+ // meta
28
+ export type MetaArgs = Annotations["MetaArgs"];
29
+ export type MetaDescriptors = Annotations["MetaDescriptors"];
30
+ export type MetaFunction = Annotations["MetaFunction"];
31
+
32
+ // headers
33
+ export type HeadersArgs = Annotations["HeadersArgs"];
34
+ export type HeadersFunction = Annotations["HeadersFunction"];
35
+
36
+ // middleware
37
+ export type MiddlewareFunction = Annotations["MiddlewareFunction"];
38
+
39
+ // clientMiddleware
40
+ export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
41
+
42
+ // loader
43
+ export type LoaderArgs = Annotations["LoaderArgs"];
44
+
45
+ // clientLoader
46
+ export type ClientLoaderArgs = Annotations["ClientLoaderArgs"];
47
+
48
+ // action
49
+ export type ActionArgs = Annotations["ActionArgs"];
50
+
51
+ // clientAction
52
+ export type ClientActionArgs = Annotations["ClientActionArgs"];
53
+
54
+ // HydrateFallback
55
+ export type HydrateFallbackProps = Annotations["HydrateFallbackProps"];
56
+
57
+ // ServerHydrateFallback
58
+ export type ServerHydrateFallbackProps = Annotations["ServerHydrateFallbackProps"];
59
+
60
+ // Component
61
+ export type ComponentProps = Annotations["ComponentProps"];
62
+
63
+ // ServerComponent
64
+ export type ServerComponentProps = Annotations["ServerComponentProps"];
65
+
66
+ // ErrorBoundary
67
+ export type ErrorBoundaryProps = Annotations["ErrorBoundaryProps"];
68
+
69
+ // ServerErrorBoundary
70
+ export type ServerErrorBoundaryProps = Annotations["ServerErrorBoundaryProps"];
71
+ }
@@ -0,0 +1,71 @@
1
+ // Generated by React Router
2
+
3
+ import type { GetInfo, GetAnnotations } from "react-router/internal";
4
+
5
+ type Module = typeof import("../home.js")
6
+
7
+ type Info = GetInfo<{
8
+ file: "routes/home.tsx",
9
+ module: Module
10
+ }>
11
+
12
+ type Matches = [{
13
+ id: "root";
14
+ module: typeof import("../../root.js");
15
+ }, {
16
+ id: "routes/home";
17
+ module: typeof import("../home.js");
18
+ }];
19
+
20
+ type Annotations = GetAnnotations<Info & { module: Module, matches: Matches }>;
21
+
22
+ export namespace Route {
23
+ // links
24
+ export type LinkDescriptors = Annotations["LinkDescriptors"];
25
+ export type LinksFunction = Annotations["LinksFunction"];
26
+
27
+ // meta
28
+ export type MetaArgs = Annotations["MetaArgs"];
29
+ export type MetaDescriptors = Annotations["MetaDescriptors"];
30
+ export type MetaFunction = Annotations["MetaFunction"];
31
+
32
+ // headers
33
+ export type HeadersArgs = Annotations["HeadersArgs"];
34
+ export type HeadersFunction = Annotations["HeadersFunction"];
35
+
36
+ // middleware
37
+ export type MiddlewareFunction = Annotations["MiddlewareFunction"];
38
+
39
+ // clientMiddleware
40
+ export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
41
+
42
+ // loader
43
+ export type LoaderArgs = Annotations["LoaderArgs"];
44
+
45
+ // clientLoader
46
+ export type ClientLoaderArgs = Annotations["ClientLoaderArgs"];
47
+
48
+ // action
49
+ export type ActionArgs = Annotations["ActionArgs"];
50
+
51
+ // clientAction
52
+ export type ClientActionArgs = Annotations["ClientActionArgs"];
53
+
54
+ // HydrateFallback
55
+ export type HydrateFallbackProps = Annotations["HydrateFallbackProps"];
56
+
57
+ // ServerHydrateFallback
58
+ export type ServerHydrateFallbackProps = Annotations["ServerHydrateFallbackProps"];
59
+
60
+ // Component
61
+ export type ComponentProps = Annotations["ComponentProps"];
62
+
63
+ // ServerComponent
64
+ export type ServerComponentProps = Annotations["ServerComponentProps"];
65
+
66
+ // ErrorBoundary
67
+ export type ErrorBoundaryProps = Annotations["ErrorBoundaryProps"];
68
+
69
+ // ServerErrorBoundary
70
+ export type ServerErrorBoundaryProps = Annotations["ServerErrorBoundaryProps"];
71
+ }
@@ -12,9 +12,9 @@ Oxlint + Oxfmt (the underlying engine) provides robust linting and formatting. M
12
12
 
13
13
  ---
14
14
 
15
- ## Monolayer Application Permissions
15
+ ## Application Permissions
16
16
 
17
- Preserve existing authentication and workspace role behavior during feature work, including demos. Use [monolayer-application-permissions](.agents/skills/monolayer-application-permissions/SKILL.md) for application content access, editing interactions, or authentication/context changes.
17
+ Preserve existing authentication and workspace role behavior during feature work, including demos. Use [application-permissions](.agents/skills/application-permissions/SKILL.md) for application content access, editing interactions, or authentication/context changes.
18
18
 
19
19
  The default development role is `owner`, so testing only with that role can miss permission errors affecting other users. When verifying role-dependent behavior, temporarily change the role in the `import.meta.env.DEV` branch of [lib/user-context.server.ts](lib/user-context.server.ts):
20
20
 
@@ -23,6 +23,10 @@ The default development role is `owner`, so testing only with that role can miss
23
23
 
24
24
  Select checks relevant to the feature being changed. This testing exception does not require additional approval or a new role-selection mechanism. Restore the original role after testing and keep temporary role changes out of commits. Preserve the production authentication branch.
25
25
 
26
+ ## Persistent Application Data
27
+
28
+ Use [persistent-app-data](.agents/skills/persistent-app-data/SKILL.md) when a feature needs persistent records, database queries, or schema changes. Use the shared `db` from `lib/db/client.ts` for persistent application records. The skill covers DSQLKysely, local PGlite databases, migration commands, and generated types. Use the adjacent [Kysely skill](.agents/skills/kysely/SKILL.md) for general query guidance.
29
+
26
30
  ## Core Principles
27
31
 
28
32
  Write code that is **accessible, performant, type-safe, and maintainable**. Focus on clarity and explicit intent over brevity.
@@ -1,12 +1,12 @@
1
- import { FileBucket } from "../../vendor/file-bucket";
2
- import { parseFileBucketRequest } from "../../vendor/file-bucket/protocol";
1
+ import { FileBucket } from "../../vendor/file-bucket/index.server";
3
2
  import {
4
3
  dispatch,
5
4
  MAX_BATCH_KEYS,
6
5
  MAX_REQUEST_BYTES,
7
6
  readLimitedJson,
8
7
  type FileBucketRequest,
9
- } from "../../vendor/file-bucket/react-router";
8
+ parseFileBucketRequest,
9
+ } from "../../vendor/file-bucket/react-router.server";
10
10
 
11
11
  export const action = async ({
12
12
  request,