@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,216 @@
1
+
2
+ # Setup Builder Environment
3
+
4
+ Let's set up your computer to start building your first Document Model. Don't worry if this is your first time setting up a development environment - we'll guide you through each step!
5
+
6
+ :::warning
7
+ If you've already setup git, node, and npm, your most important step is to install the Powerhouse CLI with the command `npm install ph-cmd`. A global install is recommended if you want to use the command from any directory as a power user. The Powerhouse CLI is used to create, build, and run your Document Models and give you direct access to a series of Powerhouse ecosystem tools.
8
+ :::
9
+
10
+ ## Table of Contents
11
+ - [Prerequisites](#prerequisites)
12
+ - [Installing node.js 22](#installing-nodejs)
13
+ - [For Windows](#for-windows)
14
+ - [For macOS](#for-macos)
15
+ - [For Linux (Ubuntu/Debian)](#for-linux-ubuntudebian)
16
+ - [Installing Visual Studio Code](#installing-visual-studio-code)
17
+ - [For Windows](#for-windows-1)
18
+ - [For macOS](#for-macos-1)
19
+ - [For Linux (Ubuntu/Debian)](#for-linux-ubuntudebian-1)
20
+ - [Install Git](#install-git)
21
+ - [For Windows](#for-windows-2)
22
+ - [For macOS](#for-macos-2)
23
+ - [For Linux (Ubuntu/Debian)](#for-linux-ubuntudebian-2)
24
+ - [Configure Git](#configure-git-all-systems)
25
+ - [Verify Installation](#verify-installation)
26
+
27
+ ## Prerequisites
28
+
29
+ Before we begin building our Document Model, we need to install some software on your computer. We'll need three main tools: node.js 22, which helps us run our code, Visual Studio Code (VS Code), which is where we'll write our code, and Git, which helps us manage our code. Follow the steps below based on your computer's operating system.
30
+
31
+ ### Installing node.js 22
32
+
33
+ node.js 22 is a tool that lets us run our application. Let's install it step by step.
34
+
35
+ #### For Windows:
36
+ 1. **Set up PowerShell for running commands:**
37
+ - Press the Windows key
38
+ - Type "PowerShell"
39
+ - Right-click on "Windows PowerShell" and select "Run as administrator"
40
+ - In the PowerShell window, type this command and press Enter:
41
+ ```powershell
42
+ Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
43
+ ```
44
+ - Type 'A' when prompted to confirm
45
+ - You can now close this window and open PowerShell normally for the remaining steps
46
+
47
+ 2. **Install node.js 22:**
48
+ - Visit the [node.js 22 official website](https://nodejs.org/)
49
+ - Click the big green button that says "LTS" (this means Long Term Support - it's the most stable version)
50
+ - Once the installer downloads, double-click it to start installation
51
+ - Click "Next" through the installation wizard, leaving all settings at their defaults
52
+
53
+ 3. **Verify Installation:**
54
+ - Open PowerShell (no need for admin mode)
55
+ - Type these commands one at a time and press Enter after each:
56
+ ```powershell
57
+ node --version
58
+ pnpm --version
59
+ ```
60
+ - You should see version numbers appear after each command (e.g., v18.17.0). If you do, congratulations - node.js 22 is installed!
61
+
62
+ > **Note**: If node.js 22 commands don't work in VS Code, restart VS Code to refresh environment variables.
63
+
64
+ #### For macOS:
65
+ 1. **Install Homebrew:**
66
+ - Open Terminal (press Command + Space and type "Terminal")
67
+ - Copy and paste this command into Terminal and press Enter:
68
+ ```bash
69
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
70
+ ```
71
+ - Follow any additional instructions that appear
72
+
73
+ 2. **Install node.js 22:**
74
+ - In the same Terminal window, type this command and press Enter:
75
+ ```bash
76
+ brew install node
77
+ ```
78
+
79
+ 3. **Verify Installation:**
80
+ - In Terminal, type these commands one at a time and press Enter after each:
81
+ ```bash
82
+ node --version
83
+ pnpm --version
84
+ ```
85
+ - If you see version numbers, you've successfully installed node.js 22!
86
+
87
+ #### For Linux (Ubuntu/Debian):
88
+ 1. **Open Terminal:**
89
+ - Press Ctrl + Alt + T on your keyboard, or
90
+ - Click the Activities button and type "Terminal"
91
+
92
+ 2. **Update Package List:**
93
+ ```bash
94
+ sudo apt update
95
+ ```
96
+
97
+ 3. **Install node.js 22 and npm:**
98
+ ```bash
99
+ sudo apt install nodejs npm
100
+ ```
101
+
102
+ 4. **Verify Installation:**
103
+ - Type these commands one at a time and press Enter after each:
104
+ ```bash
105
+ node --version
106
+ pnpm --version
107
+ ```
108
+ - If you see version numbers, you're all set!
109
+
110
+ ### Installing Visual Studio Code
111
+
112
+ VS Code is the editor we'll use to write our code. Here's how to install it:
113
+
114
+ #### For Windows:
115
+ 1. Visit the [Visual Studio Code website](https://code.visualstudio.com/)
116
+ 2. Click the blue "Download for Windows" button
117
+ 3. Once the installer downloads, double-click it
118
+ 4. Accept the license agreement and click "Next"
119
+ 5. Leave the default installation location and click "Next"
120
+ 6. In the Select Additional Tasks window, make sure "Add to PATH" is checked
121
+ 7. Click "Next" and then "Install"
122
+ 8. When installation is complete, click "Finish"
123
+
124
+ #### For macOS:
125
+ 1. Visit the [Visual Studio Code website](https://code.visualstudio.com/)
126
+ 2. Click the blue "Download for Mac" button
127
+ 3. Once the .zip file downloads, double-click it to extract
128
+ 4. Drag Visual Studio Code.app to the Applications folder
129
+ 5. Double-click the app to launch it
130
+ 6. To make VS Code available in your terminal:
131
+ - Open VS Code
132
+ - Press Command + Shift + P
133
+ - Type "shell command" and select "Install 'code' command in PATH"
134
+
135
+ #### For Linux (Ubuntu/Debian):
136
+ 1. Open Terminal (Ctrl + Alt + T)
137
+ 2. First, update the packages list:
138
+ ```bash
139
+ sudo apt update
140
+ ```
141
+ 3. Install the dependencies needed to add Microsoft's repository:
142
+ ```bash
143
+ sudo apt install software-properties-common apt-transport-https wget
144
+ ```
145
+ 4. Import Microsoft's GPG key:
146
+ ```bash
147
+ wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
148
+ ```
149
+ 5. Add the VS Code repository:
150
+ ```bash
151
+ sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
152
+ ```
153
+ 6. Install VS Code:
154
+ ```bash
155
+ sudo apt install code
156
+ ```
157
+ 7. Once installed, you can launch VS Code by:
158
+ - Typing `code` in the terminal, or
159
+ - Finding it in your Applications menu
160
+
161
+ ### Install Git
162
+
163
+ #### Windows
164
+ 1. Open PowerShell (press Windows key, type "PowerShell", and press Enter)
165
+ 2. Visit the [Git website](https://git-scm.com/)
166
+ 3. Download the latest version for Windows
167
+ 4. Run the installer and use the recommended settings
168
+ 5. Verify installation by opening PowerShell:
169
+ ```powershell
170
+ git --version
171
+ ```
172
+
173
+ #### macOS
174
+ 1. Install using Homebrew:
175
+ ```bash
176
+ brew install git
177
+ ```
178
+ 2. Verify installation:
179
+ ```bash
180
+ git --version
181
+ ```
182
+
183
+ #### Linux (Ubuntu/Debian)
184
+ 1. Update package list:
185
+ ```bash
186
+ sudo apt update
187
+ ```
188
+ 2. Install Git:
189
+ ```bash
190
+ sudo apt install git
191
+ ```
192
+ 3. Verify installation:
193
+ ```bash
194
+ git --version
195
+ ```
196
+
197
+ ### Configure Git (All Systems)
198
+
199
+ Open your terminal (command prompt) and run the following commands to set up Git:
200
+
201
+ After installation, set up your identity:
202
+ ```bash
203
+ git config --global user.name "Your Name"
204
+ git config --global user.email "your.email@example.com"
205
+ ```
206
+
207
+ ### Verify Installation
208
+
209
+ Open your terminal (command prompt) and run the following commands to verify your setup:
210
+ ```bash
211
+ node --version
212
+ pnpm --version
213
+ git --version
214
+ ```
215
+
216
+ You should see version numbers displayed for all commands. You're now ready to start building your Document Model!
@@ -0,0 +1,78 @@
1
+ # Create New Powerhouse Project
2
+
3
+ ## Create New Powerhouse Document Model Library Project
4
+
5
+ To create a new Powerhouse Document Model Library project, you can use the `ph init` command in your terminal. This command will create a new project in the current directory.
6
+
7
+ :::info
8
+ This command will create a new project in the current directory.
9
+ You can run the command in the terminal window of your OS or you open the newly installed VSCode and run the command in the terminal window of VSCode.
10
+ You will need VSCode later in the tutorial once you have generated the document model.
11
+ Make sure the terminal reflects the directory where you want to create the new project.
12
+ To open a directory in a terminal, you use the cd command to change your current directory. The cd command takes an argument, usually the name of the folder you want to move to, so the full command is
13
+ ```bash
14
+ cd your-directory
15
+ ```
16
+ This essentially opens that folder and places you in it.
17
+ :::
18
+
19
+ Once you've navigated to the directory where you want to create the new project and in your terminal, run the following command:
20
+
21
+ ```bash
22
+ ph init
23
+ ```
24
+
25
+ In the terminal, you will be asked to enter the project name. Fill in the project name and press enter. Make sure to use the name `ChatRoom` as the project name with capital letter R so all of our tutorial code works.
26
+
27
+ ```bash
28
+ you@yourmachine:~/Powerhouse$ ph init
29
+
30
+ ? What is the project name? ‣ ChatRoom
31
+ ```
32
+
33
+ Once the project is created, you will see the following output:
34
+
35
+ ```bash
36
+ The installation is done!
37
+
38
+ You can start by typing:
39
+ cd ChatRoom
40
+ ```
41
+
42
+ Navigate to the newly created project directory:
43
+
44
+ ```bash
45
+ cd ChatRoom
46
+ ```
47
+
48
+ Once you are in the project directory, now you can run the `ph connect` command to instantiate a local version of the Connect application to start building your document model.
49
+
50
+ Run the following command to start the Connect application:
51
+
52
+ ```bash
53
+ ph connect
54
+ ```
55
+
56
+ The Connect application will start and you will see the following output:
57
+
58
+ ```bash
59
+ you@yourmachine:~/Powerhouse/chatroom$ ph run connect
60
+
61
+ > Chatroom@1.0.0 connect
62
+ > connect --config-file ./powerhouse.config.json
63
+
64
+ Watching local document models at '/home/you/Powerhouse/ChatRoom/document-models'...
65
+ Watching local document editors at '/home/you/Powerhouse/ChatRoom/editors'...
66
+ ➜ Local: http://localhost:3000/
67
+ ➜ press h + enter to show help
68
+ ```
69
+
70
+ A new browser window will open and you will see the Connect application. If it doesn't open automatically, you can open it manually by navigating to `http://localhost:3000/` in your browser.
71
+
72
+ Create a new document model by clicking on the `DocumentModel` button by the "New Document" section. The Gif below shows you where to click.
73
+
74
+ ![Create New Document Model](./images/ChatRoomConnectApp.gif)
75
+
76
+ If you followed the steps correctly, you should have an empty document model created called `ChatRoom`.
77
+
78
+ In the next tutorial, you will learn how to design your document model and export it to be later used in your Powerhouse project.
@@ -0,0 +1,139 @@
1
+ # Define the Chatroom Document Model
2
+
3
+ In this tutorial, you will learn how to design your document model and export it to be later used in your Powerhouse project.
4
+ If you don't have a document model created yet, have a look at the previous steps of this tutorial to create a new document model.
5
+
6
+ Before you start, make sure you have the Connect application running.
7
+
8
+ ## Chatroom Document Model Schema
9
+
10
+ We use GraphQL Schema Definition Language (SDL) to define the document model schema. Below, you can see the SDL for the `ChatRoom` document model.
11
+
12
+ :::info
13
+ This schema contains the data structure of the document model and the basic operations that can be performed on the document model.
14
+ Document models in Powerhouse leverage event sourcing principles, where every state transition is represented by an operation. GraphQL input types describe operations, ensuring that user intents are captured effectively. These operations detail the parameters needed for state transitions The use of GraphQL aligns these transitions with explicit, validated, and reproducible commands, supporting CQRS (Command Query Responsibility Segregation) patterns.
15
+ :::
16
+
17
+ ## State Schema (See next steps)
18
+
19
+ ```graphql
20
+ # Defines a GraphQL type for the state of the chatroom document
21
+ type ChatRoomState {
22
+ id: OID! # Unique identifier for the chat-room
23
+ name: String! # Name of the chat-room
24
+ description: String # Optional description of the chat-room
25
+ createdAt: DateTime! # Timestamp of when the chat-room was created
26
+ createdBy: ID! # Agent ID of the user who created the chat-room
27
+ messages: [Message!]! # List of messages in the chat-room
28
+ }
29
+
30
+ # Defines a GraphQL type for the state of a message
31
+ type Message {
32
+ id: OID! # Unique identifier for the message
33
+ sender: Sender! # Agent details of the message sender
34
+ content: String # Message content
35
+ sentAt: DateTime! # Timestamp of when the message was sent
36
+ reactions: [Reaction!] # Reactions to the message
37
+ }
38
+
39
+ # Defines a GraphQL type for the state of a sender
40
+ type Sender {
41
+ id: ID! # Unique identifier for the sender
42
+ name: String
43
+ avatarUrl: URL # Allows us to pull the ENS and/or nft of the persons profile
44
+ }
45
+
46
+ # Defines a GraphQL type for the state of a reaction to a message
47
+ type Reaction {
48
+ type: ReactionType! # Type of reaction (one of the predefined emoji)
49
+ reactedBy: [ID!]! # Agent ID of the user who reacted
50
+ }
51
+
52
+ # Defines the various predefined emojis to react to a message
53
+ enum ReactionType {
54
+ THUMBS_UP
55
+ THUMBS_DOWN
56
+ LAUGH
57
+ HEART
58
+ CRY
59
+ }
60
+ ```
61
+
62
+ ## Operations Schema (See next steps)
63
+
64
+ ```graphql
65
+ # add_message
66
+
67
+ input AddMessageInput {
68
+ messageId: OID! # ID of the message that is being added
69
+ sender: Sender! # ID of the user sending the message
70
+ content: String! # Content of the message
71
+ sentAt: DateTime!
72
+ }
73
+
74
+ input AddEmojiReactionInput {
75
+ messageId: OID! # ID of the message to which the reaction is being added
76
+ reactedBy: ID! # ID of the user adding the reaction
77
+ type: ReactionType! # Type of the reaction (emoji)
78
+ }
79
+
80
+ input RemoveEmojiReactionInput {
81
+ messageId: OID! # ID of the message to which the reaction is being removed
82
+ senderId: ID! # ID of the user that is removing the reaction
83
+ type: ReactionType! # Type of the reaction (emoji)
84
+ }
85
+
86
+ input EditChatNameInput {
87
+ name: String
88
+ }
89
+
90
+ input EditChatDescriptionInput {
91
+ description: String
92
+ }
93
+ ```
94
+
95
+ ## Define the Document Model
96
+
97
+ To be able to define the document model, you need to open the Chatroom document model editor in Connect.
98
+
99
+ The steps below show you how to do this:
100
+
101
+ 1. In the Connect application, click on the `ChatRoom` document model you've created in the previous step, to open the document model editor.
102
+ 2. You'll be welcomed with a form to fill, this is metadata about the document model, fill in the details in the fields.
103
+
104
+ In the `Document Type` field, type `powerhouse/chatroom`. This defines the new type of document that will be created with this document model.
105
+
106
+ ![Chatroom Document Model Form Metadata](image-2.png)
107
+
108
+ 3. In the code editor, you can see the SDL for the document model. Replace the existing SDL with the SDL defined in the [State Schema](#state-schema) section above. Only copy and paste the types, leaving the inputs for the next step. You can however already press 'Sync with schema' button to set the initial state of your document model based on your Schema Definition Language. Verify that your Global State Initial Value looks like this.
109
+ ```graphql
110
+ {
111
+ "id": "",
112
+ "name": "",
113
+ "description": "",
114
+ "createdAt": "",
115
+ "createdBy": "",
116
+ "messages": ""
117
+ }
118
+ ```
119
+
120
+ 4. Below the editor, there is an input field **'Add module'**. You need to create and name a module that the input operations will be added to. In this case, we will name the module **'general_operations'**. Press enter.
121
+ 5. Now there is a new field, called **'Add operation'**. Here you will have to add each input operation to the module, one by one.
122
+ 6. Inside the **'Add operation'** field, type **'ADD_MESSAGE'** and press enter. A small editor will appear under with an empty input type that you have to fill. Copy the first input type from the [Operations Schema](#operations-schema) section and paste it in the editor. The editor should look like this:
123
+
124
+ ```graphql
125
+ input AddMessageInput {
126
+ messageId: OID! # ID of the message that is being added
127
+ sender: Sender! # ID of the user sending the message
128
+ content: String! # Content of the message
129
+ sentAt: DateTime!
130
+ }
131
+ ```
132
+
133
+ 7. Repeat step 6 for the other input operations based on the [Operations Schema](#operations-schema). If you noticed, you only need to add the name `(ADD_EMOJI_REACTION, EDIT_CHAT_NAME, etc)` of the operation without the `input` suffix. Then it will be generated once you press enter.
134
+ 8. Let's just add a couple more reducer exceptions to the `ADD_MESSAGE` operation which we'll be using later to avoid empty messages or messages exceeding a maximum lenght. Add `MessageContentCannotBeEmpty` and `MessageContentExceedsTheMaximumLenght` to the reducer exceptions of `ADD_MESSAGE`
135
+ 8. Once you have added all the input operations, click on the `Export` button, at the top right of the editor, to save the document model on your local machine. Ideally you already save your file in the root of your powerhouse project on your machine.
136
+
137
+ Check the screenshot below to verify the complete implementation:
138
+
139
+ ![Chatroom Document Model](image-3.png)