@contractspec/example.saas-boilerplate 3.8.8 → 3.8.10

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 (156) hide show
  1. package/.turbo/turbo-build.log +156 -156
  2. package/CHANGELOG.md +40 -0
  3. package/dist/billing/billing.entity.js +1 -113
  4. package/dist/billing/billing.enum.js +1 -19
  5. package/dist/billing/billing.event.js +1 -90
  6. package/dist/billing/billing.handler.js +1 -148
  7. package/dist/billing/billing.operations.js +1 -278
  8. package/dist/billing/billing.presentation.js +1 -55
  9. package/dist/billing/billing.schema.js +1 -121
  10. package/dist/billing/index.js +1 -691
  11. package/dist/browser/billing/billing.entity.js +1 -113
  12. package/dist/browser/billing/billing.enum.js +1 -19
  13. package/dist/browser/billing/billing.event.js +1 -90
  14. package/dist/browser/billing/billing.handler.js +1 -148
  15. package/dist/browser/billing/billing.operations.js +1 -278
  16. package/dist/browser/billing/billing.presentation.js +1 -55
  17. package/dist/browser/billing/billing.schema.js +1 -121
  18. package/dist/browser/billing/index.js +1 -691
  19. package/dist/browser/dashboard/dashboard.presentation.js +1 -55
  20. package/dist/browser/dashboard/index.js +1 -55
  21. package/dist/browser/docs/index.js +5 -49
  22. package/dist/browser/docs/saas-boilerplate.docblock.js +5 -49
  23. package/dist/browser/example.js +1 -39
  24. package/dist/browser/handlers/index.js +2 -358
  25. package/dist/browser/handlers/saas.handlers.js +2 -134
  26. package/dist/browser/index.js +9 -3591
  27. package/dist/browser/presentations/index.js +1 -299
  28. package/dist/browser/project/index.js +1 -793
  29. package/dist/browser/project/project.entity.js +1 -77
  30. package/dist/browser/project/project.enum.js +1 -18
  31. package/dist/browser/project/project.event.js +1 -103
  32. package/dist/browser/project/project.handler.js +1 -178
  33. package/dist/browser/project/project.operations.js +1 -372
  34. package/dist/browser/project/project.presentation.js +1 -180
  35. package/dist/browser/project/project.schema.js +1 -134
  36. package/dist/browser/saas-boilerplate.feature.js +1 -304
  37. package/dist/browser/seeders/index.js +2 -20
  38. package/dist/browser/settings/index.js +1 -75
  39. package/dist/browser/settings/settings.entity.js +1 -74
  40. package/dist/browser/settings/settings.enum.js +1 -11
  41. package/dist/browser/shared/mock-data.js +1 -104
  42. package/dist/browser/tests/operations.test-spec.js +1 -112
  43. package/dist/browser/ui/SaasDashboard.js +1 -1239
  44. package/dist/browser/ui/SaasDashboard.visualizations.js +1 -249
  45. package/dist/browser/ui/SaasProjectList.js +1 -162
  46. package/dist/browser/ui/SaasSettingsPanel.js +1 -145
  47. package/dist/browser/ui/hooks/index.js +1 -159
  48. package/dist/browser/ui/hooks/useProjectList.js +1 -66
  49. package/dist/browser/ui/hooks/useProjectMutations.js +1 -91
  50. package/dist/browser/ui/index.js +5 -2077
  51. package/dist/browser/ui/modals/CreateProjectModal.js +1 -153
  52. package/dist/browser/ui/modals/ProjectActionsModal.js +1 -335
  53. package/dist/browser/ui/modals/index.js +1 -487
  54. package/dist/browser/ui/overlays/demo-overlays.js +1 -61
  55. package/dist/browser/ui/overlays/index.js +1 -61
  56. package/dist/browser/ui/renderers/index.js +5 -901
  57. package/dist/browser/ui/renderers/project-list.markdown.js +5 -725
  58. package/dist/browser/ui/renderers/project-list.renderer.js +1 -177
  59. package/dist/browser/visualizations/catalog.js +1 -155
  60. package/dist/browser/visualizations/index.js +1 -217
  61. package/dist/browser/visualizations/selectors.js +1 -210
  62. package/dist/dashboard/dashboard.presentation.js +1 -55
  63. package/dist/dashboard/index.js +1 -55
  64. package/dist/docs/index.js +5 -49
  65. package/dist/docs/saas-boilerplate.docblock.js +5 -49
  66. package/dist/example.js +1 -39
  67. package/dist/handlers/index.js +2 -358
  68. package/dist/handlers/saas.handlers.js +2 -134
  69. package/dist/index.js +9 -3591
  70. package/dist/node/billing/billing.entity.js +1 -113
  71. package/dist/node/billing/billing.enum.js +1 -19
  72. package/dist/node/billing/billing.event.js +1 -90
  73. package/dist/node/billing/billing.handler.js +1 -148
  74. package/dist/node/billing/billing.operations.js +1 -278
  75. package/dist/node/billing/billing.presentation.js +1 -55
  76. package/dist/node/billing/billing.schema.js +1 -121
  77. package/dist/node/billing/index.js +1 -691
  78. package/dist/node/dashboard/dashboard.presentation.js +1 -55
  79. package/dist/node/dashboard/index.js +1 -55
  80. package/dist/node/docs/index.js +5 -49
  81. package/dist/node/docs/saas-boilerplate.docblock.js +5 -49
  82. package/dist/node/example.js +1 -39
  83. package/dist/node/handlers/index.js +2 -358
  84. package/dist/node/handlers/saas.handlers.js +2 -134
  85. package/dist/node/index.js +9 -3591
  86. package/dist/node/presentations/index.js +1 -299
  87. package/dist/node/project/index.js +1 -793
  88. package/dist/node/project/project.entity.js +1 -77
  89. package/dist/node/project/project.enum.js +1 -18
  90. package/dist/node/project/project.event.js +1 -103
  91. package/dist/node/project/project.handler.js +1 -178
  92. package/dist/node/project/project.operations.js +1 -372
  93. package/dist/node/project/project.presentation.js +1 -180
  94. package/dist/node/project/project.schema.js +1 -134
  95. package/dist/node/saas-boilerplate.feature.js +1 -304
  96. package/dist/node/seeders/index.js +2 -20
  97. package/dist/node/settings/index.js +1 -75
  98. package/dist/node/settings/settings.entity.js +1 -74
  99. package/dist/node/settings/settings.enum.js +1 -11
  100. package/dist/node/shared/mock-data.js +1 -104
  101. package/dist/node/tests/operations.test-spec.js +1 -112
  102. package/dist/node/ui/SaasDashboard.js +1 -1239
  103. package/dist/node/ui/SaasDashboard.visualizations.js +1 -249
  104. package/dist/node/ui/SaasProjectList.js +1 -162
  105. package/dist/node/ui/SaasSettingsPanel.js +1 -145
  106. package/dist/node/ui/hooks/index.js +1 -159
  107. package/dist/node/ui/hooks/useProjectList.js +1 -66
  108. package/dist/node/ui/hooks/useProjectMutations.js +1 -91
  109. package/dist/node/ui/index.js +5 -2077
  110. package/dist/node/ui/modals/CreateProjectModal.js +1 -153
  111. package/dist/node/ui/modals/ProjectActionsModal.js +1 -335
  112. package/dist/node/ui/modals/index.js +1 -487
  113. package/dist/node/ui/overlays/demo-overlays.js +1 -61
  114. package/dist/node/ui/overlays/index.js +1 -61
  115. package/dist/node/ui/renderers/index.js +5 -901
  116. package/dist/node/ui/renderers/project-list.markdown.js +5 -725
  117. package/dist/node/ui/renderers/project-list.renderer.js +1 -177
  118. package/dist/node/visualizations/catalog.js +1 -155
  119. package/dist/node/visualizations/index.js +1 -217
  120. package/dist/node/visualizations/selectors.js +1 -210
  121. package/dist/presentations/index.js +1 -299
  122. package/dist/project/index.js +1 -793
  123. package/dist/project/project.entity.js +1 -77
  124. package/dist/project/project.enum.js +1 -18
  125. package/dist/project/project.event.js +1 -103
  126. package/dist/project/project.handler.js +1 -178
  127. package/dist/project/project.operations.js +1 -372
  128. package/dist/project/project.presentation.js +1 -180
  129. package/dist/project/project.schema.js +1 -134
  130. package/dist/saas-boilerplate.feature.js +1 -304
  131. package/dist/seeders/index.js +2 -20
  132. package/dist/settings/index.js +1 -75
  133. package/dist/settings/settings.entity.js +1 -74
  134. package/dist/settings/settings.enum.js +1 -11
  135. package/dist/shared/mock-data.js +1 -104
  136. package/dist/tests/operations.test-spec.js +1 -112
  137. package/dist/ui/SaasDashboard.js +1 -1239
  138. package/dist/ui/SaasDashboard.visualizations.js +1 -249
  139. package/dist/ui/SaasProjectList.js +1 -162
  140. package/dist/ui/SaasSettingsPanel.js +1 -145
  141. package/dist/ui/hooks/index.js +1 -159
  142. package/dist/ui/hooks/useProjectList.js +1 -66
  143. package/dist/ui/hooks/useProjectMutations.js +1 -91
  144. package/dist/ui/index.js +5 -2077
  145. package/dist/ui/modals/CreateProjectModal.js +1 -153
  146. package/dist/ui/modals/ProjectActionsModal.js +1 -335
  147. package/dist/ui/modals/index.js +1 -487
  148. package/dist/ui/overlays/demo-overlays.js +1 -61
  149. package/dist/ui/overlays/index.js +1 -61
  150. package/dist/ui/renderers/index.js +5 -901
  151. package/dist/ui/renderers/project-list.markdown.js +5 -725
  152. package/dist/ui/renderers/project-list.renderer.js +1 -177
  153. package/dist/visualizations/catalog.js +1 -155
  154. package/dist/visualizations/index.js +1 -217
  155. package/dist/visualizations/selectors.js +1 -210
  156. package/package.json +15 -15
@@ -1,55 +1 @@
1
- // src/dashboard/dashboard.presentation.ts
2
- import {
3
- definePresentation,
4
- StabilityEnum
5
- } from "@contractspec/lib.contracts-spec";
6
- var SaasDashboardPresentation = definePresentation({
7
- meta: {
8
- key: "saas.dashboard",
9
- version: "1.0.0",
10
- title: "SaaS Dashboard",
11
- description: "Main SaaS dashboard with project overview, usage stats, and quick actions",
12
- domain: "saas-boilerplate",
13
- owners: ["@saas-team"],
14
- tags: ["dashboard", "overview"],
15
- stability: StabilityEnum.Beta,
16
- goal: "Overview of SaaS activity and metrics",
17
- context: "Main dashboard"
18
- },
19
- source: {
20
- type: "component",
21
- framework: "react",
22
- componentKey: "SaasDashboard"
23
- },
24
- targets: ["react", "markdown"],
25
- policy: {
26
- flags: ["saas.enabled"]
27
- }
28
- });
29
- var SettingsPanelPresentation = definePresentation({
30
- meta: {
31
- key: "saas.settings",
32
- version: "1.0.0",
33
- title: "Settings Panel",
34
- description: "Organization and user settings panel",
35
- domain: "saas-boilerplate",
36
- owners: ["@saas-team"],
37
- tags: ["settings", "config"],
38
- stability: StabilityEnum.Beta,
39
- goal: "Configure organization and user settings",
40
- context: "Settings section"
41
- },
42
- source: {
43
- type: "component",
44
- framework: "react",
45
- componentKey: "SettingsPanel"
46
- },
47
- targets: ["react"],
48
- policy: {
49
- flags: ["saas.enabled"]
50
- }
51
- });
52
- export {
53
- SettingsPanelPresentation,
54
- SaasDashboardPresentation
55
- };
1
+ import{definePresentation as g,StabilityEnum as h}from"@contractspec/lib.contracts-spec";var k=g({meta:{key:"saas.dashboard",version:"1.0.0",title:"SaaS Dashboard",description:"Main SaaS dashboard with project overview, usage stats, and quick actions",domain:"saas-boilerplate",owners:["@saas-team"],tags:["dashboard","overview"],stability:h.Beta,goal:"Overview of SaaS activity and metrics",context:"Main dashboard"},source:{type:"component",framework:"react",componentKey:"SaasDashboard"},targets:["react","markdown"],policy:{flags:["saas.enabled"]}}),q=g({meta:{key:"saas.settings",version:"1.0.0",title:"Settings Panel",description:"Organization and user settings panel",domain:"saas-boilerplate",owners:["@saas-team"],tags:["settings","config"],stability:h.Beta,goal:"Configure organization and user settings",context:"Settings section"},source:{type:"component",framework:"react",componentKey:"SettingsPanel"},targets:["react"],policy:{flags:["saas.enabled"]}});export{q as SettingsPanelPresentation,k as SaasDashboardPresentation};
@@ -1,55 +1 @@
1
- // src/dashboard/dashboard.presentation.ts
2
- import {
3
- definePresentation,
4
- StabilityEnum
5
- } from "@contractspec/lib.contracts-spec";
6
- var SaasDashboardPresentation = definePresentation({
7
- meta: {
8
- key: "saas.dashboard",
9
- version: "1.0.0",
10
- title: "SaaS Dashboard",
11
- description: "Main SaaS dashboard with project overview, usage stats, and quick actions",
12
- domain: "saas-boilerplate",
13
- owners: ["@saas-team"],
14
- tags: ["dashboard", "overview"],
15
- stability: StabilityEnum.Beta,
16
- goal: "Overview of SaaS activity and metrics",
17
- context: "Main dashboard"
18
- },
19
- source: {
20
- type: "component",
21
- framework: "react",
22
- componentKey: "SaasDashboard"
23
- },
24
- targets: ["react", "markdown"],
25
- policy: {
26
- flags: ["saas.enabled"]
27
- }
28
- });
29
- var SettingsPanelPresentation = definePresentation({
30
- meta: {
31
- key: "saas.settings",
32
- version: "1.0.0",
33
- title: "Settings Panel",
34
- description: "Organization and user settings panel",
35
- domain: "saas-boilerplate",
36
- owners: ["@saas-team"],
37
- tags: ["settings", "config"],
38
- stability: StabilityEnum.Beta,
39
- goal: "Configure organization and user settings",
40
- context: "Settings section"
41
- },
42
- source: {
43
- type: "component",
44
- framework: "react",
45
- componentKey: "SettingsPanel"
46
- },
47
- targets: ["react"],
48
- policy: {
49
- flags: ["saas.enabled"]
50
- }
51
- });
52
- export {
53
- SettingsPanelPresentation,
54
- SaasDashboardPresentation
55
- };
1
+ import{definePresentation as a,StabilityEnum as s}from"@contractspec/lib.contracts-spec";var d=a({meta:{key:"saas.dashboard",version:"1.0.0",title:"SaaS Dashboard",description:"Main SaaS dashboard with project overview, usage stats, and quick actions",domain:"saas-boilerplate",owners:["@saas-team"],tags:["dashboard","overview"],stability:s.Beta,goal:"Overview of SaaS activity and metrics",context:"Main dashboard"},source:{type:"component",framework:"react",componentKey:"SaasDashboard"},targets:["react","markdown"],policy:{flags:["saas.enabled"]}}),o=a({meta:{key:"saas.settings",version:"1.0.0",title:"Settings Panel",description:"Organization and user settings panel",domain:"saas-boilerplate",owners:["@saas-team"],tags:["settings","config"],stability:s.Beta,goal:"Configure organization and user settings",context:"Settings section"},source:{type:"component",framework:"react",componentKey:"SettingsPanel"},targets:["react"],policy:{flags:["saas.enabled"]}});export{o as SettingsPanelPresentation,d as SaasDashboardPresentation};
@@ -1,15 +1,4 @@
1
- // src/docs/saas-boilerplate.docblock.ts
2
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
3
- var saasBoilerplateDocBlocks = [
4
- {
5
- id: "docs.examples.saas-boilerplate.goal",
6
- title: "SaaS Boilerplate — Goal",
7
- summary: "Multi-tenant SaaS foundation with orgs, members, projects, settings, and usage.",
8
- kind: "goal",
9
- visibility: "public",
10
- route: "/docs/examples/saas-boilerplate/goal",
11
- tags: ["saas", "goal"],
12
- body: `## Why it matters
1
+ import{registerDocBlocks as m}from"@contractspec/lib.contracts-spec/docs";var f=[{id:"docs.examples.saas-boilerplate.goal",title:"SaaS Boilerplate — Goal",summary:"Multi-tenant SaaS foundation with orgs, members, projects, settings, and usage.",kind:"goal",visibility:"public",route:"/docs/examples/saas-boilerplate/goal",tags:["saas","goal"],body:`## Why it matters
13
2
  - Provides a regenerable SaaS base: orgs, members, projects, settings, usage/billing.
14
3
  - Avoids drift across identity, settings, and usage capture.
15
4
 
@@ -19,17 +8,7 @@ var saasBoilerplateDocBlocks = [
19
8
 
20
9
  ## Success criteria
21
10
  - Spec changes to org/project/settings/usage regenerate UI/API/events cleanly.
22
- - Tenant isolation and RBAC stay enforced; usage data is captured with PII scopes.`
23
- },
24
- {
25
- id: "docs.examples.saas-boilerplate.usage",
26
- title: "SaaS Boilerplate — Usage",
27
- summary: "How to seed, extend, and regenerate the SaaS base.",
28
- kind: "usage",
29
- visibility: "public",
30
- route: "/docs/examples/saas-boilerplate/usage",
31
- tags: ["saas", "usage"],
32
- body: `## Setup
11
+ - Tenant isolation and RBAC stay enforced; usage data is captured with PII scopes.`},{id:"docs.examples.saas-boilerplate.usage",title:"SaaS Boilerplate — Usage",summary:"How to seed, extend, and regenerate the SaaS base.",kind:"usage",visibility:"public",route:"/docs/examples/saas-boilerplate/usage",tags:["saas","usage"],body:`## Setup
33
12
  1) Seed (if available) or create orgs, members, and projects via UI.
34
13
  2) Configure Notifications for invites and project events; set policy.pii for sensitive fields.
35
14
 
@@ -41,17 +20,7 @@ var saasBoilerplateDocBlocks = [
41
20
  ## Guardrails
42
21
  - Keep tenant/role context explicit in contracts and presentations.
43
22
  - Emit events for invites, project changes, and usage records; log in Audit Trail.
44
- - Redact sensitive user/org data in markdown/JSON outputs.`
45
- },
46
- {
47
- id: "docs.examples.saas-boilerplate.reference",
48
- title: "SaaS Boilerplate — Reference",
49
- summary: "Entities, contracts, events, and presentations for the SaaS starter.",
50
- kind: "reference",
51
- visibility: "public",
52
- route: "/docs/examples/saas-boilerplate",
53
- tags: ["saas", "reference"],
54
- body: `## Entities
23
+ - Redact sensitive user/org data in markdown/JSON outputs.`},{id:"docs.examples.saas-boilerplate.reference",title:"SaaS Boilerplate — Reference",summary:"Entities, contracts, events, and presentations for the SaaS starter.",kind:"reference",visibility:"public",route:"/docs/examples/saas-boilerplate",tags:["saas","reference"],body:`## Entities
55
24
  - Organization, Member, Role, Project, AppSettings, UserSettings, BillingUsage.
56
25
 
57
26
  ## Contracts
@@ -65,17 +34,7 @@ var saasBoilerplateDocBlocks = [
65
34
 
66
35
  ## Notes
67
36
  - Tenant isolation is mandatory; enforce via RBAC/policies.
68
- - Usage/Metering drives billing/limits; keep units explicit.`
69
- },
70
- {
71
- id: "docs.examples.saas-boilerplate.constraints",
72
- title: "SaaS Boilerplate — Constraints & Safety",
73
- summary: "Internal guardrails for tenancy, RBAC, usage metering, and regeneration.",
74
- kind: "reference",
75
- visibility: "internal",
76
- route: "/docs/examples/saas-boilerplate/constraints",
77
- tags: ["saas", "constraints", "internal"],
78
- body: `## Constraints
37
+ - Usage/Metering drives billing/limits; keep units explicit.`},{id:"docs.examples.saas-boilerplate.constraints",title:"SaaS Boilerplate — Constraints & Safety",summary:"Internal guardrails for tenancy, RBAC, usage metering, and regeneration.",kind:"reference",visibility:"internal",route:"/docs/examples/saas-boilerplate/constraints",tags:["saas","constraints","internal"],body:`## Constraints
79
38
  - Tenant isolation and RBAC must remain explicit in spec; no implicit defaults in code.
80
39
  - Events to emit: org.created, member.invited/accepted, project.created/updated, usage.recorded.
81
40
  - Regeneration must not change billing/usage semantics without spec diffs.
@@ -87,7 +46,4 @@ var saasBoilerplateDocBlocks = [
87
46
  ## Verification
88
47
  - Add fixtures for usage recording and role changes.
89
48
  - Ensure Audit/Notifications remain wired for invites/project updates.
90
- - Use Feature Flags for new settings/billing fields; default safe/off.`
91
- }
92
- ];
93
- registerDocBlocks(saasBoilerplateDocBlocks);
49
+ - Use Feature Flags for new settings/billing fields; default safe/off.`}];m(f);
@@ -1,15 +1,4 @@
1
- // src/docs/saas-boilerplate.docblock.ts
2
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
3
- var saasBoilerplateDocBlocks = [
4
- {
5
- id: "docs.examples.saas-boilerplate.goal",
6
- title: "SaaS Boilerplate — Goal",
7
- summary: "Multi-tenant SaaS foundation with orgs, members, projects, settings, and usage.",
8
- kind: "goal",
9
- visibility: "public",
10
- route: "/docs/examples/saas-boilerplate/goal",
11
- tags: ["saas", "goal"],
12
- body: `## Why it matters
1
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.examples.saas-boilerplate.goal",title:"SaaS Boilerplate — Goal",summary:"Multi-tenant SaaS foundation with orgs, members, projects, settings, and usage.",kind:"goal",visibility:"public",route:"/docs/examples/saas-boilerplate/goal",tags:["saas","goal"],body:`## Why it matters
13
2
  - Provides a regenerable SaaS base: orgs, members, projects, settings, usage/billing.
14
3
  - Avoids drift across identity, settings, and usage capture.
15
4
 
@@ -19,17 +8,7 @@ var saasBoilerplateDocBlocks = [
19
8
 
20
9
  ## Success criteria
21
10
  - Spec changes to org/project/settings/usage regenerate UI/API/events cleanly.
22
- - Tenant isolation and RBAC stay enforced; usage data is captured with PII scopes.`
23
- },
24
- {
25
- id: "docs.examples.saas-boilerplate.usage",
26
- title: "SaaS Boilerplate — Usage",
27
- summary: "How to seed, extend, and regenerate the SaaS base.",
28
- kind: "usage",
29
- visibility: "public",
30
- route: "/docs/examples/saas-boilerplate/usage",
31
- tags: ["saas", "usage"],
32
- body: `## Setup
11
+ - Tenant isolation and RBAC stay enforced; usage data is captured with PII scopes.`},{id:"docs.examples.saas-boilerplate.usage",title:"SaaS Boilerplate — Usage",summary:"How to seed, extend, and regenerate the SaaS base.",kind:"usage",visibility:"public",route:"/docs/examples/saas-boilerplate/usage",tags:["saas","usage"],body:`## Setup
33
12
  1) Seed (if available) or create orgs, members, and projects via UI.
34
13
  2) Configure Notifications for invites and project events; set policy.pii for sensitive fields.
35
14
 
@@ -41,17 +20,7 @@ var saasBoilerplateDocBlocks = [
41
20
  ## Guardrails
42
21
  - Keep tenant/role context explicit in contracts and presentations.
43
22
  - Emit events for invites, project changes, and usage records; log in Audit Trail.
44
- - Redact sensitive user/org data in markdown/JSON outputs.`
45
- },
46
- {
47
- id: "docs.examples.saas-boilerplate.reference",
48
- title: "SaaS Boilerplate — Reference",
49
- summary: "Entities, contracts, events, and presentations for the SaaS starter.",
50
- kind: "reference",
51
- visibility: "public",
52
- route: "/docs/examples/saas-boilerplate",
53
- tags: ["saas", "reference"],
54
- body: `## Entities
23
+ - Redact sensitive user/org data in markdown/JSON outputs.`},{id:"docs.examples.saas-boilerplate.reference",title:"SaaS Boilerplate — Reference",summary:"Entities, contracts, events, and presentations for the SaaS starter.",kind:"reference",visibility:"public",route:"/docs/examples/saas-boilerplate",tags:["saas","reference"],body:`## Entities
55
24
  - Organization, Member, Role, Project, AppSettings, UserSettings, BillingUsage.
56
25
 
57
26
  ## Contracts
@@ -65,17 +34,7 @@ var saasBoilerplateDocBlocks = [
65
34
 
66
35
  ## Notes
67
36
  - Tenant isolation is mandatory; enforce via RBAC/policies.
68
- - Usage/Metering drives billing/limits; keep units explicit.`
69
- },
70
- {
71
- id: "docs.examples.saas-boilerplate.constraints",
72
- title: "SaaS Boilerplate — Constraints & Safety",
73
- summary: "Internal guardrails for tenancy, RBAC, usage metering, and regeneration.",
74
- kind: "reference",
75
- visibility: "internal",
76
- route: "/docs/examples/saas-boilerplate/constraints",
77
- tags: ["saas", "constraints", "internal"],
78
- body: `## Constraints
37
+ - Usage/Metering drives billing/limits; keep units explicit.`},{id:"docs.examples.saas-boilerplate.constraints",title:"SaaS Boilerplate — Constraints & Safety",summary:"Internal guardrails for tenancy, RBAC, usage metering, and regeneration.",kind:"reference",visibility:"internal",route:"/docs/examples/saas-boilerplate/constraints",tags:["saas","constraints","internal"],body:`## Constraints
79
38
  - Tenant isolation and RBAC must remain explicit in spec; no implicit defaults in code.
80
39
  - Events to emit: org.created, member.invited/accepted, project.created/updated, usage.recorded.
81
40
  - Regeneration must not change billing/usage semantics without spec diffs.
@@ -87,7 +46,4 @@ var saasBoilerplateDocBlocks = [
87
46
  ## Verification
88
47
  - Add fixtures for usage recording and role changes.
89
48
  - Ensure Audit/Notifications remain wired for invites/project updates.
90
- - Use Feature Flags for new settings/billing fields; default safe/off.`
91
- }
92
- ];
93
- registerDocBlocks(saasBoilerplateDocBlocks);
49
+ - Use Feature Flags for new settings/billing fields; default safe/off.`}];f(h);
@@ -1,39 +1 @@
1
- // src/example.ts
2
- import { defineExample } from "@contractspec/lib.contracts-spec";
3
- var example = defineExample({
4
- meta: {
5
- key: "saas-boilerplate",
6
- version: "1.0.0",
7
- title: "SaaS Boilerplate",
8
- description: "Multi-tenant SaaS foundation with orgs, projects, settings, billing usage, and RBAC.",
9
- kind: "template",
10
- visibility: "public",
11
- stability: "experimental",
12
- owners: ["@platform.core"],
13
- tags: ["saas", "multi-tenant", "billing", "rbac"]
14
- },
15
- docs: {
16
- rootDocId: "docs.examples.saas-boilerplate"
17
- },
18
- entrypoints: {
19
- packageName: "@contractspec/example.saas-boilerplate",
20
- feature: "./feature",
21
- contracts: "./contracts",
22
- presentations: "./presentations",
23
- handlers: "./handlers",
24
- docs: "./docs"
25
- },
26
- surfaces: {
27
- templates: true,
28
- sandbox: {
29
- enabled: true,
30
- modes: ["playground", "specs", "builder", "markdown", "evolution"]
31
- },
32
- studio: { enabled: true, installable: true },
33
- mcp: { enabled: true }
34
- }
35
- });
36
- var example_default = example;
37
- export {
38
- example_default as default
39
- };
1
+ import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"saas-boilerplate",version:"1.0.0",title:"SaaS Boilerplate",description:"Multi-tenant SaaS foundation with orgs, projects, settings, billing usage, and RBAC.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["saas","multi-tenant","billing","rbac"]},docs:{rootDocId:"docs.examples.saas-boilerplate"},entrypoints:{packageName:"@contractspec/example.saas-boilerplate",feature:"./feature",contracts:"./contracts",presentations:"./presentations",handlers:"./handlers",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs","builder","markdown","evolution"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};