@powerhousedao/academy 3.2.0-dev.2 → 3.2.0-dev.4

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 (67) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/docs/academy/01-GetStarted/00-ExploreDemoPackage.mdx +188 -0
  3. package/docs/academy/01-GetStarted/01-CreateNewPowerhouseProject.md +10 -12
  4. package/docs/academy/01-GetStarted/02-DefineToDoListDocumentModel.md +8 -8
  5. package/docs/academy/01-GetStarted/03-ImplementOperationReducers.md +11 -11
  6. package/docs/academy/01-GetStarted/04-BuildToDoListEditor.md +13 -13
  7. package/docs/academy/01-GetStarted/_04-BuildToDoListEditor +12 -12
  8. package/docs/academy/01-GetStarted/home.mdx +50 -51
  9. package/docs/academy/01-GetStarted/images/Connect.png +0 -0
  10. package/docs/academy/01-GetStarted/images/Packagemanager.png +0 -0
  11. package/docs/academy/01-GetStarted/images/TodoDriveApp.png +0 -0
  12. package/docs/academy/01-GetStarted/styles.module.css +7 -14
  13. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/02-StandardDocumentModelWorkflow.md +25 -24
  14. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/03-BuilderTools.md +17 -17
  15. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/_category_.json +1 -1
  16. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/01-WhatIsADocumentModel.md +15 -15
  17. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/02-SpecifyTheStateSchema.md +11 -9
  18. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/03-SpecifyDocumentOperations.md +15 -15
  19. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/04-UseTheDocumentModelGenerator.md +9 -9
  20. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/05-ImplementDocumentReducers.md +15 -15
  21. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/06-ImplementDocumentModelTests.md +14 -14
  22. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/07-ExampleToDoListRepository.md +6 -6
  23. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/01-BuildingDocumentEditors.md +31 -32
  24. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/02-ConfiguringDrives.md +7 -9
  25. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/03-BuildingADriveExplorer.md +485 -92
  26. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-DocumentTools/{00-DocumentToolbar.md → 00-DocumentToolbar.mdx} +7 -2
  27. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-DocumentTools/01-OperationHistory.md +12 -12
  28. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-DocumentTools/02-RevisionHistoryTimeline.md +18 -7
  29. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-DocumentTools/images/DocumentToolbar.png +0 -0
  30. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-DocumentTools/images/revision-history-timeline.png +0 -0
  31. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/08-Authorization/01-RenownAuthenticationFlow.md +22 -11
  32. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/08-Authorization/02-Authorization.md +8 -8
  33. package/docs/academy/02-MasteryTrack/04-WorkWithData/01-ReadingAndWritingThroughTheAPI.mdx +13 -19
  34. package/docs/academy/02-MasteryTrack/04-WorkWithData/02-GraphQLAtPowerhouse.md +3 -3
  35. package/docs/academy/02-MasteryTrack/04-WorkWithData/03-WorkingWithSubgraphs/02-GraphQLAndSubgraphs.mdx +8 -8
  36. package/docs/academy/02-MasteryTrack/04-WorkWithData/03-WorkingWithSubgraphs/03-WorkingWithSubgraphs.md +28 -28
  37. package/docs/academy/02-MasteryTrack/04-WorkWithData/04-analytics-processor.md +4 -4
  38. package/docs/academy/02-MasteryTrack/04-WorkWithData/05-AnalyticsProcessorTutorial/01-SetupBuilderEnvironment.md +14 -14
  39. package/docs/academy/02-MasteryTrack/04-WorkWithData/05-AnalyticsProcessorTutorial/02-CreateNewPowerhouseProject.md +2 -2
  40. package/docs/academy/02-MasteryTrack/04-WorkWithData/05-AnalyticsProcessorTutorial/03-GenerateAnAnalyticsProcessor.md +6 -6
  41. package/docs/academy/02-MasteryTrack/04-WorkWithData/05-AnalyticsProcessorTutorial/04-UpdateAnalyticsProcessor.md +1 -1
  42. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/GraphQL References/QueryingADocumentWithGraphQL.md +2 -2
  43. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/best-practices.md +4 -4
  44. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/graphql/index.md +7 -7
  45. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/graphql/integration.md +1 -1
  46. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/intro.md +6 -6
  47. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/browser.md +1 -1
  48. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/index.md +5 -5
  49. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/memory.md +1 -1
  50. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/pg.md +2 -2
  51. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/schema.md +1 -1
  52. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/utilities.md +1 -1
  53. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/use-cases/index.md +1 -1
  54. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/use-cases/maker.md +12 -12
  55. package/docs/academy/02-MasteryTrack/05-Launch/01-IntroductionToPackages.md +9 -9
  56. package/docs/academy/02-MasteryTrack/05-Launch/02-PublishYourProject.md +8 -8
  57. package/docs/academy/02-MasteryTrack/05-Launch/03-SetupEnvironment.md +35 -35
  58. package/docs/academy/02-MasteryTrack/05-Launch/04-ConfigureEnvironment.md +8 -8
  59. package/docs/academy/02-MasteryTrack/_category_.json +1 -1
  60. package/docs/academy/03-ExampleUsecases/Chatroom/03-DefineChatroomDocumentModel.md +5 -5
  61. package/docs/academy/04-APIReferences/01-ReactHooks.md +209 -0
  62. package/docs/academy/07-Cookbook.md +105 -105
  63. package/package.json +1 -1
  64. package/sidebars.ts +9 -10
  65. package/src/css/custom.css +18 -0
  66. package/docs/academy/01-GetStarted/00-ExploreDemoPackage.md +0 -88
  67. package/docs/academy/04-APIReferences/01-ReactHooks +0 -98
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: Get Started
2
+ title: Get started
3
3
  slug: /
4
4
  sidebar_class_name: category-index-page
5
5
  ---
@@ -11,11 +11,11 @@ import BrowserOnly from '@docusaurus/BrowserOnly';
11
11
  <div className={styles.learningPath}>
12
12
  {/* Get Started Card - Full Width */}
13
13
  <div className={`${styles.pathCard} ${styles.fullWidth}`}>
14
- <div className={styles.cardHeader} style={{ justifyContent: 'center' }}>
15
- <div className={styles.cardIconWrapper}>
16
- <img src="/img/academy/icons/Flash.svg" alt="" />
17
- </div>
18
- <h3 className="card-title">Get started</h3>
14
+ <div className={styles.cardHeader}>
15
+ <h3 className="card-title">
16
+ <img src="/img/academy/icons/Flash.svg" alt="" className={styles.titleIcon} />
17
+ Get started
18
+ </h3>
19
19
  </div>
20
20
  <div className={styles.cardContent}>
21
21
  <div style={{ maxWidth: '960px', margin: '0 auto', textAlign: 'center' }}>
@@ -49,13 +49,13 @@ import BrowserOnly from '@docusaurus/BrowserOnly';
49
49
 
50
50
  <div className={styles.pathCard} style={{ border: '1px solid #4FC86F' }}>
51
51
  <div className={styles.cardHeader}>
52
- <div className={styles.cardIconWrapper}>
53
- <img src="/img/academy/icons/BuilderEnvironment.svg" alt="" />
54
- </div>
55
- <h3 className="card-title">Get Started</h3>
52
+ <h3 className="card-title">
53
+ <img src="/img/academy/icons/Flash.svg" alt="" className={styles.titleIcon} />
54
+ Get started
55
+ </h3>
56
56
  </div>
57
57
  <div className={styles.cardContent}>
58
- <a href="/academy/GetStarted/CreateNewPowerhouseProject" className="path-button">Build a Todo-list Document Model</a>
58
+ <a href="/academy/GetStarted/CreateNewPowerhouseProject" className="path-button">Build a todo-list document model</a>
59
59
  </div>
60
60
  </div>
61
61
 
@@ -64,16 +64,16 @@ import BrowserOnly from '@docusaurus/BrowserOnly';
64
64
  {/* Row 2: Build User Experiences, Builder Track Image, Work with Data */}
65
65
  <div className={styles.pathCard} style={{ border: '1px solid #4FC86F' }}>
66
66
  <div className={styles.cardHeader}>
67
- <div className={styles.cardIconWrapper}>
68
- <img src="/img/academy/icons/Editor.svg" alt="" />
69
- </div>
70
- <h3 className="card-title">Build User Experiences</h3>
67
+ <h3 className="card-title">
68
+ <img src="/img/academy/icons/Editor.svg" alt="" className={styles.titleIcon} />
69
+ Build user experiences
70
+ </h3>
71
71
  </div>
72
72
  <div className={styles.cardContent}>
73
- <a href="/academy/GetStarted/BuildToDoListEditor" className="path-button">Building a Todo-list Editor</a>
74
- <a href="/academy/MasteryTrack/BuildingUserExperiences/BuildingDocumentEditors" className="path-button">Building Document Editors</a>
75
- <a href="/academy/MasteryTrack/BuildingUserExperiences/BuildingADriveExplorer" className="path-button">Building Custom Drive Explorers</a>
76
- <a href="/academy/ComponentLibrary/DocumentEngineering" className="path-button">Component Library</a>
73
+ <a href="/academy/GetStarted/BuildToDoListEditor" className="path-button">Build a todo-list editor</a>
74
+ <a href="/academy/MasteryTrack/BuildingUserExperiences/BuildingDocumentEditors" className="path-button">Build document editors</a>
75
+ <a href="/academy/MasteryTrack/BuildingUserExperiences/BuildingADriveExplorer" className="path-button">Build custom drive explorers</a>
76
+ <a href="/academy/ComponentLibrary/DocumentEngineering" className="path-button">Component library</a>
77
77
  </div>
78
78
  </div>
79
79
 
@@ -86,38 +86,37 @@ import BrowserOnly from '@docusaurus/BrowserOnly';
86
86
  }}>
87
87
  <img src="/img/Union.svg" alt="Powerhouse Union" width="250" />
88
88
  <div className={styles.masteryTrackTitle}>
89
- <h3 className="card-title" style={{ margin: 0 }}>Mastery Track</h3>
89
+ <h3 className="card-title" style={{ margin: 0 }}>Mastery track</h3>
90
90
  </div>
91
91
  </div>
92
92
 
93
93
  <div className={styles.pathCard} style={{ border: '1px solid #4FC86F' }}>
94
94
  <div className={styles.cardHeader}>
95
- <div className={styles.cardIconWrapper}>
96
- <img src="/img/academy/icons/Data.svg" alt="" />
97
- </div>
98
- <h3 className="card-title">Work with Data</h3>
95
+ <h3 className="card-title">
96
+ <img src="/img/academy/icons/Data.svg" alt="" className={styles.titleIcon} />
97
+ Work with data
98
+ </h3>
99
99
  </div>
100
100
  <div className={styles.cardContent}>
101
- <a href="/academy/MasteryTrack/WorkWithData/ReadingAndWritingThroughTheAPI" className="path-button">Reading & Writing through the API</a>
102
- <a href="/academy/MasteryTrack/WorkWithData/WorkingWithSubgraphs" className="path-button">Create your own Subgraph</a>
103
- <a href="/academy/MasteryTrack/WorkWithData/Analytics-Engine/intro" className="path-button">Using the Analytics Engine</a>
104
- <a href="/academy/MasteryTrack/WorkWithData/Analytics-Engine/intro" className="path-button">Using the Analytics Engine</a>
101
+ <a href="/academy/MasteryTrack/WorkWithData/ReadingAndWritingThroughTheAPI" className="path-button">Read & write through the API</a>
102
+ <a href="/academy/MasteryTrack/WorkWithData/WorkingWithSubgraphs" className="path-button">Create your own subgraph</a>
103
+ <a href="/academy/MasteryTrack/WorkWithData/Analytics-Engine/intro" className="path-button">Use the analytics engine</a>
105
104
  </div>
106
105
  </div>
107
106
 
108
107
  {/* Launch Card - Full Width with 3 column buttons - RE-INSERTED */}
109
108
  <div className={`${styles.pathCard} ${styles.fullWidth}`}>
110
- <div className={styles.cardHeader} style={{ justifyContent: 'center' }}>
111
- <div className={styles.cardIconWrapper}>
112
- <img src="/img/academy/icons/Launch.svg" alt="" />
113
- </div>
114
- <h3 className="card-title">Launch</h3>
109
+ <div className={styles.cardHeader}>
110
+ <h3 className="card-title">
111
+ <img src="/img/academy/icons/Launch.svg" alt="" className={styles.titleIcon} />
112
+ Launch
113
+ </h3>
115
114
  </div>
116
115
  <div className={styles.cardContent}>
117
116
  <div className={styles.buttonContainer}>
118
- <a href="/academy/MasteryTrack/Launch/IntroductionToPackages" className="path-button">Intro To Packages</a>
119
- <a href="/academy/MasteryTrack/Launch/PublishYourProject" className="path-button">Publish Your Project</a>
120
- <a href="/academy/MasteryTrack/Launch/SetupEnvironment" className="path-button">Setup a Cloud Environment</a>
117
+ <a href="/academy/MasteryTrack/Launch/IntroductionToPackages" className="path-button">Intro to packages</a>
118
+ <a href="/academy/MasteryTrack/Launch/PublishYourProject" className="path-button">Publish your project</a>
119
+ <a href="/academy/MasteryTrack/Launch/SetupEnvironment" className="path-button">Set-up a cloud environment</a>
121
120
  </div>
122
121
  </div>
123
122
  </div>
@@ -125,38 +124,38 @@ import BrowserOnly from '@docusaurus/BrowserOnly';
125
124
  {/* Row 3: Cookbook, Use-cases, Advanced Topics */}
126
125
  <div className={styles.pathCard}>
127
126
  <div className={styles.cardHeader}>
128
- <div className={styles.cardIconWrapper}>
129
- <img src="/img/academy/icons/Cookbook.svg" alt="" />
130
- </div>
131
- <h3 className="card-title">Cookbook</h3>
127
+ <h3 className="card-title">
128
+ <img src="/img/academy/icons/Cookbook.svg" alt="" className={styles.titleIcon} />
129
+ Cookbook
130
+ </h3>
132
131
  </div>
133
132
  <div className={styles.cardContent}>
134
- <a href="/academy/Cookbook" className="path-button">Powerhouse Recipes</a>
133
+ <a href="/academy/Cookbook" className="path-button">Powerhouse recipes</a>
135
134
  </div>
136
135
  </div>
137
136
 
138
137
  {/* Ensure this Use-cases Card block is clean */}
139
138
  <div className={styles.pathCard}> {/* New Use-cases Card */}
140
139
  <div className={styles.cardHeader}>
141
- <div className={styles.cardIconWrapper}>
142
- <img src="/img/academy/icons/Cookbook.svg" alt="Use-cases Icon" />
143
- </div>
144
- <h3 className="card-title">Use-cases</h3>
140
+ <h3 className="card-title">
141
+ <img src="/img/academy/icons/Cookbook.svg" alt="Use-cases Icon" className={styles.titleIcon} />
142
+ Use-cases
143
+ </h3>
145
144
  </div>
146
145
  <div className={styles.cardContent}>
147
- <a href="/academy/ExampleUsecases/Chatroom/SetupBuilderEnvironment" className="path-button">Explore Use-cases</a>
146
+ <a href="/academy/ExampleUsecases/Chatroom/SetupBuilderEnvironment" className="path-button">Explore use-cases</a>
148
147
  </div>
149
148
  </div>
150
149
 
151
150
  <div className={styles.pathCard}>
152
151
  <div className={styles.cardHeader}>
153
- <div className={styles.cardIconWrapper}>
154
- <img src="/img/academy/icons/Advanced.svg" alt="" />
155
- </div>
156
- <h3 className="card-title">Architecture</h3>
152
+ <h3 className="card-title">
153
+ <img src="/img/academy/icons/Advanced.svg" alt="" className={styles.titleIcon} />
154
+ Architecture
155
+ </h3>
157
156
  </div>
158
157
  <div className={styles.cardContent}>
159
- <a href="/academy/Architecture/PowerhouseArchitecture" className="path-button">Learn More</a>
158
+ <a href="/academy/Architecture/PowerhouseArchitecture" className="path-button">Learn more</a>
160
159
  </div>
161
160
  </div>
162
161
  </div>
@@ -12,9 +12,9 @@
12
12
  display: grid;
13
13
  grid-template-columns: repeat(3, 1fr);
14
14
  gap: 2rem;
15
- max-width: 1200px;
16
- margin: 0 auto;
17
- padding: 2rem;
15
+ /* max-width: 1200px; */
16
+ /* margin: 0 auto; */
17
+ /* padding: 2rem; */
18
18
  width: 100%;
19
19
  box-sizing: border-box;
20
20
  }
@@ -53,30 +53,23 @@
53
53
  display: flex;
54
54
  align-items: center;
55
55
  margin-bottom: 1rem;
56
- }
57
-
58
- .cardIconWrapper {
59
- display: flex;
60
- align-items: center;
61
56
  justify-content: center;
62
- width: 20px;
63
- height: 20px;
64
- margin-right: 0.75rem;
65
57
  }
66
58
 
67
59
  :global(.card-title) {
68
60
  display: flex;
69
- align-items: center;
61
+ align-items: flex-start;
70
62
  justify-content: flex-start;
71
63
  margin: 0;
72
64
  padding: 0;
73
65
  font-size: 1.25rem;
74
66
  font-weight: 600;
75
67
  line-height: 1.2;
68
+ gap: 0rem;
76
69
  }
77
70
 
78
71
  :global(.card-title img) {
79
- display: inline-flex;
72
+ margin-top: 2px;
80
73
  }
81
74
 
82
75
  :global(.path-button) {
@@ -127,4 +120,4 @@
127
120
  :global([data-theme='dark']) :global(.path-button:hover) {
128
121
  background: var(--ifm-color-emphasis-200);
129
122
  border-color: var(--ifm-color-emphasis-300);
130
- }
123
+ }
@@ -1,13 +1,14 @@
1
1
  # Create Powerhouse packages
2
2
 
3
3
  :::warning
4
- **This tutorial is a summary for builders that are familiar with building document models**.
5
- It guides you through creating a Powerhouse Document Model, from initial setup to publishing a distributable package.
4
+ **This tutorial is a summary for builders that are already familiar with building document models**.
5
+ It provides a summary from initial setup up to publishing a distributable package.
6
+
6
7
  Please start with the '**Get Started**' Chapter or '**Document Model Creation**' section if you are unfamiliar with building a document model.
7
8
  :::
8
9
 
9
10
  <details>
10
- <summary>Key Commands that you'll use in this flow</summary>
11
+ <summary>Key commands that you'll use in this flow</summary>
11
12
 
12
13
  - `pnpm install -g ph-cmd`: Installs the Powerhouse CLI globally.
13
14
  - `ph init`: Initializes a new Powerhouse project or sets up the local environment.
@@ -22,7 +23,7 @@ Please start with the '**Get Started**' Chapter or '**Document Model Creation**'
22
23
 
23
24
  </details>
24
25
 
25
- ## Phase 1: Setup and Initialization
26
+ ## Phase 1: Setup and initialization
26
27
 
27
28
  ### 1.1. Install Powerhouse CLI
28
29
  Ensure you have the Powerhouse Command Line Interface (`ph-cmd`) installed. This tool is crucial for managing your Powerhouse projects.
@@ -33,7 +34,7 @@ pnpm install -g ph-cmd
33
34
  The [Prerequisites](/academy/MasteryTrack/BuilderEnvironment/Prerequisites) guide for detailed installation instructions for Node.js, pnpm, and Git if you haven't set them up yet.
34
35
  :::
35
36
 
36
- ### 1.2. Initialize Your Project Environment
37
+ ### 1.2. Initialize your project environment
37
38
  Before creating a specific project, or if you're setting up your environment for the first time to use Connect Studio Mode, initialize the Powerhouse environment. This command prepares your local setup, including a local Reactor configuration.
38
39
  ```bash
39
40
  ph init
@@ -60,7 +61,7 @@ When installing or using the Powerhouse CLI commands you are able to make use of
60
61
  Please be aware that these versions can contain bugs and experimental features that aren't fully tested.
61
62
  </details>
62
63
 
63
- ### 1.3. Launch Connect in Studio Mode
64
+ ### 1.3. Launch Connect in studio mode
64
65
  Connect is your local development hub. Running it in Studio Mode spins up a local instance with a local Reactor, allowing you to define, build, and test document models.
65
66
  ```bash
66
67
  ph connect
@@ -71,14 +72,14 @@ This command typically opens Connect in your browser at `http://localhost:3000/`
71
72
  **Powerhouse Reactors** are essential nodes in the Powerhouse network. They store documents, manage versions, resolve conflicts, and verify document operation histories by rerunning them. Reactors can be configured for local storage (as in Studio Mode), centralized cloud storage, or decentralized storage networks.
72
73
  :::
73
74
 
74
- ## Phase 2: Document Model Specification
75
+ ## Phase 2: Document model specification
75
76
 
76
- ### 2.1. Define the Document Model Schema
77
+ ### 2.1. Define the document model schema
77
78
  Within Connect Studio Mode, navigate to the Document Model Editor. Here, you'll specify the structure of your document model using GraphQL Schema Definition Language (SDL).
78
79
  - **State Schema:** Describes the data fields and types within your document (e.g., `ToDoItem` with `id`, `text`, `checked` fields).
79
80
  - This schema is the blueprint for your document model's data.
80
81
 
81
- ### 2.2. Define Document Model Operations
82
+ ### 2.2. Define document model operations
82
83
  In the same editor, specify the operations (state transitions) for your document model. These are also defined using GraphQL, specifically input types.
83
84
  - **Operations Schema:** Specifies the actions that can be performed on the document (e.g., `AddTodoItemInput`, `UpdateTodoItemInput`, `DeleteTodoItemInput`).
84
85
  - Each input type details the parameters required for an operation.
@@ -87,12 +88,12 @@ In the same editor, specify the operations (state transitions) for your document
87
88
  * Use GraphQL input types for operation parameters.
88
89
  * Ensure operations reflect user intent for a clean API.
89
90
 
90
- ### 2.3. Export Document Model Specification
91
+ ### 2.3. Export document model specification
91
92
  Once your schema and operations are defined in Connect, export the specification. This will download a `.phdm.zip` file (e.g., `YourModelName.phdm.zip`). Save this file in the root of your Powerhouse project directory.
92
93
 
93
- ## Phase 3: Implementation and Testing
94
+ ## Phase 3: Implementation and testing
94
95
 
95
- ### 3.1. Generate Scaffolding Code
96
+ ### 3.1. Generate scaffolding code
96
97
  Use the Powerhouse CLI to process the exported `.phdm.zip` file and generate the necessary boilerplate code for your document model.
97
98
  ```bash
98
99
  ph generate YourModelName.phdm.zip
@@ -103,13 +104,13 @@ This command creates a new directory under `document-models/YourModelName/` cont
103
104
  - A `gen/` folder with autogenerated TypeScript types, action creators, and utility functions based on your schema.
104
105
  - A `src/` folder where you'll implement your custom logic (reducers, utils).
105
106
 
106
- ### 3.2. Implement Reducer Logic
107
+ ### 3.2. Implement reducer logic
107
108
  Reducers are pure functions that implement the state transition logic for each operation defined in your schema. Navigate to `document-models/YourModelName/src/reducers/to-do-list.ts` (or similar, based on your model name).
108
109
  - Implement the functions for each operation (e.g., `addTodoItemOperation`, `updateTodoItemOperation`).
109
110
  - These functions take the current state and an action (containing input data) and return the new state.
110
111
  - Powerhouse handles immutability behind the scenes.
111
112
 
112
- ### 3.3. Write Unit Tests for Reducers
113
+ ### 3.3. Write unit tests for reducers
113
114
  It's crucial to test your reducer logic. Write unit tests in the `document-models/YourModelName/src/reducers/tests/` directory.
114
115
  - Verify that each operation correctly transforms the document state.
115
116
  - Use the auto-generated action creators from the `gen/` folder to create operation actions for your tests.
@@ -118,7 +119,7 @@ Run tests using:
118
119
  pnpm run test
119
120
  ```
120
121
 
121
- ### 3.4. Implement the Document Editor
122
+ ### 3.4. Implement the document editor
122
123
  A document editor provides the user interface for interacting with your document model in Connect. Generate an editor template:
123
124
  ```bash
124
125
  ph generate --editor YourModelName --document-types powerhouse/YourModelName
@@ -132,25 +133,25 @@ This creates a template file, typically at `editors/your-model-name/editor.tsx`.
132
133
  - Utilize components from `@powerhousedao/document-engineering` for consistency and rapid development. Learn more at [Document-Engineering](/academy/ComponentLibrary/DocumentEngineering)
133
134
 
134
135
 
135
- ### 3.5. Test the Editor
136
+ ### 3.5. Test the editor
136
137
  Run Connect locally to see your editor in action:
137
138
  ```bash
138
139
  ph connect
139
140
  ```
140
141
  Create a new document of your defined type. Interact with your editor, test all functionalities, and ensure it correctly dispatches actions to the reducers and reflects state changes.
141
142
 
142
- ## Phase 4: Packaging and Publishing
143
+ ## Phase 4: Packaging and publishing
143
144
 
144
145
  Once your document model and editor are implemented and tested, you can package them for distribution. A Powerhouse Package is a modular unit that can group document models, editors, scripts, and processors.
145
146
 
146
- ### 4.1. Prepare Project for Packaging
147
+ ### 4.1. Prepare project for packaging
147
148
  If you didn't initialize your project with `ph init` intending it as a package, ensure your project structure is set up correctly. The `ph init` command is designed to create this structure.
148
149
  - `document-models/`: Contains your document models.
149
150
  - `editors/`: Contains your editor components.
150
151
  - `src/`: Often used for shared utilities or can be part of the model/editor structure.
151
152
  - (Optional) `processors/`, `scripts/` for advanced functionalities.
152
153
 
153
- ### 4.2. Specify Package Details in `package.json`
154
+ ### 4.2. Specify package details in `package.json`
154
155
  Navigate to the `package.json` file in your project root. This file is crucial for NPM publishing.
155
156
  - **`name`**: Follow a scoped naming convention, e.g., `@your-org-ph/your-package-name`. The `-ph` suffix helps identify Powerhouse ecosystem packages.
156
157
  - **`version`**: Use semantic versioning (e.g., `1.0.0`).
@@ -184,7 +185,7 @@ Example `package.json` snippet:
184
185
  }
185
186
  ```
186
187
 
187
- ### 4.3. Add a Manifest File (`manifest.json`)
188
+ ### 4.3. Add a manifest file (`manifest.json`)
188
189
  Create a `manifest.json` file in your project root. This file describes your package's contents (document models, editors) and helps host applications like Connect understand and integrate your package.
189
190
 
190
191
  Example `manifest.json`:
@@ -214,14 +215,14 @@ Example `manifest.json`:
214
215
  ```
215
216
  Update your project's main `index.js` or entry point to export your document models and editors so they can be discovered by Powerhouse applications.
216
217
 
217
- ### 4.4. Build Your Project
218
+ ### 4.4. Build your project
218
219
  Compile and optimize your project for production:
219
220
  ```bash
220
221
  pnpm build
221
222
  ```
222
223
  This command typically creates a `dist/` or `build/` directory with the compiled assets. Ensure your `package.json`'s `files` array includes this directory and other necessary assets like `manifest.json`, `document-models`, and `editors` if they are not part of the build output but need to be in the package.
223
224
 
224
- ### 4.5. Version Control
225
+ ### 4.5. Version control
225
226
  Store your project in a Git repository for versioning and collaboration.
226
227
  ```bash
227
228
  git init
@@ -241,13 +242,13 @@ To share your package with others or deploy it to different environments, publis
241
242
  ```
242
243
  Follow the prompts in your terminal or browser.
243
244
 
244
- 2. **Publish the Package:**
245
+ 2. **Publish the package:**
245
246
  ```bash
246
247
  npm publish
247
248
  ```
248
249
  If your package is scoped and public, NPM will use the `publishConfig` from your `package.json`. If not set there, you might need `npm publish --access public`.
249
250
 
250
- ### 4.7. Using Your Published Package
251
+ ### 4.7. Using your published package
251
252
  Once published, your package can be installed and used in any Powerhouse environment (like another local Connect instance or a deployed Reactor setup).
252
253
  ```bash
253
254
  ph install @your-org-ph/your-package-name
@@ -1,9 +1,9 @@
1
- # Powerhouse Builder Tooling
1
+ # Powerhouse builder tooling
2
2
 
3
3
  This page provides an overview of all the builder tooling offered by the Powerhouse ecosystem.
4
4
  This list will be maintained and updated as our toolkit grows.
5
5
 
6
- ## Powerhouse Command Line Interface
6
+ ## Powerhouse command line interface
7
7
  ___
8
8
 
9
9
  ### Installing the Powerhouse CLI
@@ -49,7 +49,7 @@ Please be aware that these versions can contain bugs and experimental features t
49
49
 
50
50
  <summary> How to clean your system of the Powerhouse CLI?</summary>
51
51
 
52
- ### Cleaning and Updating ph-cmd
52
+ ### Cleaning and updating ph-cmd
53
53
 
54
54
  If you need to perform a clean reinstallation of the Powerhouse CLI (`ph-cmd`), follow these steps:
55
55
 
@@ -83,7 +83,7 @@ This process ensures a clean slate by removing both the CLI tool and its configu
83
83
 
84
84
  </details>
85
85
 
86
- ### The Use Command
86
+ ### The use command
87
87
  The use command allows you to switch between different environments for your Powerhouse project dependencies.
88
88
 
89
89
  ```bash
@@ -117,7 +117,7 @@ ph use local /path/to/local/packages
117
117
  ph use latest --package-manager pnpm
118
118
  ```
119
119
 
120
- ### The Update Command
120
+ ### The update command
121
121
  The update command allows you to update your Powerhouse dependencies to their latest versions based on the version ranges specified in your package.json.
122
122
 
123
123
  ```bash
@@ -145,7 +145,7 @@ ph update --force prod
145
145
  ph update --package-manager pnpm
146
146
  ```
147
147
 
148
- ## **Key Differences**
148
+ ## **Key differences**
149
149
 
150
150
  ### **Use command**
151
151
  - For switching between different **environments**.
@@ -172,7 +172,7 @@ The boilerplate includes essential commands with NPM/PNPM scripts for:
172
172
  - Building
173
173
  - Testing
174
174
 
175
- ## Design System
175
+ ## Design system
176
176
  ___
177
177
  The Powerhouse Design System is a collection of reusable front-end components based on GraphQL scalars, including custom scalars specific to the web3 ecosystem. It provides:
178
178
  - Consistent UI components across Powerhouse applications
@@ -181,7 +181,7 @@ The Powerhouse Design System is a collection of reusable front-end components ba
181
181
 
182
182
  We cover some of these topics in our design system documentation. Read more about the [design system here](/academy/ComponentLibrary/DocumentEngineering)
183
183
 
184
- ## Reactor Libraries
184
+ ## Reactor libraries
185
185
  ___
186
186
  Reactors are the nodes in the Powerhouse network that handle document storage, conflict resolution, and operation verification.
187
187
  The Reactor Libraries include:
@@ -196,32 +196,32 @@ Handles client-side interactions
196
196
  ### Local
197
197
  Manages local storage and offline functionality
198
198
 
199
- ### Drive App
199
+ ### Drive app
200
200
  Handles document organization and storage management, but can also be customized to offer specific functionality, categorization, or tailored interfaces for your documents.
201
201
 
202
- ## Code Generators
202
+ ## Code generators
203
203
  ___
204
204
  Powerhouse provides several code generation tools to streamline development:
205
205
 
206
- ### Document Model Scaffolding
206
+ ### Document model scaffolding
207
207
  Generates the basic structure for new Document Models with the command `ph init` based on the boilerplate.
208
208
 
209
- ### Editor Generator
209
+ ### Editor generator
210
210
  Creates template code for Document Model editors with the command `ph generate --editor <name> --document-types <documenttype>`
211
211
 
212
- ### Drive Editor Generator
212
+ ### Drive editor generator
213
213
  Builds scaffolding for custom Drive interfaces with the command `ph generate --drive-editor <name>`
214
214
 
215
- ### Subgraph Generator
215
+ ### Subgraph generator
216
216
  Creates GraphQL subgraph templates for data access automatically upon `ph reactor`
217
217
 
218
- ### Processor Generator
218
+ ### Processor generator
219
219
  Generates processor templates for event handling automatically upon `ph reactor`
220
220
 
221
- ### Analytics Processor Generator
221
+ ### Analytics processor generator
222
222
  Creates specialized processors for analytics tracking
223
223
 
224
- ## Analytics Engine
224
+ ## Analytics engine
225
225
  ___
226
226
  The Analytics Engine is a system that allows tracking and analyzing operations and state changes on Document Models. Features include:
227
227
  - Custom dashboard and report generation
@@ -1,5 +1,5 @@
1
1
  {
2
- "label": "Builder Environment",
2
+ "label": "Builder environment",
3
3
  "link": {
4
4
  "type": "doc",
5
5
  "id": "academy/MasteryTrack/BuilderEnvironment/Prerequisites"
@@ -1,7 +1,7 @@
1
- # What is a Document Model?
1
+ # What is a document model?
2
2
 
3
3
  :::tip
4
- This chapter on **Document Model Creation** will help you with an in depth practicial understanding while building an **advanced ToDoList** document model.
4
+ This chapter on **Document Model Creation** will help you with an in depth practicial understanding while building an **advanced to-do list** document model.
5
5
  Although not required, if you have completed the 'Get Started' tutorial you will revisit familiar topics and can update your existing document model.
6
6
  :::
7
7
 
@@ -19,7 +19,7 @@ A Document Model can be understood as:
19
19
 
20
20
  ### **How does a document model function?**
21
21
 
22
- #### **Structure and Composition**
22
+ #### **Structure and composition**
23
23
 
24
24
  Each document model consists of three key components:
25
25
 
@@ -31,11 +31,11 @@ Document models leverage **event sourcing, CQRS (Command Query Responsibility Se
31
31
 
32
32
  ---
33
33
 
34
- ## **1. Structure of a Document Model**
34
+ ## **1. Structure of a document model**
35
35
 
36
36
  A document model consists of the following key components:
37
37
 
38
- ### **1.1 State Schema**
38
+ ### **1.1 State schema**
39
39
 
40
40
  The **state schema** defines the structure of the document, including its fields and data types. It serves as a blueprint for how data is stored and validated.
41
41
 
@@ -60,7 +60,7 @@ type LineItem {
60
60
  }
61
61
  ```
62
62
 
63
- ### **State Schema Features:**
63
+ ### **State schema features:**
64
64
 
65
65
  - Uses **GraphQL-like definitions** for a **clear, structured schema**.
66
66
  - Supports **custom scalar types** like `OID`, `Currency`, and `DateTime`. Or other Web3 specific scalars
@@ -70,7 +70,7 @@ The state schema acts as a **template** for document instances. Every new invoic
70
70
 
71
71
  ---
72
72
 
73
- ### **1.2 Document Operations**
73
+ ### **1.2 Document operations**
74
74
 
75
75
  Document models are **append-only**, meaning changes are not made directly to the document state. Instead, **document operations** define valid state transitions.
76
76
 
@@ -99,7 +99,7 @@ Instead, a new event is appended to the document history.
99
99
 
100
100
  ---
101
101
 
102
- ### **1.3 Event History (Append-Only Log)**
102
+ ### **1.3 Event history (append-only log)**
103
103
 
104
104
  Every operation applied to a document is **stored as an event** in an append-only log.
105
105
 
@@ -112,7 +112,7 @@ Every operation applied to a document is **stored as an event** in an append-onl
112
112
  { "timestamp": 1700000200, "operation": "MARK_AS_PAID", "data": {}
113
113
  ```
114
114
 
115
- ### **Event History Benefits:**
115
+ ### **Event history benefits:**
116
116
 
117
117
  - Provides a **transparent audit trail** of changes.
118
118
  - Enables **time travel debugging** by reconstructing past states.
@@ -120,11 +120,11 @@ Every operation applied to a document is **stored as an event** in an append-onl
120
120
 
121
121
  ---
122
122
 
123
- ## **2. How Document Models Work Technically**
123
+ ## **2. How document models work technically**
124
124
 
125
125
  Document models in Powerhouse rely on **event-driven architecture, event sourcing, and CQRS principles**. Here's a step-by-step breakdown:
126
126
 
127
- ### **2.1 Document Creation**
127
+ ### **2.1 Document creation**
128
128
 
129
129
  1. A user (or system) **submits an operation** to create a new document.
130
130
  2. The document model **validates** the input data against the state schema.
@@ -142,7 +142,7 @@ Document models in Powerhouse rely on **event-driven architecture, event sourcin
142
142
 
143
143
  ---
144
144
 
145
- ### **2.2 Document Modification**
145
+ ### **2.2 Document modification**
146
146
 
147
147
  1. A user submits an **operation** (e.g., `ADD_LINE_ITEM`).
148
148
  2. The **event is appended** to the document history.
@@ -163,7 +163,7 @@ Since changes are **not applied directly**, this model is **highly scalable and
163
163
 
164
164
  ---
165
165
 
166
- ### **2.3 Querying Document Models**
166
+ ### **2.3 Querying document models**
167
167
 
168
168
  Powerhouse uses **GraphQL queries** to fetch document states efficiently. Because documents store structured data, developers can instantly query:
169
169
 
@@ -200,6 +200,6 @@ Document Models offer a range of features that can be leveraged to create sophis
200
200
 
201
201
  Document Models are a powerful primitive within the Powerhouse vision, offering a flexible, structured, and efficient way to manage business logic and data.
202
202
 
203
- ### Up Next: How to build a Document Model
203
+ ### Up next: How to build a document model
204
204
 
205
- In the next chapters, we'll teach you how to build a ToDoList document model while explaining all of the theory that is involved.
205
+ In the next chapters, we'll teach you how to build a To-do List document model while explaining all of the theory that is involved.