@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,15 +1,15 @@
1
1
  # Cookbook
2
2
 
3
- ## Powerhouse CLI Recipes
3
+ ## Powerhouse CLI recipes
4
4
  This section covers recipes related to the `ph-cmd`, the command-line tool for Powerhouse project initialization, code generation, package management, and running local development environments.
5
5
 
6
6
  <details id="installing-ph-cmd">
7
7
  <summary>Installing 'ph-cmd'</summary>
8
8
 
9
- ## How to Install Powerhouse CLI
9
+ ## How to install Powerhouse CLI
10
10
  ---
11
11
 
12
- ## Problem Statement
12
+ ## Problem statement
13
13
  You need to install the Powerhouse CLI (`ph-cmd`) to create and manage Powerhouse projects.
14
14
 
15
15
  ## Prerequisites
@@ -38,32 +38,32 @@ pnpm install -g ph-cmd@staging
38
38
  pnpm install -g ph-cmd@<version>
39
39
  ```
40
40
 
41
- ## Expected Outcome
41
+ ## Expected outcome
42
42
  - Powerhouse CLI (`ph-cmd`) installed globally on your system
43
43
  - Access to all Powerhouse CLI commands for project creation and management
44
44
 
45
- ## Common Issues and Solutions
45
+ ## Common issues and solutions
46
46
  - Issue: Permission errors during installation
47
47
  - Solution: Use `sudo` on Unix-based systems or run as administrator on Windows
48
48
  - Issue: Version conflicts
49
49
  - Solution: Clean your system using the uninstallation recipe before installing a new version
50
50
 
51
- ## Related Recipes
51
+ ## Related recipes
52
52
  - [Installing 'ph-cmd'](#installing-ph-cmd)
53
53
  - [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
54
54
  - [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
55
55
 
56
- ## Further Reading
56
+ ## Further reading
57
57
  - [Powerhouse Builder Tools](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
58
58
  </details>
59
59
 
60
60
  <details id="uninstalling-ph-cmd">
61
61
  <summary>Uninstalling 'ph-cmd'</summary>
62
62
 
63
- ## How to Uninstall Powerhouse CLI
63
+ ## How to uninstall Powerhouse CLI
64
64
  ---
65
65
 
66
- ## Problem Statement
66
+ ## Problem statement
67
67
  You want to perform a clean installation of the Powerhouse CLI.
68
68
 
69
69
  ## Prerequisites
@@ -82,19 +82,19 @@ pnpm uninstall -g ph-cmd
82
82
  rm -rf ~/.ph
83
83
  ```
84
84
 
85
- ## Expected Outcome
85
+ ## Expected outcome
86
86
  - Your system should now be clean from the Powerhouse CLI
87
87
 
88
- ## Common Issues and Solutions
88
+ ## Common issues and solutions
89
89
  - Issue: Outdated version
90
90
  - Solution: Uninstall and reinstall the Powerhouse CLI
91
91
 
92
- ## Related Recipes
92
+ ## Related recipes
93
93
  - [Installing 'ph-cmd'](#installing-ph-cmd)
94
94
  - [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
95
95
  - [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
96
96
 
97
- ## Further Reading
97
+ ## Further reading
98
98
  - [Powerhouse Builder Tools](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
99
99
  - [Create A New Powerhouse Project](/academy/GetStarted/CreateNewPowerhouseProject)
100
100
  </details>
@@ -102,10 +102,10 @@ rm -rf ~/.ph
102
102
  <details id="setting-up-or-resetting-the-global-powerhouse-configuration">
103
103
  <summary>Setting up or Resetting the Global Powerhouse Configuration</summary>
104
104
 
105
- ## How to Set Up or Reset the Global Powerhouse Configuration
105
+ ## How to set up or reset the global Powerhouse configuration
106
106
  ---
107
107
 
108
- ## Problem Statement
108
+ ## Problem statement
109
109
  You need to initialize the global Powerhouse configuration for the first time, or reset it to resolve issues or start fresh. This might also involve switching to a specific dependency environment like staging.
110
110
 
111
111
  ## Prerequisites
@@ -114,20 +114,20 @@ You need to initialize the global Powerhouse configuration for the first time, o
114
114
 
115
115
  ## Solution
116
116
 
117
- ### Step 1: (Optional) Remove Existing Configuration
117
+ ### Step 1: (Optional) Remove existing configuration
118
118
  If you suspect issues with your current global setup or want a completely clean slate, remove the existing global configuration directory. **Skip this if setting up for the first time.**
119
119
  ```bash
120
120
  # Use with caution: this removes your global settings and downloaded dependencies.
121
121
  rm -rf ~/.ph
122
122
  ```
123
123
 
124
- ### Step 2: Set Up Global Defaults
124
+ ### Step 2: Set up global defaults
125
125
  Initialize the default global project configuration.
126
126
  ```bash
127
127
  ph setup-globals
128
128
  ```
129
129
 
130
- ### Step 3: (Optional) Switch to a Specific Environment (e.g., Staging)
130
+ ### Step 3: (Optional) Switch to a specific environment (e.g., staging)
131
131
  If you need to use non-production dependencies, switch the global environment.
132
132
  ```bash
133
133
  # Switch to staging dependencies
@@ -137,23 +137,23 @@ ph use staging
137
137
  # ph use latest
138
138
  ```
139
139
 
140
- ## Expected Outcome
140
+ ## Expected outcome
141
141
  - A `~/.ph` directory is created or reset.
142
142
  - The global project is configured, potentially using the specified environment (e.g., staging).
143
143
  - You are ready to initialize or work with Powerhouse projects using the defined global settings.
144
144
 
145
- ## Common Issues and Solutions
145
+ ## Common issues and solutions
146
146
  - Issue: Commands fail after removing `~/.ph`.
147
147
  - Solution: Ensure you run `ph setup-globals` afterwards.
148
148
  - Issue: Need to use specific local dependencies globally.
149
149
  - Solution: Use `ph use local /path/to/local/packages`.
150
150
 
151
- ## Related Recipes
151
+ ## Related recipes
152
152
  - [Installing 'ph-cmd'](#installing-ph-cmd)
153
153
  - [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
154
154
  - [Using Different Branches in Powerhouse](#using-different-branches-in-powerhouse)
155
155
 
156
- ## Further Reading
156
+ ## Further reading
157
157
  - [Powerhouse Builder Tools](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
158
158
  - [GraphQL Schema Best Practices](/academy/MasteryTrack/WorkWithData/GraphQLAtPowerhouse)
159
159
  </details>
@@ -161,10 +161,10 @@ ph use staging
161
161
  <details id="using-different-branches-in-powerhouse">
162
162
  <summary>Using Different Branches in Powerhouse</summary>
163
163
 
164
- ## How to Use Different Branches in Powerhouse
164
+ ## How to use different branches in Powerhouse
165
165
  ---
166
166
 
167
- ## Problem Statement
167
+ ## Problem statement
168
168
  You need to access experimental features, bugfixes, or development versions of Powerhouse components that aren't yet available in the stable release.
169
169
 
170
170
  ## Prerequisites
@@ -174,7 +174,7 @@ You need to access experimental features, bugfixes, or development versions of P
174
174
 
175
175
  ## Solution
176
176
 
177
- ### Step 1: Install CLI with Specific Branch
177
+ ### Step 1: Install CLI with specific branch
178
178
  Choose the appropriate installation command based on your needs:
179
179
 
180
180
  ```bash
@@ -188,7 +188,7 @@ pnpm install -g ph-cmd@dev
188
188
  pnpm install -g ph-cmd@staging
189
189
  ```
190
190
 
191
- ### Step 2: Initialize Project with Specific Branch
191
+ ### Step 2: Initialize project with specific branch
192
192
  When creating a new project, you can specify which branch to use:
193
193
 
194
194
  ```bash
@@ -202,7 +202,7 @@ ph init --dev
202
202
  ph init --staging
203
203
  ```
204
204
 
205
- ### Step 3: Switch Dependencies for Existing Project
205
+ ### Step 3: Switch dependencies for existing project
206
206
  For existing projects, you can switch all dependencies to different versions:
207
207
 
208
208
  ```bash
@@ -216,33 +216,33 @@ ph use dev
216
216
  ph use prod
217
217
  ```
218
218
 
219
- ## Expected Outcome
219
+ ## Expected outcome
220
220
  - Access to the specified version of Powerhouse components
221
221
  - Ability to test experimental features or bugfixes
222
222
  - Project configured with the chosen branch's dependencies
223
223
 
224
- ## Common Issues and Solutions
224
+ ## Common issues and solutions
225
225
  - Issue: Experimental features not working as expected
226
226
  - Solution: This is normal as these versions may contain untested features. Consider switching back to stable versions if issues persist.
227
227
  - Issue: Version conflicts between components
228
228
  - Solution: Ensure all components are using the same branch version. Use `ph use` commands to synchronize versions.
229
229
 
230
- ## Related Recipes
230
+ ## Related recipes
231
231
  - [Installing 'ph-cmd'](#installing-ph-cmd)
232
232
  - Updating Your Powerhouse Project Dependencies
233
233
  - [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
234
234
 
235
- ## Further Reading
235
+ ## Further reading
236
236
  - [Powerhouse Builder Tools](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
237
237
  </details>
238
238
 
239
239
  <details id="using-different-package-managers-with-powerhouse">
240
240
  <summary>Using Different Package Managers with Powerhouse</summary>
241
241
 
242
- ## How to Use Different Package Managers with Powerhouse
242
+ ## How to use different package managers with Powerhouse
243
243
  ---
244
244
 
245
- ## Problem Statement
245
+ ## Problem statement
246
246
  You want to use a different package manager (npm, yarn, or bun) instead of pnpm for managing Powerhouse projects and dependencies.
247
247
 
248
248
  ## Prerequisites
@@ -312,12 +312,12 @@ ph init --package-manager bun
312
312
  ph init --package-manager pnpm
313
313
  ```
314
314
 
315
- ## Expected Outcome
315
+ ## Expected outcome
316
316
  - Powerhouse CLI installed and accessible through your preferred package manager
317
317
  - Ability to manage Powerhouse projects using your chosen package manager
318
318
  - Proper PATH configuration for global binaries
319
319
 
320
- ## Common Issues and Solutions
320
+ ## Common issues and solutions
321
321
  - Issue: Command not found after installation
322
322
  - Solution: Ensure the global binary directory is in your PATH (especially for yarn and bun)
323
323
  - Solution: Try running the command with the full path to verify installation
@@ -326,27 +326,27 @@ ph init --package-manager pnpm
326
326
  - Issue: Package manager conflicts
327
327
  - Solution: Stick to one package manager per project to avoid lockfile conflicts
328
328
 
329
- ## Related Recipes
329
+ ## Related recipes
330
330
  - [Installing 'ph-cmd'](#installing-ph-cmd)
331
331
  - [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
332
332
  - [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
333
333
 
334
- ## Further Reading
334
+ ## Further reading
335
335
  - [Powerhouse Builder Tools](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
336
336
  - [Yarn Global Installation Guide](https://classic.yarnpkg.com/lang/en/docs/cli/global/)
337
337
  - [Bun Installation Guide](https://bun.sh/docs/installation#how-to-add-your-path)
338
338
  </details>
339
339
 
340
- ## Powerhouse Environment Recipes
340
+ ## Powerhouse Environment recipes
341
341
  This section covers recipes for setting up and managing Powerhouse environments, from local development to production servers.
342
342
 
343
343
  <details id="setting-up-a-production-environment">
344
344
  <summary>Setting up a Production Environment</summary>
345
345
 
346
- ## How to Set Up a Production Powerhouse Environment
346
+ ## How to set up a Production Powerhouse Environment
347
347
  ---
348
348
 
349
- ## Problem Statement
349
+ ## Problem statement
350
350
  You need to set up a new production-ready server to host and run your Powerhouse services (Connect and Switchboard).
351
351
 
352
352
  ## Prerequisites
@@ -385,13 +385,13 @@ During the setup, you will be prompted for:
385
385
  - **Database:** Choose between a local PostgreSQL setup or connecting to a remote database.
386
386
  - **SSL Certificate:** Select Let's Encrypt for a production setup. You will need to provide your domain and subdomains.
387
387
 
388
- ## Expected Outcome
388
+ ## Expected outcome
389
389
  - Powerhouse Connect and Switchboard services are installed, configured, and running on your server.
390
390
  - Nginx is set up as a reverse proxy with SSL certificates from Let's Encrypt.
391
391
  - Services are managed by PM2 and will restart automatically on boot or if they crash.
392
392
  - You can access your services securely at `https://connect.yourdomain.com` and `https://switchboard.yourdomain.com`.
393
393
 
394
- ## Common Issues and Solutions
394
+ ## Common issues and solutions
395
395
  - **Issue:** `ph: command not found`
396
396
  - **Solution:** Ensure you have reloaded your shell with `source ~/.bashrc` or have restarted your terminal session.
397
397
  - **Issue:** Let's Encrypt SSL certificate creation fails.
@@ -399,23 +399,23 @@ During the setup, you will be prompted for:
399
399
  - **Issue:** Services fail to start.
400
400
  - **Solution:** Check the service logs for errors using `ph service logs` or `pm2 logs`.
401
401
 
402
- ## Related Recipes
402
+ ## Related recipes
403
403
  - [Installing a Custom Powerhouse Package](#installing-a-custom-powerhouse-package)
404
404
 
405
- ## Further Reading
405
+ ## Further reading
406
406
  - [Full Setup Guide](/academy/MasteryTrack/Launch/SetupEnvironment)
407
407
  </details>
408
408
 
409
- ## Powerhouse Project Recipes
409
+ ## Powerhouse Project recipes
410
410
  This section focuses on creating, configuring, and managing Powerhouse projects, which are collections of document models, editors, and other resources.
411
411
 
412
412
  <details id="initializing-a-new-project-and-document-model">
413
413
  <summary>Initializing a New Project & Document Model</summary>
414
414
 
415
- ## How to Initialize a new project and document model
415
+ ## How to initialize a new project and document model
416
416
  ---
417
417
 
418
- ## Problem Statement
418
+ ## Problem statement
419
419
  You need to create a new, empty document model within a Powerhouse project using the local Connect application (Studio mode) to represent a workflow of a business process.
420
420
 
421
421
  ## Prerequisites
@@ -455,11 +455,11 @@ Click on your local drive displayed on the Connect interface.
455
455
  ### Step 6: Create the Document Model
456
456
  In the "New Document" section at the bottom of the page, click the `DocumentModel` button.
457
457
 
458
- ## Expected Outcome
458
+ ## Expected outcome
459
459
  - An empty document model is created and opened in the Document Model Editor within the Connect application.
460
460
  - You are ready to start defining the schema and logic for your new model.
461
461
 
462
- ## Common Issues and Solutions
462
+ ## Common issues and solutions
463
463
  - Issue: `ph connect` command fails.
464
464
  - Solution: Ensure `ph-cmd` is installed correctly (`ph-cmd --version`). Check for port conflicts if `3000` is already in use. Make sure you are inside the project directory created by `ph init`.
465
465
  - Issue: Browser window doesn't open automatically.
@@ -467,12 +467,12 @@ In the "New Document" section at the bottom of the page, click the `DocumentMode
467
467
  - Issue: Cannot find the `DocumentModel` button.
468
468
  - Solution: Ensure you have navigated into your local drive within the Connect application first.
469
469
 
470
- ## Related Recipes
470
+ ## Related recipes
471
471
  - [Initializing a Powerhouse Project](#powerhouse-cli-recipes)
472
472
  - Designing a Document Model Schema (WIP)
473
473
  - Implementing Document Model Reducers (Details to be added)
474
474
 
475
- ## Further Reading
475
+ ## Further reading
476
476
  - [GraphQL Schema Best Practices](/academy/MasteryTrack/WorkWithData/GraphQLAtPowerhouse)
477
477
  </details>
478
478
 
@@ -482,7 +482,7 @@ In the "New Document" section at the bottom of the page, click the `DocumentMode
482
482
  ## How to Generate Reducers from a Document Model File
483
483
  ---
484
484
 
485
- ## Problem Statement
485
+ ## Problem statement
486
486
  You have a Powerhouse Document Model defined in a `.phdm` or `.phdm.zip` file and need to generate the corresponding reducer functions for your project.
487
487
 
488
488
  ## Prerequisites
@@ -508,14 +508,14 @@ ph generate todo.phdm.zip
508
508
  ### Step 3: Integrate Generated Code
509
509
  The command will output the generated reducer scaffolding code in the designated folders.
510
510
 
511
- ## Expected Outcome
511
+ ## Expected outcome
512
512
  - Reducer functions corresponding to the operations defined in your document model are generated.
513
513
  - The generated code is ready to be integrated into your project's state management logic.
514
514
 
515
- ## Common Issues and Solutions
515
+ ## Common issues and solutions
516
516
 
517
517
 
518
- ## Related Recipes
518
+ ## Related recipes
519
519
  - [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
520
520
  - Generating a Document Editor
521
521
 
@@ -527,7 +527,7 @@ The command will output the generated reducer scaffolding code in the designated
527
527
  ## How to Update Your Powerhouse Project Dependencies
528
528
  ---
529
529
 
530
- ## Problem Statement
530
+ ## Problem statement
531
531
  The update command allows you to update your Powerhouse dependencies to their latest versions based on the version ranges specified in your package.json.
532
532
 
533
533
  ```bash
@@ -562,7 +562,7 @@ ph update --package-manager pnpm
562
562
  ## How to Run Connect with HTTPS and a Custom Port
563
563
  ---
564
564
 
565
- ## Problem Statement
565
+ ## Problem statement
566
566
  You need to run the local Powerhouse Connect application using HTTPS, possibly on a different port than the default, for scenarios like testing on a remote server (e.g., EC2) or complying with specific network requirements.
567
567
 
568
568
  ## Prerequisites
@@ -594,11 +594,11 @@ https://<your-hostname-or-ip>:<port>
594
594
  ```
595
595
  You might encounter a browser warning about the self-signed certificate; you may need to accept the risk to proceed for local/development testing.
596
596
 
597
- ## Expected Outcome
597
+ ## Expected outcome
598
598
  - The Powerhouse Connect application starts and serves traffic over HTTPS on the specified port.
599
599
  - You can access the Connect interface securely using the `https` protocol.
600
600
 
601
- ## Common Issues and Solutions
601
+ ## Common issues and solutions
602
602
  - Issue: Browser shows security warnings (e.g., "Your connection is not private").
603
603
  - Solution: This is expected when using the default self-signed certificate generated by `--https`. For development or internal testing, you can usually proceed by accepting the risk. For production or public-facing scenarios, configure Connect with properly signed certificates (consult Powerhouse documentation for advanced configuration).
604
604
  - Issue: Port conflict (e.g., `"Port <port> is already in use"`).
@@ -606,10 +606,10 @@ You might encounter a browser warning about the self-signed certificate; you may
606
606
  - Issue: Cannot access Connect from a remote machine.
607
607
  - Solution: Ensure the port is open in any firewalls (on the server and potentially network firewalls). Verify you are using the correct public IP address or hostname of the machine running Connect.
608
608
 
609
- ## Related Recipes
609
+ ## Related recipes
610
610
  - [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
611
611
 
612
- ## Further Reading
612
+ ## Further reading
613
613
  - [Powerhouse Builder Tools](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
614
614
  - [GraphQL Schema Best Practices](/academy/MasteryTrack/WorkWithData/GraphQLAtPowerhouse)
615
615
  </details>
@@ -624,7 +624,7 @@ This section provides guidance on generating and customizing editors for Documen
624
624
  ## How to Generate a Document Editor
625
625
  ---
626
626
 
627
- ## Problem Statement
627
+ ## Problem statement
628
628
  You have a Powerhouse document model and need to create a user interface (editor) for it to be used within the Connect application.
629
629
 
630
630
  ## Prerequisites
@@ -644,21 +644,21 @@ cd <yourprojectname>
644
644
  Run the `generate` command, specifying the editor name (usually matching the document model name) and the associated document type.
645
645
 
646
646
  ```bash
647
- # Replace <ModelName> with the name of your document model (e.g., ToDoList)
647
+ # Replace <ModelName> with the name of your document model (e.g., To-do List)
648
648
  # Replace <docType> with the identifier for your document (e.g., powerhouse/todolist)
649
649
  ph generate --editor <ModelName> --document-types <docType>
650
650
  ```
651
651
 
652
- ## Expected Outcome
652
+ ## Expected outcome
653
653
  - A new directory is created under `editors/` (e.g., `editors/<model-name>/`).
654
654
  - An `editor.tsx` file is generated within that directory, containing a basic template for your document editor.
655
655
  - You can now customize `editor.tsx` to build your desired UI using HTML, Tailwind CSS, or custom CSS.
656
656
 
657
- ## Related Recipes
657
+ ## Related recipes
658
658
  - [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
659
659
  - [Generating a Custom Drive Explorer](#generating-a-custom-drive-explorer)
660
660
 
661
- ## Further Reading
661
+ ## Further reading
662
662
  - [Build a Todo-list Editor](/academy/GetStarted/BuildToDoListEditor)
663
663
  </details>
664
664
 
@@ -668,7 +668,7 @@ ph generate --editor <ModelName> --document-types <docType>
668
668
  ## How to Generate a Custom Drive Explorer
669
669
  ---
670
670
 
671
- ## Problem Statement
671
+ ## Problem statement
672
672
  You need a custom, application-like interface to browse, organize, or interact with specific types of documents stored within a Powerhouse drive, going beyond the standard file listing.
673
673
 
674
674
  ## Prerequisites
@@ -691,16 +691,16 @@ Run the `generate` command, specifying the `--drive-editor` flag and a name for
691
691
  ph generate --drive-editor <drive-app-name>
692
692
  ```
693
693
 
694
- ## Expected Outcome
694
+ ## Expected outcome
695
695
  - A new directory is created under `editors/` (e.g., `editors/<drive-app-name>/`).
696
696
  - Template files (`EditorContainer.tsx`, components, hooks, etc.) are generated within that directory, providing a basic structure for a drive explorer.
697
697
  - You can now customize these files to create your specific drive interface, potentially removing default components and adding custom views relevant to your document models.
698
698
  - Remember to update your `powerhouse.manifest.json` to register the new app.
699
699
 
700
- ## Related Recipes
700
+ ## Related recipes
701
701
  - [Generating a Document Editor](#generating-a-document-editor)
702
702
 
703
- ## Further Reading
703
+ ## Further reading
704
704
  - [Build a Drive-Explorer](/academy/MasteryTrack/BuildingUserExperiences/BuildingADriveExplorer)
705
705
  </details>
706
706
 
@@ -710,7 +710,7 @@ ph generate --drive-editor <drive-app-name>
710
710
  ## How to Add a New Remote Drive via GraphQL Mutation
711
711
  ---
712
712
 
713
- ## Problem Statement
713
+ ## Problem statement
714
714
  You want to programmatically add a new remote drive to your Powerhouse Connect environment using a GraphQL mutation. This is useful for automation, scripting, or integrating with external systems.
715
715
 
716
716
  ## Prerequisites
@@ -772,22 +772,22 @@ Once you have the `id` or `slug`, you can construct the drive URL for Connect:
772
772
  ### Step 5: Add the Drive in Connect
773
773
  Use the constructed URL to add or access the drive in your Connect environment.
774
774
 
775
- ## Expected Outcome
775
+ ## Expected outcome
776
776
  - A new drive is created and accessible in your Connect environment.
777
777
  - The drive can be managed or accessed using the generated URL.
778
778
 
779
- ## Related Recipes
779
+ ## Related recipes
780
780
  - [Configuring Drives](/academy/MasteryTrack/BuildingUserExperiences/ConfiguringDrives)
781
781
  - [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
782
782
 
783
- ## Further Reading
783
+ ## Further reading
784
784
  - [GraphQL Playground](https://www.apollographql.com/docs/apollo-server/testing/graphql-playground/)
785
785
  - [Powerhouse Builder Tools](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
786
786
 
787
787
  </details>
788
788
 
789
789
 
790
- ## Reactor Recipes
790
+ ## Reactor recipes
791
791
  Learn how to manage the Powerhouse Reactor, the local service for processing document model operations and state.
792
792
 
793
793
  <details id="starting-the-reactor">
@@ -796,7 +796,7 @@ Learn how to manage the Powerhouse Reactor, the local service for processing doc
796
796
  ## How to Start the Powerhouse Reactor
797
797
  ---
798
798
 
799
- ## Problem Statement
799
+ ## Problem statement
800
800
  You need to start the Powerhouse Reactor, the local service responsible for processing document model operations and managing state, typically for testing or development purposes.
801
801
 
802
802
  ## Prerequisites
@@ -818,24 +818,24 @@ Execute the `ph reactor` command.
818
818
  ph reactor
819
819
  ```
820
820
 
821
- ## Expected Outcome
821
+ ## Expected outcome
822
822
  - The Reactor service starts, typically listening on `localhost:4001`.
823
823
  - You will see log output indicating the reactor is running and ready to process operations.
824
824
  - A GraphQL endpoint is usually available at `http://localhost:4001/graphql` for direct interaction and testing.
825
825
 
826
- ## Common Issues and Solutions
826
+ ## Common issues and solutions
827
827
  - Issue: Reactor fails to start, mentioning port conflicts.
828
828
  - Solution: Ensure port `4001` (or the configured reactor port) is not already in use by another application. Stop the conflicting application or configure the reactor to use a different port (if possible, check documentation).
829
829
  - Issue: Errors related to storage or configuration.
830
830
  - Solution: Check the `powerhouse.manifest.json` and any reactor-specific configuration files for errors. Ensure storage providers (like local disk) are accessible and configured correctly.
831
831
 
832
- ## Related Recipes
832
+ ## Related recipes
833
833
  - [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
834
834
  - Testing with GraphQL (Details to be added)
835
835
 
836
836
  </details>
837
837
 
838
- ## Package Development Recipes
838
+ ## Package Development recipes
839
839
  These recipes guide you through creating, installing, and managing Powerhouse Packages, which are reusable collections of document models and editors.
840
840
 
841
841
  <details id="installing-a-custom-powerhouse-package">
@@ -844,7 +844,7 @@ These recipes guide you through creating, installing, and managing Powerhouse Pa
844
844
  ## How to Install a Custom Powerhouse Package
845
845
  ---
846
846
 
847
- ## Problem Statement
847
+ ## Problem statement
848
848
  You have developed and published a Powerhouse package (containing document models, editors, etc.) to npm, or you have a local package, and you need to install it into another Powerhouse project.
849
849
 
850
850
  ## Prerequisites
@@ -881,12 +881,12 @@ ph install /Users/you/dev/my-local-package
881
881
  ### Step 3: Verify Installation
882
882
  Check your project's `package.json` and `powerhouse.manifest.json` to ensure the package dependency has been added correctly. Run `ph connect` to see if the components from the installed package are available.
883
883
 
884
- ## Expected Outcome
884
+ ## Expected outcome
885
885
  - The custom Powerhouse package is downloaded and installed into your project's dependencies.
886
886
  - The `powerhouse.manifest.json` is updated (if necessary) to reflect the installed package.
887
887
  - Document models, editors, drive explorers, or other components from the package become available within the target project.
888
888
 
889
- ## Common Issues and Solutions
889
+ ## Common issues and solutions
890
890
  - Issue: Package not found (npm).
891
891
  - Solution: Double-check the package name for typos. Ensure the package is published and accessible on npm.
892
892
  - Issue: Path not found (local).
@@ -894,7 +894,7 @@ Check your project's `package.json` and `powerhouse.manifest.json` to ensure the
894
894
  - Issue: Conflicts with existing project components or dependencies.
895
895
  - Solution: Resolve version conflicts or naming collisions as needed. Review the installed package's structure and dependencies.
896
896
 
897
- ## Related Recipes
897
+ ## Related recipes
898
898
  - [Publishing a Powerhouse Package](#publishing-a-powerhouse-package)
899
899
  - [Initializing a Powerhouse Project](#initializing-a-new-project-and-document-model)
900
900
 
@@ -907,7 +907,7 @@ Check your project's `package.json` and `powerhouse.manifest.json` to ensure the
907
907
  ---
908
908
  > **Note:** This is a temporary solution until version control is fully implemented in Powerhouse. Future updates may change how dependencies are managed.
909
909
 
910
- ## Problem Statement
910
+ ## Problem statement
911
911
  You need to understand and manage different types of dependencies in your Powerhouse project, including:
912
912
  - Monorepo dependencies (from the Powerhouse core repository)
913
913
  - Project-specific dependencies (from published npm packages)
@@ -968,12 +968,12 @@ You need to understand and manage different types of dependencies in your Powerh
968
968
  - Other projects will still download the latest published version from npm
969
969
  - For testing, you can publish to your own npm account
970
970
 
971
- ## Expected Outcome
971
+ ## Expected outcome
972
972
  - Clear understanding of different dependency types
973
973
  - Ability to manage and update dependencies appropriately
974
974
  - Knowledge of when to publish updated packages
975
975
 
976
- ## Common Issues and Solutions
976
+ ## Common issues and solutions
977
977
  - Issue: Dependencies not updating as expected
978
978
  - Solution: Ensure you're using the correct `ph use` command for your needs
979
979
  - Issue: Breaking changes after updates
@@ -981,12 +981,12 @@ You need to understand and manage different types of dependencies in your Powerh
981
981
  - Issue: Confusion about which version is being used
982
982
  - Solution: Check your package.json and powerhouse.manifest.json for current versions
983
983
 
984
- ## Related Recipes
984
+ ## Related recipes
985
985
  - [Installing 'ph-cmd'](#installing-ph-cmd)
986
986
  - [Using Different Branches in Powerhouse](#using-different-branches-in-powerhouse)
987
987
  - [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
988
988
 
989
- ## Further Reading
989
+ ## Further reading
990
990
  - [Powerhouse Builder Tools](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
991
991
  - [GraphQL Schema Best Practices](/academy/MasteryTrack/WorkWithData/GraphQLAtPowerhouse)
992
992
 
@@ -998,7 +998,7 @@ You need to understand and manage different types of dependencies in your Powerh
998
998
  ## How to Package and Publish a Powerhouse Project
999
999
  ---
1000
1000
 
1001
- ## Problem Statement
1001
+ ## Problem statement
1002
1002
  You have created a collection of document models, editors, or other components and want to share it as a reusable package on a public or private npm registry. Publishing a package allows other projects to install and use your creations easily.
1003
1003
 
1004
1004
  ## Prerequisites
@@ -1051,22 +1051,22 @@ git push
1051
1051
  git push --tags
1052
1052
  ```
1053
1053
 
1054
- ## Expected Outcome
1054
+ ## Expected outcome
1055
1055
  - Your Powerhouse project is successfully published to the npm registry.
1056
1056
  - Other developers can now install your package into their projects using `ph install @your-org/your-package-name`.
1057
1057
  - Your Git repository is updated with the new version information.
1058
1058
 
1059
- ## Common Issues and Solutions
1059
+ ## Common issues and solutions
1060
1060
  - **Issue**: "403 Forbidden" or "You do not have permission" error on publish.
1061
1061
  - **Solution**: Ensure your package name is unique and not already taken on npm. If it's a scoped package (`@scope/name`), make sure the organization exists and you have permission to publish to it. For public scoped packages, you must include `--access public`.
1062
1062
 
1063
- ## Related Recipes
1063
+ ## Related recipes
1064
1064
  - [Installing a Custom Powerhouse Package](#installing-a-custom-powerhouse-package)
1065
1065
  - [Managing Powerhouse Dependencies and Versions](#managing-powerhouse-dependencies-and-versions)
1066
1066
 
1067
1067
  </details>
1068
1068
 
1069
- ## Data Synchronisation Recipes
1069
+ ## Data Synchronisation recipes
1070
1070
  This section helps troubleshoot and understand data synchronization within the Powerhouse ecosystem, including interactions between different services and components.
1071
1071
 
1072
1072
  <details id="troubleshooting-document-syncing">
@@ -1075,7 +1075,7 @@ This section helps troubleshoot and understand data synchronization within the P
1075
1075
  ## Troubleshooting Document Syncing: Supergraph vs. Drive Endpoints
1076
1076
  ---
1077
1077
 
1078
- ## Problem Statement
1078
+ ## Problem statement
1079
1079
  You've created or modified documents within a specific drive using Powerhouse Connect, but when you query the main GraphQL endpoint (`http://localhost:4001/graphql`), you don't see the changes or the documents you expected. This can lead to confusion about whether data is being synced correctly.
1080
1080
 
1081
1081
  ## Prerequisites
@@ -1118,13 +1118,13 @@ Understanding the different GraphQL endpoints in Powerhouse is crucial for effec
1118
1118
  * Try deleting the `.ph` folder in your user's home directory (`~/.ph`). This folder stores global Powerhouse configurations and cached dependencies.
1119
1119
  * Clear browser storage (localStorage, IndexedDB) for the Connect application.
1120
1120
 
1121
- ## Expected Outcome
1121
+ ## Expected outcome
1122
1122
  - You can correctly identify which GraphQL endpoint to use for different types of queries and operations.
1123
1123
  - You understand that document-specific operations (like creating or updating documents in a drive) are typically handled by drive-specific endpoints.
1124
1124
  - You can use browser developer tools to inspect network requests and confirm which endpoints Powerhouse Connect is using.
1125
1125
  - Documents sync as expected, and you can retrieve their state by querying the appropriate endpoint.
1126
1126
 
1127
- ## Common Issues and Solutions
1127
+ ## Common issues and solutions
1128
1128
  - **Issue:** Documents created in Connect don't appear when querying `http://localhost:4001/graphql`.
1129
1129
  - **Solution:** You are likely querying the general supergraph. For document-specific data, ensure you are targeting the drive's endpoint (e.g., `http://localhost:4001/d/<driveId>`) or using queries designed to fetch data from specific drives. Inspect Connect's network activity to see the endpoint it uses for `pushUpdates`.
1130
1130
  - **Issue:** Persistent syncing problems or unexpected behavior after trying the above.
@@ -1138,7 +1138,7 @@ Understanding the different GraphQL endpoints in Powerhouse is crucial for effec
1138
1138
  ## How to Reset Your Localhost Environment
1139
1139
  ---
1140
1140
 
1141
- ## Problem Statement
1141
+ ## Problem statement
1142
1142
  You are running Powerhouse Connect locally (via `ph connect`), but you can't find your local drive in the interface. Alternatively, you can see the drive or have recreated it, but the `DocumentModel` button is missing, preventing you from creating new document model schemas.
1143
1143
 
1144
1144
  ## Prerequisites
@@ -1160,16 +1160,16 @@ Click the "Clear storage" button. A confirmation prompt may appear. Confirming t
1160
1160
  ### Step 4: Verify the Reset
1161
1161
  The application should automatically refresh and re-initialize its state. If it doesn't, manually reload the page. Your local drive should now be present with the `DocumentModel` button restored.
1162
1162
 
1163
- ## Expected Outcome
1163
+ ## Expected outcome
1164
1164
  - Your local drive is visible again in the Powerhouse Connect UI.
1165
1165
  - The `DocumentModel` button is available inside the local drive.
1166
1166
  - You can proceed to create and edit document models in your local environment.
1167
1167
 
1168
- ## Common Issues and Solutions
1168
+ ## Common issues and solutions
1169
1169
  - **Issue**: The problem persists after clearing storage.
1170
1170
  - **Solution**: Try clearing your browser's cache and cookies for the localhost domain. As a last resort, follow the recipe for [Clearing Package Manager Caches](#clearing-package-manager-caches) and reinstalling dependencies.
1171
1171
 
1172
- ## Related Recipes
1172
+ ## Related recipes
1173
1173
  - [Troubleshooting Document Syncing](#troubleshooting-document-syncing)
1174
1174
  - [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
1175
1175
 
@@ -1181,7 +1181,7 @@ The application should automatically refresh and re-initialize its state. If it
1181
1181
  ## How to Clear Package Manager Caches
1182
1182
  ---
1183
1183
 
1184
- ## Problem Statement
1184
+ ## Problem statement
1185
1185
  You are encountering unexpected issues with dependencies, `ph-cmd` installation, or package resolution. Corrupted or outdated caches for your package manager (pnpm, npm, yarn) can often be the cause. Clearing the cache forces the package manager to refetch packages, which can resolve these problems.
1186
1186
 
1187
1187
  ## Prerequisites
@@ -1225,16 +1225,16 @@ yarn cache list
1225
1225
  yarn cache clean --force
1226
1226
  ```
1227
1227
 
1228
- ## Expected Outcome
1228
+ ## Expected outcome
1229
1229
  - The package manager's cache is cleared or verified.
1230
1230
  - Subsequent installations will fetch fresh versions of packages, potentially resolving dependency-related errors.
1231
1231
  - Your system is in a cleaner state for managing Powerhouse project dependencies.
1232
1232
 
1233
- ## Common Issues and Solutions
1233
+ ## Common issues and solutions
1234
1234
  - **Issue**: Problems persist after clearing the cache.
1235
1235
  - **Solution**: The issue might not be cache-related. Consider completely removing `node_modules` and lockfiles (`pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`) and running `pnpm install` (or equivalent) again.
1236
1236
 
1237
- ## Related Recipes
1237
+ ## Related recipes
1238
1238
  - [Installing 'ph-cmd'](#installing-ph-cmd)
1239
1239
  - [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
1240
1240
  - [Managing Powerhouse Dependencies and Versions](#managing-powerhouse-dependencies-and-versions)