@powerhousedao/academy 0.1.0-dev.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.
Files changed (226) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/CHANGELOG.md +9 -0
  3. package/Dockerfile +31 -0
  4. package/ProcFile +1 -0
  5. package/README.md +43 -0
  6. package/babel.config.js +3 -0
  7. package/blog/BeyondCommunication-ABlueprintForDevelopment.md +88 -0
  8. package/blog/TheChallengeOfChange.md +86 -0
  9. package/blog/images/Iteration.png +0 -0
  10. package/blog/images/RAD.png +0 -0
  11. package/docs/academy/01-GetStarted/00-GetStarted.mdx +181 -0
  12. package/docs/academy/01-GetStarted/01_InstallDemoPackage.md +38 -0
  13. package/docs/academy/01-GetStarted/02-ToDoList/01-CreateNewPowerhouseProject.md +97 -0
  14. package/docs/academy/01-GetStarted/02-ToDoList/02-DefineToDoListDocumentModel.md +86 -0
  15. package/docs/academy/01-GetStarted/02-ToDoList/03-ImplementOperationReducers.md +201 -0
  16. package/docs/academy/01-GetStarted/02-ToDoList/04-BuildToDoListEditor.md +494 -0
  17. package/docs/academy/01-GetStarted/02-ToDoList/_category_.json +8 -0
  18. package/docs/academy/01-GetStarted/02-ToDoList/images/DocumentModelHeader.png +0 -0
  19. package/docs/academy/01-GetStarted/02-ToDoList/images/DocumentModelOperations.png +0 -0
  20. package/docs/academy/01-GetStarted/02-ToDoList/images/OpenDocumentModelEditor.gif +0 -0
  21. package/docs/academy/01-GetStarted/02-ToDoList/images/completeEditor.png +0 -0
  22. package/docs/academy/01-GetStarted/02-ToDoList/images/connectApp.gif +0 -0
  23. package/docs/academy/01-GetStarted/02-ToDoList/images/form.png +0 -0
  24. package/docs/academy/01-GetStarted/02-ToDoList/images/mytodolist.gif +0 -0
  25. package/docs/academy/01-GetStarted/02-ToDoList/images/reducers.png +0 -0
  26. package/docs/academy/01-GetStarted/02-ToDoList/images/vscode.png +0 -0
  27. package/docs/academy/01-GetStarted/styles.module.css +99 -0
  28. package/docs/academy/02-AdvancedTutorial/01-Create/00-BuilderTools.md +234 -0
  29. package/docs/academy/02-AdvancedTutorial/01-Create/01-SetupBuilderEnvironment.md +247 -0
  30. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/04-UtilitiesAndTips.md +79 -0
  31. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/01-SetupBuilderEnvironment.md +216 -0
  32. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/02-CreateNewPowerhouseProject.md +78 -0
  33. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/03-DefineChatroomDocumentModel.md +139 -0
  34. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/04-ImplementOperationReducers.md +364 -0
  35. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/05-ImplementChatroomEditor.md +194 -0
  36. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/06-LaunchALocalReactor.md +15 -0
  37. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/_category_.json +8 -0
  38. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-1.png +0 -0
  39. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-2.png +0 -0
  40. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-3.png +0 -0
  41. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-4.png +0 -0
  42. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-5.png +0 -0
  43. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image.png +0 -0
  44. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/ChatRoomConnectApp.gif +0 -0
  45. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/ChatRoomTest.gif +0 -0
  46. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/completeEditor.png +0 -0
  47. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/form.png +0 -0
  48. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/reducers.png +0 -0
  49. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/vscode.png +0 -0
  50. package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/_category_.json +8 -0
  51. package/docs/academy/02-AdvancedTutorial/01-Create/02-StandardDocumentModelWorkflow.md +229 -0
  52. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/01-BuildingBeautifulDocumentEditors.md +109 -0
  53. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/02-ConfiguringDrives.md +51 -0
  54. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/03-BuildingADriveExplorer.md +174 -0
  55. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/01-OperationHistory.md +67 -0
  56. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/02-RevisionHistoryTimeline.md +132 -0
  57. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/_category_.json +7 -0
  58. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/images/committer-address-popup.png +0 -0
  59. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/images/revision-hash-popup.png +0 -0
  60. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/images/revision-history-list.png +0 -0
  61. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/images/signature-details-popup.png +0 -0
  62. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/_category_.json +8 -0
  63. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/images/CreateDrive.png +0 -0
  64. package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/images/mytodolist.gif +0 -0
  65. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/01-ReadingAndWritingThroughTheAPI.mdx +121 -0
  66. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/02-GraphQLAtPowerhouse.md +156 -0
  67. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/03-WorkingWithSubgraphs/02-GraphQLAndSubgraphs.mdx +119 -0
  68. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/03-WorkingWithSubgraphs/03-WorkingWithSubgraphs.md +312 -0
  69. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/03-WorkingWithSubgraphs/_category_.json +8 -0
  70. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/04-analytics-processor.md +342 -0
  71. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/01-SetupBuilderEnvironment.md +215 -0
  72. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/02-CreateNewPowerhouseProject.md +55 -0
  73. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/03-GenerateAnAnalyticsProcessor.md +173 -0
  74. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/04-UpdateAnalyticsProcessor.md +223 -0
  75. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/_category_.json +8 -0
  76. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-SPV.gif +0 -0
  77. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-a-new-asset.png +0 -0
  78. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-a-transaction.gif +0 -0
  79. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Transaction-table.png +0 -0
  80. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/create-a-new-RWA-document.gif +0 -0
  81. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/granularity.png +0 -0
  82. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/QueryingADocumentWithGraphQL.md +244 -0
  83. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/listener-raw.png +0 -0
  84. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/raw-reports1.png +0 -0
  85. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/raw-reports2.png +0 -0
  86. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/rwaRegister.png +0 -0
  87. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/apse.png +0 -0
  88. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/best-practices.md +60 -0
  89. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/filter.png +0 -0
  90. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/filteroptions.png +0 -0
  91. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/graphql/index.md +166 -0
  92. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/graphql/integration.md +75 -0
  93. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/dbs.png +0 -0
  94. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/high-level.jpg +0 -0
  95. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/indexeddb.png +0 -0
  96. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/libs-core.jpg +0 -0
  97. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/libs.jpg +0 -0
  98. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/lod.jpg +0 -0
  99. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/logo.png +0 -0
  100. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/navbar.png +0 -0
  101. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-1.jpg +0 -0
  102. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-2.jpg +0 -0
  103. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-3.jpg +0 -0
  104. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-4.jpg +0 -0
  105. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-5.jpg +0 -0
  106. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-6.jpg +0 -0
  107. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/paths-1.jpg +0 -0
  108. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/paths-2.jpg +0 -0
  109. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/intro.md +149 -0
  110. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/benchmarks.md +27 -0
  111. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/browser.md +77 -0
  112. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/compatibility.md +14 -0
  113. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/index.md +230 -0
  114. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/memory.md +72 -0
  115. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/pg.md +63 -0
  116. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/schema.md +14 -0
  117. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/utilities.md +102 -0
  118. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/use-cases/index.md +7 -0
  119. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/use-cases/maker.md +652 -0
  120. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/use-cases/processors.md +3 -0
  121. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/_category_.json +8 -0
  122. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/images/OperationHistory.png +0 -0
  123. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/images/OperationsQuery.png +0 -0
  124. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/images/QueryDocumentID.png +0 -0
  125. package/docs/academy/02-AdvancedTutorial/04-WorkWithData/images/SwitchboardButton.png +0 -0
  126. package/docs/academy/02-AdvancedTutorial/05-Launch/00-IntegrateInAFront-End +3 -0
  127. package/docs/academy/02-AdvancedTutorial/05-Launch/01-IntroducingFusion +18 -0
  128. package/docs/academy/02-AdvancedTutorial/05-Launch/02-IntroductionToPackages.md +79 -0
  129. package/docs/academy/02-AdvancedTutorial/05-Launch/02-PublishYourProject.md +230 -0
  130. package/docs/academy/02-AdvancedTutorial/05-Launch/03-RunOnACloudServer.md +279 -0
  131. package/docs/academy/02-AdvancedTutorial/05-Launch/03-SetupEnvironment.md +436 -0
  132. package/docs/academy/02-AdvancedTutorial/05-Launch/04-GraphQLNamespacing +44 -0
  133. package/docs/academy/02-AdvancedTutorial/05-Launch/05-LaunchYourBackend.md +3 -0
  134. package/docs/academy/02-AdvancedTutorial/05-Launch/06-LaunchYourFrontend.md +3 -0
  135. package/docs/academy/02-AdvancedTutorial/05-Launch/_category_.json +8 -0
  136. package/docs/academy/02-AdvancedTutorial/05-Launch/images/SSHConnection.png +0 -0
  137. package/docs/academy/02-AdvancedTutorial/05-Launch/images/homedesign.png +0 -0
  138. package/docs/academy/02-AdvancedTutorial/05-Launch/images/keyconcepts.png +0 -0
  139. package/docs/academy/02-AdvancedTutorial/05-Launch/images/tutorialschema.png +0 -0
  140. package/docs/academy/02-AdvancedTutorial/06-Authorization/Authorization.md +100 -0
  141. package/docs/academy/02-AdvancedTutorial/_category_.json +7 -0
  142. package/docs/academy/03-APIReferences/00-PowerhouseCLI.md +1 -0
  143. package/docs/academy/03-APIReferences/_category_.json +7 -0
  144. package/docs/academy/04-ComponentLibrary/01-PowerhouseDesignSystem.md +94 -0
  145. package/docs/academy/04-ComponentLibrary/02-BuildingWithScalars.md +54 -0
  146. package/docs/academy/04-ComponentLibrary/03-Scalar-Components/01-phid-field.mdx +72 -0
  147. package/docs/academy/04-ComponentLibrary/03-Scalar-Components/02-input-field.mdx +0 -0
  148. package/docs/academy/04-ComponentLibrary/04-Complex-Components/01-sidebar.mdx +36 -0
  149. package/docs/academy/04-ComponentLibrary/05-Layout-Components/01-test-toupdate.mdx +61 -0
  150. package/docs/academy/04-ComponentLibrary/06-Fragments/01-test-toupdate.mdx +61 -0
  151. package/docs/academy/04-ComponentLibrary/_category_.json +8 -0
  152. package/docs/academy/05-Architecture/00-PowerhouseArchitecture.md +50 -0
  153. package/docs/academy/05-Architecture/01-WorkingWithTheReactor.md +48 -0
  154. package/docs/academy/05-Architecture/02-ReferencingMonorepoPackages +65 -0
  155. package/docs/academy/05-Architecture/04-MovingBeyondCRUD +61 -0
  156. package/docs/academy/05-Architecture/05-DocumentModelTheory/01-WhatIsADocumentModel.md +188 -0
  157. package/docs/academy/05-Architecture/05-DocumentModelTheory/02-DAOandDocumentsModelsQ+A.md +177 -0
  158. package/docs/academy/05-Architecture/05-DocumentModelTheory/02-domain-modeling.md +103 -0
  159. package/docs/academy/05-Architecture/05-DocumentModelTheory/03-BenefitsOfDocumentModels.md +95 -0
  160. package/docs/academy/05-Architecture/05-DocumentModelTheory/05-best-practices.md +257 -0
  161. package/docs/academy/05-Architecture/05-DocumentModelTheory/_category_.json +8 -0
  162. package/docs/academy/05-Architecture/05-DocumentModelTheory/three-data-layers.png +0 -0
  163. package/docs/academy/05-Architecture/_category_.json +7 -0
  164. package/docs/academy/05-Architecture/images/image.png +0 -0
  165. package/docs/academy/06-Cookbook.md +905 -0
  166. package/docs/academy/07-Glossary.md +50 -0
  167. package/docs/bookofpowerhouse/01-Overview.md +29 -0
  168. package/docs/bookofpowerhouse/02-GeneralFrameworkAndPhilosophy.md +15 -0
  169. package/docs/bookofpowerhouse/03-PowerhouseSoftwareArchitecture.md +33 -0
  170. package/docs/bookofpowerhouse/04-DevelopmentApproaches.md +36 -0
  171. package/docs/bookofpowerhouse/05-SNOsandANewModelForOSSandPublicGoods.md +73 -0
  172. package/docs/bookofpowerhouse/06-SNOsInActionAndPlatformEconomies.md +17 -0
  173. package/docs/renown/01-intro.md +18 -0
  174. package/docs/renown/02-renown-login-flow.md +60 -0
  175. package/docusaurus +0 -0
  176. package/docusaurus.config.ts +170 -0
  177. package/package.json +50 -0
  178. package/powerhouse-docs@0.0.0 +0 -0
  179. package/sidebars.ts +33 -0
  180. package/src/components/HomepageFeatures/index.tsx +250 -0
  181. package/src/components/HomepageFeatures/styles.module.css +267 -0
  182. package/src/css/custom.css +450 -0
  183. package/src/pages/index.module.css +37 -0
  184. package/src/pages/index.tsx +42 -0
  185. package/src/pages/markdown-page.md +7 -0
  186. package/static/.nojekyll +0 -0
  187. package/static/fonts/FranieBold.otf +0 -0
  188. package/static/fonts/FranieRegular.otf +0 -0
  189. package/static/img/Powerhouse Website Drive.png +0 -0
  190. package/static/img/Powerhouse Website Storage Layer (1).png +0 -0
  191. package/static/img/Powerhouse Website Storage Layer.png +0 -0
  192. package/static/img/Powerhouse-main-light.svg +13 -0
  193. package/static/img/Powerhouse-main.svg +13 -0
  194. package/static/img/Renown Intro Diagram.png +0 -0
  195. package/static/img/Union.svg +3 -0
  196. package/static/img/academy/icons/Advanced.svg +4 -0
  197. package/static/img/academy/icons/Book.svg +5 -0
  198. package/static/img/academy/icons/Cookbook.svg +3 -0
  199. package/static/img/academy/icons/Create.svg +3 -0
  200. package/static/img/academy/icons/Data.svg +3 -0
  201. package/static/img/academy/icons/Editor.svg +3 -0
  202. package/static/img/academy/icons/Flash.svg +3 -0
  203. package/static/img/academy/icons/Launch.svg +3 -0
  204. package/static/img/academy-icon.png +0 -0
  205. package/static/img/connect-icon.png +0 -0
  206. package/static/img/connect.png +0 -0
  207. package/static/img/docusaurus-social-card.jpg +0 -0
  208. package/static/img/docusaurus.png +0 -0
  209. package/static/img/empty-background.png +0 -0
  210. package/static/img/favicon.ico +0 -0
  211. package/static/img/fusion-icon.png +0 -0
  212. package/static/img/fusion.png +0 -0
  213. package/static/img/ph-icon-light.svg +3 -0
  214. package/static/img/powerhouse-layer.png +0 -0
  215. package/static/img/powerhouse-storage-layer.png +0 -0
  216. package/static/img/reactor.png +0 -0
  217. package/static/img/renown-icon.png +0 -0
  218. package/static/img/renown.png +0 -0
  219. package/static/img/switchboard-icon.png +0 -0
  220. package/static/img/switchboard.png +0 -0
  221. package/static/img/undraw_docusaurus_mountain.svg +171 -0
  222. package/static/img/undraw_docusaurus_react.svg +170 -0
  223. package/static/img/undraw_docusaurus_tree.svg +40 -0
  224. package/static/img/video-placeholder.svg +16 -0
  225. package/static.json +7 -0
  226. package/tsconfig.json +7 -0
@@ -0,0 +1,94 @@
1
+ # Powerhouse Design System
2
+
3
+ The reusable components are a set of of front-end components based on graphQL scalars.
4
+ Powerhouse also has a set of custom scalars that are not part of the graphQL standard but are specific to the web3 ecosystem.
5
+ These components are offered through the **Powerhouse Design System** with the help of storybook & the Academy documentation.
6
+
7
+ It provides a collection of pre-built, reusable UI components designed for consistency and efficiency across Powerhouse applications and editors. Think of it as a toolkit of standard UI elements like buttons, inputs, and checkboxes with many of these components based on graphql scalars.
8
+
9
+ :::info
10
+ A GraphQL scalar is essentially a primitive, indivisible value in the GraphQL type system.
11
+ Here are the key points to understand:
12
+
13
+ - **Basic Building Blocks:** Scalars are the basic data types—like String, Int, Float, Boolean, and ID—that represent atomic values.
14
+ - **Leaf Nodes:** Scalars are the "leaves" of a GraphQL query. They can't have any sub-fields, meaning once you hit a scalar in a query, that's the final value.
15
+ - **Custom Scalars:** Besides the built-in scalars, you can define custom scalars (e.g., a Date type) if you need to handle more specific formats or validations. Powerhouse does this specific for the web3 ecosystem.
16
+ :::
17
+
18
+ In the next few chapters of our documentation, we will start with the simplest scalar components first, then move on to more complex, Powerhouse-specific components, and combine these in the Layout components.
19
+
20
+ ## **3 types of components**
21
+
22
+ 1. **Simple Component** has a scalar value as input
23
+ - Component, Composition of smaller UI controls (e.g. Scalar component)
24
+
25
+ 2. **Complex Component** has an object/array value
26
+ - Group of components (e.g. sidebar tree view)
27
+
28
+ 3. **Layout Component** will contain other components
29
+ - Containers for other components, Sections (e.g. list of other components, color layouts, etc.)
30
+
31
+ The documentation of each of the reusable components in the Academy documentation will be structured as follows:
32
+
33
+ 1. **Component Context**
34
+ 2. **Scalar Definition**
35
+ 3. **Component Storybook Base Example**
36
+ - Component Code
37
+ - Component Default Props
38
+ 4. **Component Storybook Usage Examples**
39
+
40
+ ## Exploring Components with Storybook
41
+
42
+ We use Storybook as an interactive catalog for our design system components. It allows you to visually explore each component, interact with different states, and understand how to integrate them into your projects.
43
+
44
+ [https://storybook.powerhouse.academy](https://storybook.powerhouse.academy)
45
+
46
+ **Understanding the Storybook Interface:**
47
+
48
+ 1. **Visual Demo:** The main panel shows the rendered component (e.g., a `Checkbox`). You can interact with it directly to see different states (checked, unchecked, disabled).
49
+ 2. **Usage Snippet:** Below the demo, you'll typically find a basic code example demonstrating how to include the component in your code (e.g., `<Checkbox defaultValue label="Accept terms and conditions" />`). This provides a starting point for implementation.
50
+ 3. **Props Table:** Further down, a table lists the properties (`props`) the component accepts. Props are like settings or configuration options. For the `Checkbox`, this table would show props like `label`, `defaultValue`, `value`, `onChange`, etc., often with descriptions of what they control.
51
+
52
+ ## Implementing a Design System Component
53
+
54
+ Let's walk through the typical workflow for using a component from the design system, using the `Checkbox` from the [To-do List editor](/docs/academy/GetStarted/ToDoList/BuildToDoListEditor).
55
+
56
+ 1. **Identify the Need:** While building your feature (e.g., the To-do List editor in `editor.tsx`), you determine the need for a standard UI element, like a checkbox.
57
+ 2. **Consult the Resuable Components in Academy or in Storybook:**
58
+ * Open the Powerhouse Storybook instance.
59
+ * Navigate or search to find the `Checkbox` component.
60
+ * Review the visual examples and interactive demo.
61
+ * Examine the "Usage" snippet and the **Props table** to understand the basic implementation and available configuration options (`label`, `value`, `onChange`, etc.).
62
+ 3. **Import the Component:** In your code editor, open the relevant file (e.g., `editors/to-do-list/editor.tsx`). Add an import statement at the top to bring the component into your file's scope:
63
+ ```typescript
64
+ import { Checkbox } from '@powerhousedao/design-system/scalars';
65
+ // Or import other components as needed:
66
+ // import { Checkbox, InputField, Button } from '@powerhousedao/design-system/scalars';
67
+ ```
68
+ This line instructs the build process to locate the `Checkbox` component within the installed `@powerhousedao/design-system/scalars` package and make it available for use.
69
+ 4. **Use and Configure the Component:** Place the component tag in your JSX where needed. Use the information from Storybook (usage snippet and props table) as a guide, but adapt the props to your specific requirements within `editor.tsx`:
70
+ ```typescript
71
+ // Example from the To-do List Editor:
72
+ <Checkbox
73
+ // Bind the checked state to data within editor.tsx
74
+ value={item.checked}
75
+ // Provide a function from editor.tsx to handle changes
76
+ onChange={() => {
77
+ dispatch(actions.updateTodoItem({
78
+ id: item.id,
79
+ checked: !item.checked,
80
+ }));
81
+ }}
82
+ // Other props like 'label' might be omitted or added as needed.
83
+ />
84
+ ```
85
+ You configure the component's appearance and behavior by passing the appropriate values to its props.
86
+ 5. **Test and Refine:** Run your application (e.g., using `ph connect`) to see the component in context. Verify its appearance and functionality.
87
+
88
+ **Storybook vs. Source Code:**
89
+
90
+ Storybook serves as essential documentation and a usage guide. Our developers write Storybook "stories" to demonstrate components and document their common props. However, the **ultimate source of truth** for a component's capabilities is its actual source code (e.g., the `.tsx` file within the `@powerhousedao/design-system/scalars` package).
91
+ While Storybook aims for accuracy, there might occasionally be discrepancies or undocumented props.
92
+
93
+ Please don't hesitate to reach out in our discord channels with any questions.
94
+ Happy designing!
@@ -0,0 +1,54 @@
1
+ # Build with Scalars
2
+
3
+ Scalars are here to help you define custom fields in your document model schema and speed up the development process.
4
+ There are two applications of scalar components in the document model workflow:
5
+
6
+ 1. At the **schema definition** level where you build your schema and write your GraphQL state schema.
7
+ 2. At the **frontend / react** level where you import it and place it in your UI to represent the scalar field
8
+
9
+ ## Scalar Definition in the Document Model Schema
10
+
11
+ As you might know, the document model schema defines the structure of the document and serves as the backbone of the document model. The GraphQL state schema defines how data is captured with the help of types & scalars. When you define a scalar in the document model schema, you are essentially defining a new field that can be used in the document model to capture data.
12
+
13
+ In the Document Model Editor, you can find all the custom scalar types available in our documentation under the 'Scalars' section.
14
+
15
+ Insert image of the feature.
16
+
17
+ ````
18
+ scalar PHID <-- imported from the design system library? not sure
19
+ type MyType {
20
+ myScalar: PHID
21
+ }
22
+ ````
23
+
24
+ ## React Component Implementation in the Frontend
25
+
26
+ All of our reusable components are available in the design system library or package.
27
+ This package comes as a dependency in your project when creating a new document model project.
28
+ ````
29
+ import PHIDField from 'design-system'
30
+ const reactComponent = () => {
31
+
32
+ return (
33
+ <div>
34
+ <PHIDField
35
+ fetchOptionsCallback={function Js(){}}
36
+ fetchSelectedOptionCallback={function Js(){}}
37
+ label="PHID field"
38
+ name="phid-field"
39
+ placeholder="phd:"
40
+ />
41
+
42
+ </div>
43
+
44
+ )
45
+
46
+ }
47
+ ````
48
+
49
+ ## Scalars & Reusable Components
50
+
51
+ To make your life easier, Powerhouse has defined all useful scalars with a set of reusable code and UI components.
52
+ The reusable components are essentially a set of front-end components based on GraphQL scalars. Powerhouse also has a set of custom scalars that are not part of the GraphQL standard but are specific to the web3 ecosystem.
53
+
54
+ Read the next chapter to get familiar with our reusable components.
@@ -0,0 +1,72 @@
1
+ ---
2
+ sidebar_label: 'PHID Field'
3
+ sidebar_position: 1
4
+ ---
5
+
6
+ import { Tabs, TabItem } from '@theme/Tabs';
7
+
8
+ # PHID Field Example
9
+
10
+ ### **Scalar Definition**
11
+
12
+ - **Name:** `PHID` (Powerhouse ID)
13
+ - **Purpose:** Represents a unique identifier pointing to a document, branch, scope, or data object within the Powerhouse system.
14
+
15
+
16
+ <details>
17
+ <summary>**Formatting of the component:**</summary>
18
+ - **Basic Notation:** `phd:<documentID>`
19
+ - **Branch and Scope:** Optional components appended using colons `:`.
20
+ - **Full Notation:** `phd:<documentID>:<branch>:<scope>`
21
+ - **Branch:** Defaults to `main` if omitted.
22
+ - **Scope:** Defaults to `public` if omitted.
23
+ - **Data Object Reference:** `phd:<documentID>/<dataObjectID>`
24
+ - **URL Format:** `phd://<domain>/<documentID>`
25
+ - Example: `phd://switchboard.powerhouse.xyz/baefc2a4-f9a0-4950-8161-fd8d8cc7dea9`
26
+
27
+ **Examples of the component formatting:**
28
+ - **Basic PHID:** `phd:baefc2a4-f9a0-4950-8161-fd8d8cc7dea9`
29
+ - **With Branch:** `phd:baefc2a4...:draft`
30
+ - **With Scope:** `phd:baefc2a4...::local`
31
+ - **With Branch and Scope:** `phd:baefc2a4...:draft:local`
32
+ - **With Data Object ID:** `phd:baefc2a4.../3cf05e40...`
33
+ </details>
34
+
35
+ <details>
36
+ <summary>**Validation of the Component:**</summary>
37
+ - **Validate each format:**
38
+ 1. **PHID only:** Ensure the document ID is a valid UUID.
39
+ 2. **PHID with data element (OID):** Validate both the document ID and the data object ID.
40
+ 3. **PHID with branch:** Validate the document ID and check if the branch is properly formatted.
41
+ 4. **PHID with scope:** Validate the document ID and check if the scope is valid.
42
+ 5. **PHID with branch and scope:** Validate all three components: document ID, branch, and scope.
43
+ - **Error Message Example:** "Invalid PHID format. Please check the document ID, branch, or scope."
44
+ </details>
45
+
46
+ The following is a the UI component for the PHID field and scalar in a storybook.
47
+ We use Storybook as our component development environment.
48
+ It allows us to build and test UI components in isolation, making it easier to develop, test, and document reusable components.
49
+ In our stories you'll find first find a basic UI implementation example of the component, followed by the component's properties, events, and validation options.
50
+
51
+ - A list of the **default properties** and their descriptions, and a list of the available events that can be triggered.
52
+ - A list of the **component's specific properties** and attributes based on the components functionality.
53
+ - A list of **validation options**, or ways to validate the component's desired input values.
54
+
55
+ Additionally, you'll find various **stories of the components in different states**.
56
+
57
+ <div style={{
58
+ border: '1px solid #E5E7EB',
59
+ borderRadius: '8px',
60
+ padding: '16px',
61
+ marginBottom: '20px',
62
+ }}>
63
+ <iframe
64
+ src="https://storybook.powerhouse.academy/iframe.html?id=document-engineering-scalars-phid-field&viewMode=story"
65
+ style={{
66
+ width: '100%',
67
+ height: '4500px',
68
+ border: 'none',
69
+ }}
70
+ title="PhidField Component Demo"
71
+ />
72
+ </div>
@@ -0,0 +1,36 @@
1
+ import { Tabs, TabItem } from '@theme/Tabs';
2
+
3
+ # Sidebar
4
+
5
+ ### **Scalar Definition**
6
+
7
+ - **Name:** `Sidebar`
8
+ - **Purpose:** The Sidebar component can be used within a page layout to provide a sidebar navigation. It provided a tree structure of nodes that can be used to navigate the application offering customization, search and more.
9
+
10
+
11
+ <details>
12
+ <summary>**Formatting of the component:**</summary>
13
+
14
+ </details>
15
+
16
+ <details>
17
+ <summary>**Validation of the Component:**</summary>
18
+
19
+ </details>
20
+
21
+ <div style={{
22
+ border: '1px solid #E5E7EB',
23
+ borderRadius: '8px',
24
+ padding: '16px',
25
+ marginBottom: '20px',
26
+ }}>
27
+ <iframe
28
+ src="https://dspot-scalars-storybook.vercel.app/iframe.html?args=&id=document-engineering-complex-components-sidebar--readme&viewMode=story"
29
+ style={{
30
+ width: '100%',
31
+ height: '2000px',
32
+ border: 'none',
33
+ }}
34
+ title="Sidebar Component Demo"
35
+ />
36
+ </div>
@@ -0,0 +1,61 @@
1
+ ---
2
+ sidebar_label: 'PHID Field'
3
+ sidebar_position: 1
4
+ ---
5
+
6
+ import { Tabs, TabItem } from '@theme/Tabs';
7
+
8
+ # PHID Field Example
9
+
10
+ ### **Scalar Definition**
11
+
12
+ - **Name:** `PHID` (Powerhouse ID)
13
+ - **Purpose:** Represents a unique identifier pointing to a document, branch, scope, or data object within the Powerhouse system.
14
+
15
+
16
+ <details>
17
+ <summary>**Formatting of the component:**</summary>
18
+ - **Basic Notation:** `phd:<documentID>`
19
+ - **Branch and Scope:** Optional components appended using colons `:`.
20
+ - **Full Notation:** `phd:<documentID>:<branch>:<scope>`
21
+ - **Branch:** Defaults to `main` if omitted.
22
+ - **Scope:** Defaults to `public` if omitted.
23
+ - **Data Object Reference:** `phd:<documentID>/<dataObjectID>`
24
+ - **URL Format:** `phd://<domain>/<documentID>`
25
+ - Example: `phd://switchboard.powerhouse.xyz/baefc2a4-f9a0-4950-8161-fd8d8cc7dea9`
26
+
27
+ **Examples of the component formatting:**
28
+ - **Basic PHID:** `phd:baefc2a4-f9a0-4950-8161-fd8d8cc7dea9`
29
+ - **With Branch:** `phd:baefc2a4...:draft`
30
+ - **With Scope:** `phd:baefc2a4...::local`
31
+ - **With Branch and Scope:** `phd:baefc2a4...:draft:local`
32
+ - **With Data Object ID:** `phd:baefc2a4.../3cf05e40...`
33
+ </details>
34
+
35
+ <details>
36
+ <summary>**Validation of the Component:**</summary>
37
+ - **Validate each format:**
38
+ 1. **PHID only:** Ensure the document ID is a valid UUID.
39
+ 2. **PHID with data element (OID):** Validate both the document ID and the data object ID.
40
+ 3. **PHID with branch:** Validate the document ID and check if the branch is properly formatted.
41
+ 4. **PHID with scope:** Validate the document ID and check if the scope is valid.
42
+ 5. **PHID with branch and scope:** Validate all three components: document ID, branch, and scope.
43
+ - **Error Message Example:** "Invalid PHID format. Please check the document ID, branch, or scope."
44
+ </details>
45
+
46
+ <div style={{
47
+ border: '1px solid #E5E7EB',
48
+ borderRadius: '8px',
49
+ padding: '16px',
50
+ marginBottom: '20px',
51
+ }}>
52
+ <iframe
53
+ src="https://dspot-scalars-storybook.vercel.app/iframe.html?args=name:amount-field;placeholder:test;label:Enter%20Amount%20and%20Select%20Currency;type:Amount;placeholderSelect:CUR;allowedTokens:!null;tokenIcons.Sol:1;value.amount:3454564564;value.currency:BTC&id=document-engineering-simple-components-phid-field--readme&viewMode=story"
54
+ style={{
55
+ width: '100%',
56
+ height: '4500px',
57
+ border: 'none',
58
+ }}
59
+ title="PhidField Component Demo"
60
+ />
61
+ </div>
@@ -0,0 +1,61 @@
1
+ ---
2
+ sidebar_label: 'PHID Field'
3
+ sidebar_position: 1
4
+ ---
5
+
6
+ import { Tabs, TabItem } from '@theme/Tabs';
7
+
8
+ # PHID Field Example
9
+
10
+ ### **Scalar Definition**
11
+
12
+ - **Name:** `PHID` (Powerhouse ID)
13
+ - **Purpose:** Represents a unique identifier pointing to a document, branch, scope, or data object within the Powerhouse system.
14
+
15
+
16
+ <details>
17
+ <summary>**Formatting of the component:**</summary>
18
+ - **Basic Notation:** `phd:<documentID>`
19
+ - **Branch and Scope:** Optional components appended using colons `:`.
20
+ - **Full Notation:** `phd:<documentID>:<branch>:<scope>`
21
+ - **Branch:** Defaults to `main` if omitted.
22
+ - **Scope:** Defaults to `public` if omitted.
23
+ - **Data Object Reference:** `phd:<documentID>/<dataObjectID>`
24
+ - **URL Format:** `phd://<domain>/<documentID>`
25
+ - Example: `phd://switchboard.powerhouse.xyz/baefc2a4-f9a0-4950-8161-fd8d8cc7dea9`
26
+
27
+ **Examples of the component formatting:**
28
+ - **Basic PHID:** `phd:baefc2a4-f9a0-4950-8161-fd8d8cc7dea9`
29
+ - **With Branch:** `phd:baefc2a4...:draft`
30
+ - **With Scope:** `phd:baefc2a4...::local`
31
+ - **With Branch and Scope:** `phd:baefc2a4...:draft:local`
32
+ - **With Data Object ID:** `phd:baefc2a4.../3cf05e40...`
33
+ </details>
34
+
35
+ <details>
36
+ <summary>**Validation of the Component:**</summary>
37
+ - **Validate each format:**
38
+ 1. **PHID only:** Ensure the document ID is a valid UUID.
39
+ 2. **PHID with data element (OID):** Validate both the document ID and the data object ID.
40
+ 3. **PHID with branch:** Validate the document ID and check if the branch is properly formatted.
41
+ 4. **PHID with scope:** Validate the document ID and check if the scope is valid.
42
+ 5. **PHID with branch and scope:** Validate all three components: document ID, branch, and scope.
43
+ - **Error Message Example:** "Invalid PHID format. Please check the document ID, branch, or scope."
44
+ </details>
45
+
46
+ <div style={{
47
+ border: '1px solid #E5E7EB',
48
+ borderRadius: '8px',
49
+ padding: '16px',
50
+ marginBottom: '20px',
51
+ }}>
52
+ <iframe
53
+ src="https://dspot-scalars-storybook.vercel.app/iframe.html?args=name:amount-field;placeholder:test;label:Enter%20Amount%20and%20Select%20Currency;type:Amount;placeholderSelect:CUR;allowedTokens:!null;tokenIcons.Sol:1;value.amount:3454564564;value.currency:BTC&id=document-engineering-simple-components-phid-field--readme&viewMode=story"
54
+ style={{
55
+ width: '100%',
56
+ height: '4500px',
57
+ border: 'none',
58
+ }}
59
+ title="PhidField Component Demo"
60
+ />
61
+ </div>
@@ -0,0 +1,8 @@
1
+ {
2
+ "label": "Component Library",
3
+ "position": 4,
4
+ "link": {
5
+ "type": "generated-index",
6
+ "description": "An overview of the components in the Powerhouse Component Library."
7
+ }
8
+ }
@@ -0,0 +1,50 @@
1
+ # Powerhouse Architecture
2
+
3
+ The Powerhouse ecosystem is built on five core host applications that together form a modular, scalable operating system for decentralized organizations. Each application serves a distinct role, yet they are interdependent, working as a unified system to streamline operations, enhance collaboration, and drive automation.
4
+
5
+ These five applications are:
6
+
7
+ 1. **Connect** – The contributor's public or private workspace.
8
+ 2. **Switchboard** – The data infrastructure and API engine.
9
+ 3. **Fusion** – The public-facing collaboration hub.
10
+ 4. **Renown** – The decentralized reputation and identity system.
11
+ 5. **Academy** – The onboarding and learning platform.
12
+
13
+ Each application is designed to be modular yet complementary, ensuring smooth data flows, structured collaboration, and scalable automation. The functionality of the four host apps offers an integrated experience for running decentralized operations.
14
+
15
+ ## How the Five Applications Work Together
16
+
17
+ The Powerhouse ecosystem functions as a decentralized operating system, where each of the four core applications works in synergy to ensure seamless collaboration, structured data management, and automated workflows. Each application has a distinct purpose, yet their interconnectivity is what makes the system powerful.
18
+
19
+ ### 1. Connect: The Contributor's Workspace and Data Capture Point
20
+
21
+ Connect is the entry point for individual contributors, where they install apps and packages tailored to specific business solutions, enabling collaboration in public or private settings.
22
+
23
+ - All work in Connect is captured as document models, ensuring that data is structured, traceable, and immediately available for processing.
24
+ - This structured data flows into Switchboard, making it accessible for analytics, automation, and API-driven integrations.
25
+ - Fusion then utilizes this data to generate dashboards, summaries, and insights for decision-making.
26
+ - Renown serves as the authentication and access gateway, ensuring that contributors can securely interact with the system.
27
+
28
+ ### 2. Switchboard: The Data Processing and Automation Engine
29
+
30
+ Switchboard acts as the central nervous system, ensuring that data flows efficiently between applications and powers real-time coordination.
31
+
32
+ - It ingests structured data from Connect and makes it available for further analysis, automation, and integrations.
33
+ - The API interface allows developers and data engineers to fuel the broader system, providing insights and feeding data-driven workflows.
34
+ - The processed data is then transmitted to Fusion, where it is transformed into dashboards, analytics, and key performance indicators (KPIs).
35
+
36
+ ### 3. Fusion: The Public Collaboration and Data Visualization Layer
37
+
38
+ Fusion serves as the public-facing marketplace and collaboration hub, allowing contributors and organizations to interact with structured data captured from Connect and processed through Switchboard.
39
+
40
+ - Fusion structures, summarizes, and visualizes key metrics, enabling users to make data-driven decisions.
41
+ - It pulls relevant operational insights, helping stakeholders navigate and act on real-time data.
42
+ - Users can directly access work completed in Connect, viewing reports, summaries, and discussions within Fusion's public and private environments.
43
+
44
+ ### 4. Renown: Authentication, Reputation, and Access Control
45
+
46
+ Renown is the trust and identity layer, ensuring security, reputation tracking, and access control across the ecosystem.
47
+
48
+ - It acts as the authentication gateway, determining who has permission to view, edit, or execute specific operations within the system.
49
+ - Every action performed in Connect is tracked in the document history, making it fully auditable through Switchboard.
50
+ - Fusion utilizes Renown to verify contributor credibility, ensuring that data-driven decisions are based on trusted and authenticated inputs.
@@ -0,0 +1,48 @@
1
+ # Working with the Reactor
2
+
3
+ :::tip
4
+ Document models are the common design pattern that is used for all documents and files.
5
+ DocSync is a decentralized synchronization protocol that is storage agnostic.
6
+
7
+ **Document Models** are _what_ is synced and **DocSync** is _how_ document models are synced.
8
+ But who is doing the syncing?
9
+
10
+ We call these participants **Reactors**.
11
+ :::
12
+
13
+ ### Powerhouse Reactors
14
+
15
+ **What is a Reactor?**
16
+ Powerhouse Reactors are the nodes in the network that store documents, resolve conflicts and rerun operations to verify document event histories. Reactors can be configured for local storage, centralized cloud storage or on a decentralized storage network. A Reactor is essentially a storage node used in Powerhouse's framework to handle documents and traditional files. It supports multiple storage solutions, including:
17
+
18
+ - **Local Storage**: For offline or on-device access.
19
+ - **Cloud Storage**: For centralized, scalable data management.
20
+ - **Decentralized Storage**: Such as Ceramic or IPFS, enabling distributed and blockchain-based storage options.
21
+
22
+ ### Core Functions of Reactors
23
+ - **Data Synchronization**: Reactors ensure that all data, whether local or distributed, remains up-to-date and consistent across the system.
24
+ - **Modular Storage Adapters**: They support integration with different storage backends depending on organizational needs.
25
+ - **Collaboration Support**: Reactors facilitate document sharing and peer-to-peer collaboration across contributors within the network.
26
+
27
+ :::tip
28
+ The DocSync protocol *sends updates from one reactor to another* - **smashing document operations into one another** - to ensure all data is synced.
29
+ :::
30
+
31
+ A **reactor** is responsible for storing data and resolving merge conflicts.
32
+ Editing data and submitting new operations must be done through Powerhouse's native applications (Connect, Switchboard, Fusion). Each instance of these applications contains a Reactor that is responsible for storing data and syncing data through DocSync. In other words, Powerhouse applications are how Reactors can be accessed, manipulated, steered, visualized and modified. A local Connect desktop application's reactor can therefore sync with the Reactor of a remote drive (e.g. Switchboard instance).
33
+
34
+ <img src="/img/Powerhouse Website Drive.png" alt="Powerhouse Storage Layer"/>
35
+
36
+ ### Why Are Reactors Important?
37
+ They are key to ensuring the scalability and resilience of decentralized operations.
38
+ By acting as the backbone for document models in the Powerhouse framework, they enable seamless version control and event-driven updates.
39
+ Reactors provide the foundation for advanced features like real-time collaboration, history tracking, and decentralized audits.
40
+ This modular, flexible infrastructure enables organizations to build efficient and robust decentralized systems, tailored for modern network organizations
41
+
42
+ ## Configuring your reactor
43
+
44
+ In addition to the choice of storage, Reactors also have other configurations.
45
+ - The **operational data** and **read models** associated with the document models inside a reactor allow to query the gathered data inside a document model or quickly visualize the crucial insights at a glance.
46
+ - **Listeners**, which continuously listen to any changes in a document model, help us to connect additional tools such as codegenerators and scripts to the reactors and the document models it holds
47
+
48
+ > Jump to: Configure a listener for your reactor and add a codegenerator
@@ -0,0 +1,65 @@
1
+ # Referencing Monorepo Packages
2
+
3
+ ## **Context**
4
+
5
+ In scenarios where a project is not part of the monorepo but needs to reference monorepo packages (e.g., using `@powerhousedeao/ph-cli`), there's a streamlined approach that avoids duplicating dependencies and maintains consistency with monorepo versions.
6
+
7
+ ---
8
+
9
+ ## **Approach**
10
+
11
+ ### **1. Using `link:` in `package.json`**
12
+
13
+ Instead of manually copying dependencies or trying complex build setups, you can use the `link:` protocol to create a symlink to the monorepo package.
14
+
15
+ ```json
16
+ {
17
+ "dependencies": {
18
+ "@powerhousedeao/ph-cli": "link:../monorepo/clis/ph-cli"
19
+ }
20
+ }
21
+ ```
22
+
23
+ This approach creates a symlink under the node_modules directory, linking directly to the specified monorepo package.
24
+
25
+ ### **2. Running the Linked CLI**
26
+
27
+ After linking, you can run the CLI tool using pnpm:
28
+
29
+ ```bash
30
+ pnpm install
31
+ pnpm run ../powerhouse/clis/ph-cli
32
+ ```
33
+
34
+ Alternatively, use the command through the linked CLI:
35
+
36
+ ```bash
37
+ ph connect
38
+ ```
39
+
40
+ This will invoke the connect package from the monorepo.
41
+
42
+ ### **3. Building Dependencies**
43
+
44
+ To ensure all dependencies are correctly built:
45
+
46
+ ```bash
47
+ nx run @powerhousedeao/ph-cli
48
+ ```
49
+
50
+ This command will build all necessary dependencies within the monorepo.
51
+
52
+ ### **4. Key Insights**
53
+
54
+ - **Symlink Simplicity:** The link: protocol is the least disruptive, as it avoids version conflicts and unnecessary duplication.
55
+ - **Development Workflow:** Changes made to the connect code in the monorepo will be picked up automatically when using the linked CLI, as ph-cli defers calls to the respective packages.
56
+
57
+ ### **5. Troubleshooting**
58
+
59
+ If dependencies aren't picked up correctly: Ensure the symlink path is accurate relative to the project root.
60
+
61
+ For isolated package builds: Use nx run to trigger specific package builds when needed.
62
+
63
+ ### **6. Conclusion**
64
+ Using link: is an effective, developer-friendly method to reference monorepo packages in external boilerplate projects. It supports efficient development workflows, reduces redundancy, and ensures consistency across environments.
65
+
@@ -0,0 +1,61 @@
1
+ # Moving Beyond CRUD
2
+
3
+ Powerhouse uses "single field operations" as granular actions that go beyond traditional CRUD (Create, Read, Update, Delete) operations.
4
+ In a basic CRUD framework, the focus is on making entire objects or records editable as a whole, often leading to oversimplified data management that can't easily handle complex workflows or state transitions.
5
+
6
+ ## What Are Single Field Operations?
7
+ These are focused, granular updates to individual fields within a document rather than treating the document as a whole. This approach allows for precise control and tracking of changes. For example:
8
+
9
+ - Setting a Document Number (simple string input)
10
+ - Changing Master Status (an enum dropdown selection)
11
+
12
+ Each of these operations targets only one field and has a corresponding form that collects and submits the new value.
13
+
14
+ ## Why go beyond CRUD?
15
+
16
+ ### Granular State Tracking:
17
+ Powerhouse's system emphasizes understanding how documents transition from one state to another in fine detail. By breaking down actions into specific field-level operations, it allows for tracking the exact sequence of changes, which is crucial for things like auditing, version control, and complex workflows.
18
+
19
+ ### Operational Focus:
20
+ The system is designed around the idea of operations themselves—not just the data they manipulate. While traditional CRUD frameworks might treat each field as independently updatable without any logic or process attached, Powerhouse assigns specific operations that can enforce business rules and state transitions.
21
+
22
+ ### Customization & Flexibility:
23
+ CRUD frameworks are often too rigid for real-world applications that need more nuanced behaviors. Powerhouse offers both the simplicity of CRUD for standard operations and the ability to go deeper, defining more complex, field-specific operations when needed. This hybrid approach ensures flexibility without sacrificing systematic structure.
24
+
25
+ ### Automation Potential:
26
+ Even though creating these granular operations might seem tedious, the goal is to build a system where standard CRUD operations can eventually be auto-generated, leaving developers to focus only on defining the exceptional, non-standard behaviors.
27
+
28
+ ### Improved Permissions and User Intent:
29
+ By having specific operations tied to individual fields, it becomes easier to manage permissions (e.g., who can change the master status but not the content) and to capture user intent more precisely, which is valuable in complex collaborative environments.
30
+
31
+
32
+ ## Understanding the Code Example
33
+
34
+ ![Alt text for the image](./images/image.png)
35
+
36
+ | `SetDocNumberForm.tsx` (StringField) | `SetMasterStatusForm.tsx` (EnumField) |
37
+ |-------------------------------------|---------------------------------------|
38
+ | **Purpose:** To update the document number (a string field).<br /><br />**How it works:**<br />- A form is rendered with a StringField input<br />- The defaultValue comes from the document model (props.defaultValue.docNo)<br />- On submit (or onBlur), the new document number is dispatched via the dispatch function<br />- It uses a generic onSubmit handler that processes the collected input and triggers the document update<br /><br />**Key takeaway:**<br />- This is a simple, single field form that maps a scalar string to a reusable component (StringField)<br />- The form structure is systematic: label, name, placeholder, and onBlur event handler | **Purpose:** To update the master status (an enum field).<br /><br />**How it works:**<br />- A form is rendered with an EnumField dropdown<br />- The dropdown options are enum values like "APPROVED", "DEFERRED", etc.<br />- The default value is pre-filled from props.defaultValue.masterStatus<br />- On change, the form dispatches the updated status<br /><br />**Key takeaway:**<br />- This form uses an EnumField component, showcasing how different scalar types (in this case, enums) map to different input components<br />- Options are provided systematically, meaning they could potentially be auto-generated from the document model |
39
+
40
+
41
+
42
+ ## Why Is This Granular Approach Important?
43
+ 1. **Systematic Yet Customizable:**
44
+ Even we are manually building these forms now, the structure is simple and repeatable:
45
+ - Identify the scalar type (string, enum, etc.).
46
+ - Map it to a reusable component.
47
+ - Use a standardized form structure with an onSubmit handler and a dispatch function.
48
+ 2. **Auto-Generation Potential:**
49
+ The systematic nature of these forms means they could be automatically generated in the future.
50
+ - For example, if a field is identified as a string, the system could auto-generate a form using a StringField.
51
+ - For enums, it could auto-generate the EnumField with all valid options.
52
+
53
+
54
+ ## How to implement single field operations
55
+
56
+ ### At the schema definition level
57
+
58
+ ### At the frontend level
59
+
60
+
61
+