@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.
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +9 -0
- package/Dockerfile +31 -0
- package/ProcFile +1 -0
- package/README.md +43 -0
- package/babel.config.js +3 -0
- package/blog/BeyondCommunication-ABlueprintForDevelopment.md +88 -0
- package/blog/TheChallengeOfChange.md +86 -0
- package/blog/images/Iteration.png +0 -0
- package/blog/images/RAD.png +0 -0
- package/docs/academy/01-GetStarted/00-GetStarted.mdx +181 -0
- package/docs/academy/01-GetStarted/01_InstallDemoPackage.md +38 -0
- package/docs/academy/01-GetStarted/02-ToDoList/01-CreateNewPowerhouseProject.md +97 -0
- package/docs/academy/01-GetStarted/02-ToDoList/02-DefineToDoListDocumentModel.md +86 -0
- package/docs/academy/01-GetStarted/02-ToDoList/03-ImplementOperationReducers.md +201 -0
- package/docs/academy/01-GetStarted/02-ToDoList/04-BuildToDoListEditor.md +494 -0
- package/docs/academy/01-GetStarted/02-ToDoList/_category_.json +8 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/DocumentModelHeader.png +0 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/DocumentModelOperations.png +0 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/OpenDocumentModelEditor.gif +0 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/completeEditor.png +0 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/connectApp.gif +0 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/form.png +0 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/mytodolist.gif +0 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/reducers.png +0 -0
- package/docs/academy/01-GetStarted/02-ToDoList/images/vscode.png +0 -0
- package/docs/academy/01-GetStarted/styles.module.css +99 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/00-BuilderTools.md +234 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/01-SetupBuilderEnvironment.md +247 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/04-UtilitiesAndTips.md +79 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/01-SetupBuilderEnvironment.md +216 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/02-CreateNewPowerhouseProject.md +78 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/03-DefineChatroomDocumentModel.md +139 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/04-ImplementOperationReducers.md +364 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/05-ImplementChatroomEditor.md +194 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/06-LaunchALocalReactor.md +15 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/_category_.json +8 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-1.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-2.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-3.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-4.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image-5.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/image.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/ChatRoomConnectApp.gif +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/ChatRoomTest.gif +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/completeEditor.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/form.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/reducers.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/Chatroom/images/vscode.png +0 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/_category_.json +8 -0
- package/docs/academy/02-AdvancedTutorial/01-Create/02-StandardDocumentModelWorkflow.md +229 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/01-BuildingBeautifulDocumentEditors.md +109 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/02-ConfiguringDrives.md +51 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/03-BuildingADriveExplorer.md +174 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/01-OperationHistory.md +67 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/02-RevisionHistoryTimeline.md +132 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/_category_.json +7 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/images/committer-address-popup.png +0 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/images/revision-hash-popup.png +0 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/images/revision-history-list.png +0 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/07-DocumentTools/images/signature-details-popup.png +0 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/_category_.json +8 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/images/CreateDrive.png +0 -0
- package/docs/academy/02-AdvancedTutorial/03-BuildingUserExperiences/images/mytodolist.gif +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/01-ReadingAndWritingThroughTheAPI.mdx +121 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/02-GraphQLAtPowerhouse.md +156 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/03-WorkingWithSubgraphs/02-GraphQLAndSubgraphs.mdx +119 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/03-WorkingWithSubgraphs/03-WorkingWithSubgraphs.md +312 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/03-WorkingWithSubgraphs/_category_.json +8 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/04-analytics-processor.md +342 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/01-SetupBuilderEnvironment.md +215 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/02-CreateNewPowerhouseProject.md +55 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/03-GenerateAnAnalyticsProcessor.md +173 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/04-UpdateAnalyticsProcessor.md +223 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/_category_.json +8 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-SPV.gif +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-a-new-asset.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-a-transaction.gif +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Transaction-table.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/create-a-new-RWA-document.gif +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/05-AnalyticsProcessorTutorial/images/granularity.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/QueryingADocumentWithGraphQL.md +244 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/listener-raw.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/raw-reports1.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/raw-reports2.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/rwaRegister.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/apse.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/best-practices.md +60 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/filter.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/filteroptions.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/graphql/index.md +166 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/graphql/integration.md +75 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/dbs.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/high-level.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/indexeddb.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/libs-core.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/libs.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/lod.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/logo.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/navbar.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-1.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-2.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-3.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-4.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-5.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/overview-6.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/paths-1.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/images/paths-2.jpg +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/intro.md +149 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/benchmarks.md +27 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/browser.md +77 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/compatibility.md +14 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/index.md +230 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/memory.md +72 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/pg.md +63 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/schema.md +14 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/typescript/utilities.md +102 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/use-cases/index.md +7 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/use-cases/maker.md +652 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/06-Analytics Engine/use-cases/processors.md +3 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/_category_.json +8 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/images/OperationHistory.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/images/OperationsQuery.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/images/QueryDocumentID.png +0 -0
- package/docs/academy/02-AdvancedTutorial/04-WorkWithData/images/SwitchboardButton.png +0 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/00-IntegrateInAFront-End +3 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/01-IntroducingFusion +18 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/02-IntroductionToPackages.md +79 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/02-PublishYourProject.md +230 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/03-RunOnACloudServer.md +279 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/03-SetupEnvironment.md +436 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/04-GraphQLNamespacing +44 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/05-LaunchYourBackend.md +3 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/06-LaunchYourFrontend.md +3 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/_category_.json +8 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/images/SSHConnection.png +0 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/images/homedesign.png +0 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/images/keyconcepts.png +0 -0
- package/docs/academy/02-AdvancedTutorial/05-Launch/images/tutorialschema.png +0 -0
- package/docs/academy/02-AdvancedTutorial/06-Authorization/Authorization.md +100 -0
- package/docs/academy/02-AdvancedTutorial/_category_.json +7 -0
- package/docs/academy/03-APIReferences/00-PowerhouseCLI.md +1 -0
- package/docs/academy/03-APIReferences/_category_.json +7 -0
- package/docs/academy/04-ComponentLibrary/01-PowerhouseDesignSystem.md +94 -0
- package/docs/academy/04-ComponentLibrary/02-BuildingWithScalars.md +54 -0
- package/docs/academy/04-ComponentLibrary/03-Scalar-Components/01-phid-field.mdx +72 -0
- package/docs/academy/04-ComponentLibrary/03-Scalar-Components/02-input-field.mdx +0 -0
- package/docs/academy/04-ComponentLibrary/04-Complex-Components/01-sidebar.mdx +36 -0
- package/docs/academy/04-ComponentLibrary/05-Layout-Components/01-test-toupdate.mdx +61 -0
- package/docs/academy/04-ComponentLibrary/06-Fragments/01-test-toupdate.mdx +61 -0
- package/docs/academy/04-ComponentLibrary/_category_.json +8 -0
- package/docs/academy/05-Architecture/00-PowerhouseArchitecture.md +50 -0
- package/docs/academy/05-Architecture/01-WorkingWithTheReactor.md +48 -0
- package/docs/academy/05-Architecture/02-ReferencingMonorepoPackages +65 -0
- package/docs/academy/05-Architecture/04-MovingBeyondCRUD +61 -0
- package/docs/academy/05-Architecture/05-DocumentModelTheory/01-WhatIsADocumentModel.md +188 -0
- package/docs/academy/05-Architecture/05-DocumentModelTheory/02-DAOandDocumentsModelsQ+A.md +177 -0
- package/docs/academy/05-Architecture/05-DocumentModelTheory/02-domain-modeling.md +103 -0
- package/docs/academy/05-Architecture/05-DocumentModelTheory/03-BenefitsOfDocumentModels.md +95 -0
- package/docs/academy/05-Architecture/05-DocumentModelTheory/05-best-practices.md +257 -0
- package/docs/academy/05-Architecture/05-DocumentModelTheory/_category_.json +8 -0
- package/docs/academy/05-Architecture/05-DocumentModelTheory/three-data-layers.png +0 -0
- package/docs/academy/05-Architecture/_category_.json +7 -0
- package/docs/academy/05-Architecture/images/image.png +0 -0
- package/docs/academy/06-Cookbook.md +905 -0
- package/docs/academy/07-Glossary.md +50 -0
- package/docs/bookofpowerhouse/01-Overview.md +29 -0
- package/docs/bookofpowerhouse/02-GeneralFrameworkAndPhilosophy.md +15 -0
- package/docs/bookofpowerhouse/03-PowerhouseSoftwareArchitecture.md +33 -0
- package/docs/bookofpowerhouse/04-DevelopmentApproaches.md +36 -0
- package/docs/bookofpowerhouse/05-SNOsandANewModelForOSSandPublicGoods.md +73 -0
- package/docs/bookofpowerhouse/06-SNOsInActionAndPlatformEconomies.md +17 -0
- package/docs/renown/01-intro.md +18 -0
- package/docs/renown/02-renown-login-flow.md +60 -0
- package/docusaurus +0 -0
- package/docusaurus.config.ts +170 -0
- package/package.json +50 -0
- package/powerhouse-docs@0.0.0 +0 -0
- package/sidebars.ts +33 -0
- package/src/components/HomepageFeatures/index.tsx +250 -0
- package/src/components/HomepageFeatures/styles.module.css +267 -0
- package/src/css/custom.css +450 -0
- package/src/pages/index.module.css +37 -0
- package/src/pages/index.tsx +42 -0
- package/src/pages/markdown-page.md +7 -0
- package/static/.nojekyll +0 -0
- package/static/fonts/FranieBold.otf +0 -0
- package/static/fonts/FranieRegular.otf +0 -0
- package/static/img/Powerhouse Website Drive.png +0 -0
- package/static/img/Powerhouse Website Storage Layer (1).png +0 -0
- package/static/img/Powerhouse Website Storage Layer.png +0 -0
- package/static/img/Powerhouse-main-light.svg +13 -0
- package/static/img/Powerhouse-main.svg +13 -0
- package/static/img/Renown Intro Diagram.png +0 -0
- package/static/img/Union.svg +3 -0
- package/static/img/academy/icons/Advanced.svg +4 -0
- package/static/img/academy/icons/Book.svg +5 -0
- package/static/img/academy/icons/Cookbook.svg +3 -0
- package/static/img/academy/icons/Create.svg +3 -0
- package/static/img/academy/icons/Data.svg +3 -0
- package/static/img/academy/icons/Editor.svg +3 -0
- package/static/img/academy/icons/Flash.svg +3 -0
- package/static/img/academy/icons/Launch.svg +3 -0
- package/static/img/academy-icon.png +0 -0
- package/static/img/connect-icon.png +0 -0
- package/static/img/connect.png +0 -0
- package/static/img/docusaurus-social-card.jpg +0 -0
- package/static/img/docusaurus.png +0 -0
- package/static/img/empty-background.png +0 -0
- package/static/img/favicon.ico +0 -0
- package/static/img/fusion-icon.png +0 -0
- package/static/img/fusion.png +0 -0
- package/static/img/ph-icon-light.svg +3 -0
- package/static/img/powerhouse-layer.png +0 -0
- package/static/img/powerhouse-storage-layer.png +0 -0
- package/static/img/reactor.png +0 -0
- package/static/img/renown-icon.png +0 -0
- package/static/img/renown.png +0 -0
- package/static/img/switchboard-icon.png +0 -0
- package/static/img/switchboard.png +0 -0
- package/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/static/img/undraw_docusaurus_react.svg +170 -0
- package/static/img/undraw_docusaurus_tree.svg +40 -0
- package/static/img/video-placeholder.svg +16 -0
- package/static.json +7 -0
- package/tsconfig.json +7 -0
|
@@ -0,0 +1,905 @@
|
|
|
1
|
+
# Cookbook
|
|
2
|
+
|
|
3
|
+
## Powerhouse CLI Recipes
|
|
4
|
+
|
|
5
|
+
<details id="installing-ph-cmd">
|
|
6
|
+
<summary>Installing 'ph-cmd'</summary>
|
|
7
|
+
|
|
8
|
+
## How to Install Powerhouse CLI
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Problem Statement
|
|
12
|
+
You need to install the Powerhouse CLI (`ph-cmd`) to create and manage Powerhouse projects.
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
- node.js 22 installed
|
|
16
|
+
- pnpm package manager installed
|
|
17
|
+
- Terminal or command prompt access
|
|
18
|
+
|
|
19
|
+
## Solution
|
|
20
|
+
|
|
21
|
+
### Step 1: Install the CLI globally
|
|
22
|
+
```bash
|
|
23
|
+
pnpm install -g ph-cmd
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Step 2: Verify the installation
|
|
27
|
+
```bash
|
|
28
|
+
ph-cmd --version
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Optional: Install specific versions
|
|
32
|
+
```bash
|
|
33
|
+
# For the staging version
|
|
34
|
+
pnpm install -g ph-cmd@staging
|
|
35
|
+
|
|
36
|
+
# For a specific version
|
|
37
|
+
pnpm install -g ph-cmd@<version>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Expected Outcome
|
|
41
|
+
- Powerhouse CLI (`ph-cmd`) installed globally on your system
|
|
42
|
+
- Access to all Powerhouse CLI commands for project creation and management
|
|
43
|
+
|
|
44
|
+
## Common Issues and Solutions
|
|
45
|
+
- Issue: Permission errors during installation
|
|
46
|
+
- Solution: Use `sudo` on Unix-based systems or run as administrator on Windows
|
|
47
|
+
- Issue: Version conflicts
|
|
48
|
+
- Solution: Clean your system using the uninstallation recipe before installing a new version
|
|
49
|
+
|
|
50
|
+
## Related Recipes
|
|
51
|
+
- [Installing 'ph-cmd'](#installing-ph-cmd)
|
|
52
|
+
- [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
|
|
53
|
+
- [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
|
|
54
|
+
|
|
55
|
+
## Further Reading
|
|
56
|
+
- [Powerhouse Builder Tools](/docs/academy/AdvancedTutorial/Create/BuilderTools)
|
|
57
|
+
</details>
|
|
58
|
+
|
|
59
|
+
<details id="uninstalling-ph-cmd">
|
|
60
|
+
<summary>Uninstalling 'ph-cmd'</summary>
|
|
61
|
+
|
|
62
|
+
## How to Uninstall Powerhouse CLI
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Problem Statement
|
|
66
|
+
You want to perform a clean installation of the Powerhouse CLI.
|
|
67
|
+
|
|
68
|
+
## Prerequisites
|
|
69
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
70
|
+
- A terminal or IDE
|
|
71
|
+
|
|
72
|
+
## Solution
|
|
73
|
+
|
|
74
|
+
### Step 1: Uninstall `ph-cmd`
|
|
75
|
+
```bash
|
|
76
|
+
pnpm uninstall -g ph-cmd
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Step 2: Remove the global setups folder
|
|
80
|
+
```bash
|
|
81
|
+
rm -rf ~/.ph
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Expected Outcome
|
|
85
|
+
- Your system should now be clean from the Powerhouse CLI
|
|
86
|
+
|
|
87
|
+
## Common Issues and Solutions
|
|
88
|
+
- Issue: Outdated version
|
|
89
|
+
- Solution: Uninstall and reinstall the Powerhouse CLI
|
|
90
|
+
|
|
91
|
+
## Related Recipes
|
|
92
|
+
- [Installing 'ph-cmd'](#installing-ph-cmd)
|
|
93
|
+
- [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
|
|
94
|
+
- [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
|
|
95
|
+
|
|
96
|
+
## Further Reading
|
|
97
|
+
- [Powerhouse Builder Tools](/docs/academy/AdvancedTutorial/Create/BuilderTools)
|
|
98
|
+
- [Create A New Powerhouse Project](/docs/academy/GetStarted/ToDoList/CreateNewPowerhouseProject)
|
|
99
|
+
</details>
|
|
100
|
+
|
|
101
|
+
<details id="setting-up-or-resetting-the-global-powerhouse-configuration">
|
|
102
|
+
<summary>Setting up or Resetting the Global Powerhouse Configuration</summary>
|
|
103
|
+
|
|
104
|
+
## How to Set Up or Reset the Global Powerhouse Configuration
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Problem Statement
|
|
108
|
+
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.
|
|
109
|
+
|
|
110
|
+
## Prerequisites
|
|
111
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
112
|
+
- Terminal or command prompt access
|
|
113
|
+
|
|
114
|
+
## Solution
|
|
115
|
+
|
|
116
|
+
### Step 1: (Optional) Remove Existing Configuration
|
|
117
|
+
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.**
|
|
118
|
+
```bash
|
|
119
|
+
# Use with caution: this removes your global settings and downloaded dependencies.
|
|
120
|
+
rm -rf ~/.ph
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Step 2: Set Up Global Defaults
|
|
124
|
+
Initialize the default global project configuration.
|
|
125
|
+
```bash
|
|
126
|
+
ph setup-globals
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Step 3: (Optional) Switch to a Specific Environment (e.g., Staging)
|
|
130
|
+
If you need to use non-production dependencies, switch the global environment.
|
|
131
|
+
```bash
|
|
132
|
+
# Switch to staging dependencies
|
|
133
|
+
ph use staging
|
|
134
|
+
|
|
135
|
+
# Or switch back to the latest stable versions
|
|
136
|
+
# ph use latest
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Expected Outcome
|
|
140
|
+
- A `~/.ph` directory is created or reset.
|
|
141
|
+
- The global project is configured, potentially using the specified environment (e.g., staging).
|
|
142
|
+
- You are ready to initialize or work with Powerhouse projects using the defined global settings.
|
|
143
|
+
|
|
144
|
+
## Common Issues and Solutions
|
|
145
|
+
- Issue: Commands fail after removing `~/.ph`.
|
|
146
|
+
- Solution: Ensure you run `ph setup-globals` afterwards.
|
|
147
|
+
- Issue: Need to use specific local dependencies globally.
|
|
148
|
+
- Solution: Use `ph use local /path/to/local/packages`.
|
|
149
|
+
|
|
150
|
+
## Related Recipes
|
|
151
|
+
- [Installing 'ph-cmd'](#installing-ph-cmd)
|
|
152
|
+
- [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
|
|
153
|
+
- [Using Different Branches in Powerhouse](#using-different-branches-in-powerhouse)
|
|
154
|
+
|
|
155
|
+
## Further Reading
|
|
156
|
+
- [Powerhouse Builder Tools](/docs/academy/AdvancedTutorial/Create/BuilderTools)
|
|
157
|
+
- [GraphQL Schema Best Practices](/docs/academy/AdvancedTutorial/WorkWithData/GraphQLAtPowerhouse)
|
|
158
|
+
</details>
|
|
159
|
+
|
|
160
|
+
<details id="using-different-branches-in-powerhouse">
|
|
161
|
+
<summary>Using Different Branches in Powerhouse</summary>
|
|
162
|
+
|
|
163
|
+
## How to Use Different Branches in Powerhouse
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Problem Statement
|
|
167
|
+
You need to access experimental features, bugfixes, or development versions of Powerhouse components that aren't yet available in the stable release.
|
|
168
|
+
|
|
169
|
+
## Prerequisites
|
|
170
|
+
- Terminal or command prompt access
|
|
171
|
+
- pnpm package manager installed
|
|
172
|
+
- Node.js 22 installed
|
|
173
|
+
|
|
174
|
+
## Solution
|
|
175
|
+
|
|
176
|
+
### Step 1: Install CLI with Specific Branch
|
|
177
|
+
Choose the appropriate installation command based on your needs:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# For latest stable version
|
|
181
|
+
pnpm install -g ph-cmd
|
|
182
|
+
|
|
183
|
+
# For development version
|
|
184
|
+
pnpm install -g ph-cmd@dev
|
|
185
|
+
|
|
186
|
+
# For staging version
|
|
187
|
+
pnpm install -g ph-cmd@staging
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Step 2: Initialize Project with Specific Branch
|
|
191
|
+
When creating a new project, you can specify which branch to use:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# Use latest stable version of the boilerplate
|
|
195
|
+
ph init
|
|
196
|
+
|
|
197
|
+
# Use development version of the boilerplate
|
|
198
|
+
ph init --dev
|
|
199
|
+
|
|
200
|
+
# Use staging version of the boilerplate
|
|
201
|
+
ph init --staging
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Step 3: Switch Dependencies for Existing Project
|
|
205
|
+
For existing projects, you can switch all dependencies to different versions:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Switch to latest production versions
|
|
209
|
+
ph use
|
|
210
|
+
|
|
211
|
+
# Switch to development versions
|
|
212
|
+
ph use dev
|
|
213
|
+
|
|
214
|
+
# Switch to production versions
|
|
215
|
+
ph use prod
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Expected Outcome
|
|
219
|
+
- Access to the specified version of Powerhouse components
|
|
220
|
+
- Ability to test experimental features or bugfixes
|
|
221
|
+
- Project configured with the chosen branch's dependencies
|
|
222
|
+
|
|
223
|
+
## Common Issues and Solutions
|
|
224
|
+
- Issue: Experimental features not working as expected
|
|
225
|
+
- Solution: This is normal as these versions may contain untested features. Consider switching back to stable versions if issues persist.
|
|
226
|
+
- Issue: Version conflicts between components
|
|
227
|
+
- Solution: Ensure all components are using the same branch version. Use `ph use` commands to synchronize versions.
|
|
228
|
+
|
|
229
|
+
## Related Recipes
|
|
230
|
+
- [Installing 'ph-cmd'](#installing-ph-cmd)
|
|
231
|
+
- Updating Your Powerhouse Project Dependencies
|
|
232
|
+
- [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
|
|
233
|
+
|
|
234
|
+
## Further Reading
|
|
235
|
+
- [Powerhouse Builder Tools](/docs/academy/AdvancedTutorial/Create/BuilderTools)
|
|
236
|
+
</details>
|
|
237
|
+
|
|
238
|
+
<details id="using-different-package-managers-with-powerhouse">
|
|
239
|
+
<summary>Using Different Package Managers with Powerhouse</summary>
|
|
240
|
+
|
|
241
|
+
## How to Use Different Package Managers with Powerhouse
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Problem Statement
|
|
245
|
+
You want to use a different package manager (npm, yarn, or bun) instead of pnpm for managing Powerhouse projects and dependencies.
|
|
246
|
+
|
|
247
|
+
## Prerequisites
|
|
248
|
+
- Node.js 22 installed
|
|
249
|
+
- Your preferred package manager installed (npm, yarn, or bun)
|
|
250
|
+
- Terminal or command prompt access
|
|
251
|
+
|
|
252
|
+
## Solution
|
|
253
|
+
|
|
254
|
+
### Step 1: Install the CLI with Your Preferred Package Manager
|
|
255
|
+
Choose the appropriate installation command based on your package manager:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Using npm
|
|
259
|
+
npm install -g ph-cmd
|
|
260
|
+
|
|
261
|
+
# Using yarn
|
|
262
|
+
yarn global add ph-cmd
|
|
263
|
+
|
|
264
|
+
# Using bun
|
|
265
|
+
bun install -g ph-cmd
|
|
266
|
+
|
|
267
|
+
# Using pnpm (default)
|
|
268
|
+
pnpm install -g ph-cmd
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Step 2: Configure PATH for Global Binaries
|
|
272
|
+
For yarn and bun, you need to add their global binary directories to your PATH:
|
|
273
|
+
|
|
274
|
+
#### For Yarn:
|
|
275
|
+
```bash
|
|
276
|
+
# Add this to your ~/.bashrc, ~/.zshrc, or equivalent
|
|
277
|
+
export PATH="$PATH:$(yarn global bin)"
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
#### For Bun:
|
|
281
|
+
```bash
|
|
282
|
+
# Add this to your ~/.bashrc, ~/.zshrc, or equivalent
|
|
283
|
+
export PATH="$PATH:$HOME/.bun/bin"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
After adding these lines, reload your shell configuration:
|
|
287
|
+
```bash
|
|
288
|
+
source ~/.bashrc # or source ~/.zshrc
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Step 3: Verify Installation
|
|
292
|
+
Check that the CLI is properly installed and accessible:
|
|
293
|
+
```bash
|
|
294
|
+
ph-cmd --version
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Step 4: Using Different Package Managers in Projects
|
|
298
|
+
When working with Powerhouse projects, you can specify your preferred package manager:
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
# Initialize a project with npm
|
|
302
|
+
ph init --package-manager npm
|
|
303
|
+
|
|
304
|
+
# Initialize a project with yarn
|
|
305
|
+
ph init --package-manager yarn
|
|
306
|
+
|
|
307
|
+
# Initialize a project with bun
|
|
308
|
+
ph init --package-manager bun
|
|
309
|
+
|
|
310
|
+
# Initialize a project with pnpm (preferred default)
|
|
311
|
+
ph init --package-manager pnpm
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## Expected Outcome
|
|
315
|
+
- Powerhouse CLI installed and accessible through your preferred package manager
|
|
316
|
+
- Ability to manage Powerhouse projects using your chosen package manager
|
|
317
|
+
- Proper PATH configuration for global binaries
|
|
318
|
+
|
|
319
|
+
## Common Issues and Solutions
|
|
320
|
+
- Issue: Command not found after installation
|
|
321
|
+
- Solution: Ensure the global binary directory is in your PATH (especially for yarn and bun)
|
|
322
|
+
- Solution: Try running the command with the full path to verify installation
|
|
323
|
+
- Issue: Permission errors during installation
|
|
324
|
+
- Solution: Use `sudo` on Unix-based systems or run as administrator on Windows
|
|
325
|
+
- Issue: Package manager conflicts
|
|
326
|
+
- Solution: Stick to one package manager per project to avoid lockfile conflicts
|
|
327
|
+
|
|
328
|
+
## Related Recipes
|
|
329
|
+
- [Installing 'ph-cmd'](#installing-ph-cmd)
|
|
330
|
+
- [Uninstalling 'ph-cmd'](#uninstalling-ph-cmd)
|
|
331
|
+
- [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
|
|
332
|
+
|
|
333
|
+
## Further Reading
|
|
334
|
+
- [Powerhouse Builder Tools](/docs/academy/AdvancedTutorial/Create/BuilderTools)
|
|
335
|
+
- [Yarn Global Installation Guide](https://classic.yarnpkg.com/lang/en/docs/cli/global/)
|
|
336
|
+
- [Bun Installation Guide](https://bun.sh/docs/installation#how-to-add-your-path)
|
|
337
|
+
</details>
|
|
338
|
+
|
|
339
|
+
## Powerhouse Project Recipes
|
|
340
|
+
|
|
341
|
+
<details id="initializing-a-new-project-and-document-model">
|
|
342
|
+
<summary>Initializing a New Project & Document Model</summary>
|
|
343
|
+
|
|
344
|
+
## How to Initialize a new project and document model
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Problem Statement
|
|
348
|
+
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.
|
|
349
|
+
|
|
350
|
+
## Prerequisites
|
|
351
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
352
|
+
- A Powerhouse project initialized (see [Initializing a Powerhouse Project Recipe](#powerhouse-cli-recipes)) or follow Step 1 & 2 below.
|
|
353
|
+
- Access to a terminal or command prompt
|
|
354
|
+
- A web browser
|
|
355
|
+
|
|
356
|
+
## Solution
|
|
357
|
+
|
|
358
|
+
### Step 1: Initialize a Powerhouse Project (if needed)
|
|
359
|
+
If you haven't already, create a new Powerhouse project:
|
|
360
|
+
```bash
|
|
361
|
+
ph init
|
|
362
|
+
# Follow the prompts to name your project
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Step 2: Navigate to Project Directory
|
|
366
|
+
Change your current directory to the newly created project folder:
|
|
367
|
+
```bash
|
|
368
|
+
cd <yourprojectname>
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Step 3: Start the Local Connect Application
|
|
372
|
+
Run the `connect` command to start the local development environment:
|
|
373
|
+
```bash
|
|
374
|
+
ph connect
|
|
375
|
+
```
|
|
376
|
+
Wait for the output indicating the server is running (e.g., `Local: http://localhost:3000/`).
|
|
377
|
+
|
|
378
|
+
### Step 4: Open Connect in Browser
|
|
379
|
+
A browser window should open automatically to `http://localhost:3000/`. If not, navigate there manually.
|
|
380
|
+
|
|
381
|
+
### Step 5: Access Your Local Drive
|
|
382
|
+
Click on your local drive displayed on the Connect interface.
|
|
383
|
+
|
|
384
|
+
### Step 6: Create the Document Model
|
|
385
|
+
In the "New Document" section at the bottom of the page, click the `DocumentModel` button.
|
|
386
|
+
|
|
387
|
+
## Expected Outcome
|
|
388
|
+
- An empty document model is created and opened in the Document Model Editor within the Connect application.
|
|
389
|
+
- You are ready to start defining the schema and logic for your new model.
|
|
390
|
+
|
|
391
|
+
## Common Issues and Solutions
|
|
392
|
+
- Issue: `ph connect` command fails.
|
|
393
|
+
- 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`.
|
|
394
|
+
- Issue: Browser window doesn't open automatically.
|
|
395
|
+
- Solution: Manually open `http://localhost:3000/` in your browser.
|
|
396
|
+
- Issue: Cannot find the `DocumentModel` button.
|
|
397
|
+
- Solution: Ensure you have navigated into your local drive within the Connect application first.
|
|
398
|
+
|
|
399
|
+
## Related Recipes
|
|
400
|
+
- [Initializing a Powerhouse Project](#powerhouse-cli-recipes)
|
|
401
|
+
- Designing a Document Model Schema (WIP)
|
|
402
|
+
- Implementing Document Model Reducers (Details to be added)
|
|
403
|
+
|
|
404
|
+
## Further Reading
|
|
405
|
+
- [Domain Modeling Guide](/docs/domain-modeling)
|
|
406
|
+
- [GraphQL Schema Best Practices](/docs/academy/AdvancedTutorial/WorkWithData/GraphQLAtPowerhouse)
|
|
407
|
+
</details>
|
|
408
|
+
|
|
409
|
+
<details id="generating-reducers-from-a-document-model-file">
|
|
410
|
+
<summary>Generating Reducers from a Document Model File</summary>
|
|
411
|
+
|
|
412
|
+
## How to Generate Reducers from a Document Model File
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Problem Statement
|
|
416
|
+
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.
|
|
417
|
+
|
|
418
|
+
## Prerequisites
|
|
419
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
420
|
+
- A Powerhouse project initialized (`ph init`)
|
|
421
|
+
- A `.phdm` or `.phdm.zip` file containing your document model definition, placed in your project (e.g., at the root).
|
|
422
|
+
|
|
423
|
+
## Solution
|
|
424
|
+
|
|
425
|
+
### Step 1: Navigate to Project Directory
|
|
426
|
+
Ensure your terminal is in the root directory of your Powerhouse project.
|
|
427
|
+
```bash
|
|
428
|
+
cd <yourprojectname>
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
### Step 2: Run the Generate Command
|
|
432
|
+
Execute the `ph generate` command, providing the path to your document model file.
|
|
433
|
+
```bash
|
|
434
|
+
# Replace todo.phdm.zip with the actual filename/path of your model
|
|
435
|
+
ph generate todo.phdm.zip
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
### Step 3: Integrate Generated Code
|
|
439
|
+
The command will output the generated reducer scaffolding code in the designated folders.
|
|
440
|
+
|
|
441
|
+
## Expected Outcome
|
|
442
|
+
- Reducer functions corresponding to the operations defined in your document model are generated.
|
|
443
|
+
- The generated code is ready to be integrated into your project's state management logic.
|
|
444
|
+
|
|
445
|
+
## Common Issues and Solutions
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
## Related Recipes
|
|
449
|
+
- [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
|
|
450
|
+
- Generating a Document Editor
|
|
451
|
+
|
|
452
|
+
## Further Reading
|
|
453
|
+
- [Domain Modeling Guide](/docs/domain-modeling)
|
|
454
|
+
|
|
455
|
+
</details>
|
|
456
|
+
|
|
457
|
+
<details id="updating-your-powerhouse-project-dependencies">
|
|
458
|
+
<summary>Updating Your Powerhouse Project Dependencies</summary>
|
|
459
|
+
|
|
460
|
+
## How to Update Your Powerhouse Project Dependencies
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## Problem Statement
|
|
464
|
+
The update command allows you to update your Powerhouse dependencies to their latest versions based on the version ranges specified in your package.json.
|
|
465
|
+
|
|
466
|
+
```bash
|
|
467
|
+
ph update [options]
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
**Examples**
|
|
471
|
+
#### Update dependencies based on package.json ranges
|
|
472
|
+
```bash
|
|
473
|
+
ph update
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
#### Force update to latest dev versions
|
|
477
|
+
```bash
|
|
478
|
+
ph update --force dev
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
#### Force update to latest stable versions
|
|
482
|
+
```bash
|
|
483
|
+
ph update --force prod
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
#### Use a specific package manager
|
|
487
|
+
```bash
|
|
488
|
+
ph update --package-manager pnpm
|
|
489
|
+
```
|
|
490
|
+
</details>
|
|
491
|
+
|
|
492
|
+
<details id="running-connect-with-https-and-a-custom-port">
|
|
493
|
+
<summary>Running Connect with HTTPS and a Custom Port</summary>
|
|
494
|
+
|
|
495
|
+
## How to Run Connect with HTTPS and a Custom Port
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
## Problem Statement
|
|
499
|
+
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.
|
|
500
|
+
|
|
501
|
+
## Prerequisites
|
|
502
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
503
|
+
- A Powerhouse project initialized (`ph init`)
|
|
504
|
+
- Potentially, valid SSL/TLS certificates if running in a non-localhost environment that requires trusted HTTPS. (The `--https` flag may use self-signed certificates for local development).
|
|
505
|
+
|
|
506
|
+
## Solution
|
|
507
|
+
|
|
508
|
+
### Step 1: Navigate to Project Directory
|
|
509
|
+
Ensure your terminal is in the root directory of your Powerhouse project.
|
|
510
|
+
```bash
|
|
511
|
+
cd <yourprojectname>
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
### Step 2: Run Connect with Flags
|
|
515
|
+
Execute the `ph connect` command, adding the `--https` flag to enable HTTPS and the `--port` flag followed by the desired port number.
|
|
516
|
+
```bash
|
|
517
|
+
# Example using port 8442
|
|
518
|
+
ph connect --port 8442 --https
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### Step 3: Access Connect
|
|
522
|
+
Open your web browser and navigate to the specified address. Remember to use `https` and include the custom port.
|
|
523
|
+
```
|
|
524
|
+
https://<your-hostname-or-ip>:<port>
|
|
525
|
+
# Example: https://localhost:8442
|
|
526
|
+
# Example: https://my-ec2-instance-ip:8442
|
|
527
|
+
```
|
|
528
|
+
You might encounter a browser warning about the self-signed certificate; you may need to accept the risk to proceed for local/development testing.
|
|
529
|
+
|
|
530
|
+
## Expected Outcome
|
|
531
|
+
- The Powerhouse Connect application starts and serves traffic over HTTPS on the specified port.
|
|
532
|
+
- You can access the Connect interface securely using the `https` protocol.
|
|
533
|
+
|
|
534
|
+
## Common Issues and Solutions
|
|
535
|
+
- Issue: Browser shows security warnings (e.g., "Your connection is not private").
|
|
536
|
+
- 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).
|
|
537
|
+
- Issue: Port conflict (e.g., `"Port <port> is already in use"`).
|
|
538
|
+
- Solution: Choose a different port number that is not currently occupied by another application.
|
|
539
|
+
- Issue: Cannot access Connect from a remote machine.
|
|
540
|
+
- 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.
|
|
541
|
+
|
|
542
|
+
## Related Recipes
|
|
543
|
+
- [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
|
|
544
|
+
|
|
545
|
+
## Further Reading
|
|
546
|
+
- [Powerhouse Builder Tools](/docs/academy/AdvancedTutorial/Create/BuilderTools)
|
|
547
|
+
- [GraphQL Schema Best Practices](/docs/academy/AdvancedTutorial/WorkWithData/GraphQLAtPowerhouse)
|
|
548
|
+
</details>
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
## Document & Drive Editor recipes
|
|
552
|
+
|
|
553
|
+
<details id="generating-a-document-editor">
|
|
554
|
+
<summary>Generating a Document Editor</summary>
|
|
555
|
+
|
|
556
|
+
## How to Generate a Document Editor
|
|
557
|
+
---
|
|
558
|
+
|
|
559
|
+
## Problem Statement
|
|
560
|
+
You have a Powerhouse document model and need to create a user interface (editor) for it to be used within the Connect application.
|
|
561
|
+
|
|
562
|
+
## Prerequisites
|
|
563
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
564
|
+
- A Powerhouse project initialized (`ph init`)
|
|
565
|
+
- A document model generated or defined within the project (e.g., in the `document-models` directory).
|
|
566
|
+
|
|
567
|
+
## Solution
|
|
568
|
+
|
|
569
|
+
### Step 1: Navigate to Project Directory
|
|
570
|
+
Ensure your terminal is in the root directory of your Powerhouse project.
|
|
571
|
+
```bash
|
|
572
|
+
cd <yourprojectname>
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
### Step 2: Generate the Editor Template
|
|
576
|
+
Run the `generate` command, specifying the editor name (usually matching the document model name) and the associated document type.
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
# Replace <ModelName> with the name of your document model (e.g., ToDoList)
|
|
580
|
+
# Replace <docType> with the identifier for your document (e.g., powerhouse/todolist)
|
|
581
|
+
ph generate --editor <ModelName> --document-types <docType>
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
## Expected Outcome
|
|
585
|
+
- A new directory is created under `editors/` (e.g., `editors/<model-name>/`).
|
|
586
|
+
- An `editor.tsx` file is generated within that directory, containing a basic template for your document editor.
|
|
587
|
+
- You can now customize `editor.tsx` to build your desired UI using HTML, Tailwind CSS, or custom CSS.
|
|
588
|
+
|
|
589
|
+
## Related Recipes
|
|
590
|
+
- [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
|
|
591
|
+
- [Generating a Custom Drive Explorer](#generating-a-custom-drive-explorer)
|
|
592
|
+
|
|
593
|
+
## Further Reading
|
|
594
|
+
- [Build a Todo-list Editor](/docs/academy/GetStarted/ToDoList/BuildToDoListEditor)
|
|
595
|
+
</details>
|
|
596
|
+
|
|
597
|
+
<details id="generating-a-custom-drive-explorer">
|
|
598
|
+
<summary>Generating a Custom Drive Explorer</summary>
|
|
599
|
+
|
|
600
|
+
## How to Generate a Custom Drive Explorer
|
|
601
|
+
---
|
|
602
|
+
|
|
603
|
+
## Problem Statement
|
|
604
|
+
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.
|
|
605
|
+
|
|
606
|
+
## Prerequisites
|
|
607
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
608
|
+
- A Powerhouse project initialized (`ph init`)
|
|
609
|
+
|
|
610
|
+
## Solution
|
|
611
|
+
|
|
612
|
+
### Step 1: Navigate to Project Directory
|
|
613
|
+
Ensure your terminal is in the root directory of your Powerhouse project.
|
|
614
|
+
```bash
|
|
615
|
+
cd <yourprojectname>
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
### Step 2: Generate the Drive Explorer Template
|
|
619
|
+
Run the `generate` command, specifying the `--drive-editor` flag and a name for your drive explorer application.
|
|
620
|
+
|
|
621
|
+
```bash
|
|
622
|
+
# Replace <drive-app-name> with a suitable name for your drive explorer (e.g., todo-drive-explorer)
|
|
623
|
+
ph generate --drive-editor <drive-app-name>
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
## Expected Outcome
|
|
627
|
+
- A new directory is created under `editors/` (e.g., `editors/<drive-app-name>/`).
|
|
628
|
+
- Template files (`EditorContainer.tsx`, components, hooks, etc.) are generated within that directory, providing a basic structure for a drive explorer.
|
|
629
|
+
- 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.
|
|
630
|
+
- Remember to update your `powerhouse.manifest.json` to register the new app.
|
|
631
|
+
|
|
632
|
+
## Related Recipes
|
|
633
|
+
- [Generating a Document Editor](#generating-a-document-editor)
|
|
634
|
+
|
|
635
|
+
## Further Reading
|
|
636
|
+
- [Build a Drive-Explorer](/docs/academy/AdvancedTutorial/BuildingUserExperiences/BuildingADriveExplorer)
|
|
637
|
+
</details>
|
|
638
|
+
|
|
639
|
+
## Reactor Recipes
|
|
640
|
+
|
|
641
|
+
<details id="starting-the-reactor">
|
|
642
|
+
<summary>Starting the Reactor</summary>
|
|
643
|
+
|
|
644
|
+
## How to Start the Powerhouse Reactor
|
|
645
|
+
---
|
|
646
|
+
|
|
647
|
+
## Problem Statement
|
|
648
|
+
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.
|
|
649
|
+
|
|
650
|
+
## Prerequisites
|
|
651
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
652
|
+
- A Powerhouse project initialized (`ph init`)
|
|
653
|
+
- You are in the root directory of your Powerhouse project.
|
|
654
|
+
|
|
655
|
+
## Solution
|
|
656
|
+
|
|
657
|
+
### Step 1: Navigate to Project Directory (if needed)
|
|
658
|
+
Ensure your terminal is in the root directory of your Powerhouse project.
|
|
659
|
+
```bash
|
|
660
|
+
cd <yourprojectname>
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
### Step 2: Run the Reactor Command
|
|
664
|
+
Execute the `ph reactor` command.
|
|
665
|
+
```bash
|
|
666
|
+
ph reactor
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
## Expected Outcome
|
|
670
|
+
- The Reactor service starts, typically listening on `localhost:4001`.
|
|
671
|
+
- You will see log output indicating the reactor is running and ready to process operations.
|
|
672
|
+
- A GraphQL endpoint is usually available at `http://localhost:4001/graphql` for direct interaction and testing.
|
|
673
|
+
|
|
674
|
+
## Common Issues and Solutions
|
|
675
|
+
- Issue: Reactor fails to start, mentioning port conflicts.
|
|
676
|
+
- 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).
|
|
677
|
+
- Issue: Errors related to storage or configuration.
|
|
678
|
+
- 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.
|
|
679
|
+
|
|
680
|
+
## Related Recipes
|
|
681
|
+
- [Initializing a New Project & Document Model](#initializing-a-new-project-and-document-model)
|
|
682
|
+
- Testing with GraphQL (Details to be added)
|
|
683
|
+
|
|
684
|
+
</details>
|
|
685
|
+
|
|
686
|
+
## Package Development Recipes
|
|
687
|
+
|
|
688
|
+
<details id="installing-a-custom-powerhouse-package">
|
|
689
|
+
<summary>Installing a Custom Powerhouse Package</summary>
|
|
690
|
+
|
|
691
|
+
## How to Install a Custom Powerhouse Package
|
|
692
|
+
---
|
|
693
|
+
|
|
694
|
+
## Problem Statement
|
|
695
|
+
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.
|
|
696
|
+
|
|
697
|
+
## Prerequisites
|
|
698
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
699
|
+
- A Powerhouse project initialized (`ph init`) where you want to install the package.
|
|
700
|
+
- The custom package is either published to npm or available locally.
|
|
701
|
+
|
|
702
|
+
## Solution
|
|
703
|
+
|
|
704
|
+
### Step 1: Navigate to the Target Project Directory
|
|
705
|
+
Ensure your terminal is in the root directory of the Powerhouse project where you want to install the package.
|
|
706
|
+
```bash
|
|
707
|
+
cd <your-target-project-name>
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
### Step 2: Install the Package
|
|
711
|
+
Use the `ph install` command followed by the package name (if published to npm) or the path to the local package.
|
|
712
|
+
|
|
713
|
+
**For npm packages:**
|
|
714
|
+
```bash
|
|
715
|
+
# Replace <your-package-name> with the actual name on npm
|
|
716
|
+
ph install <your-package-name>
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
**For local packages (using a relative or absolute path):**
|
|
720
|
+
```bash
|
|
721
|
+
# Example using a relative path
|
|
722
|
+
ph install ../path/to/my-local-package
|
|
723
|
+
|
|
724
|
+
# Example using an absolute path
|
|
725
|
+
ph install /Users/you/dev/my-local-package
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
### Step 3: Verify Installation
|
|
729
|
+
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.
|
|
730
|
+
|
|
731
|
+
## Expected Outcome
|
|
732
|
+
- The custom Powerhouse package is downloaded and installed into your project's dependencies.
|
|
733
|
+
- The `powerhouse.manifest.json` is updated (if necessary) to reflect the installed package.
|
|
734
|
+
- Document models, editors, drive explorers, or other components from the package become available within the target project.
|
|
735
|
+
|
|
736
|
+
## Common Issues and Solutions
|
|
737
|
+
- Issue: Package not found (npm).
|
|
738
|
+
- Solution: Double-check the package name for typos. Ensure the package is published and accessible on npm.
|
|
739
|
+
- Issue: Path not found (local).
|
|
740
|
+
- Solution: Verify the relative or absolute path to the local package directory is correct.
|
|
741
|
+
- Issue: Conflicts with existing project components or dependencies.
|
|
742
|
+
- Solution: Resolve version conflicts or naming collisions as needed. Review the installed package's structure and dependencies.
|
|
743
|
+
|
|
744
|
+
## Related Recipes
|
|
745
|
+
- [Publishing a Powerhouse Package](#publishing-a-powerhouse-package)
|
|
746
|
+
- [Initializing a Powerhouse Project](#initializing-a-new-project-and-document-model)
|
|
747
|
+
|
|
748
|
+
</details>
|
|
749
|
+
|
|
750
|
+
<details id="managing-powerhouse-dependencies-and-versions">
|
|
751
|
+
<summary>Managing Powerhouse Dependencies and Versions</summary>
|
|
752
|
+
|
|
753
|
+
## How to Manage Powerhouse Dependencies and Versions
|
|
754
|
+
---
|
|
755
|
+
> **Note:** This is a temporary solution until version control is fully implemented in Powerhouse. Future updates may change how dependencies are managed.
|
|
756
|
+
|
|
757
|
+
## Problem Statement
|
|
758
|
+
You need to understand and manage different types of dependencies in your Powerhouse project, including:
|
|
759
|
+
- Monorepo dependencies (from the Powerhouse core repository)
|
|
760
|
+
- Project-specific dependencies (from published npm packages)
|
|
761
|
+
- Boilerplate dependencies
|
|
762
|
+
|
|
763
|
+
## Prerequisites
|
|
764
|
+
- Powerhouse CLI (`ph-cmd`) installed
|
|
765
|
+
- A Powerhouse project initialized (`ph init`)
|
|
766
|
+
- npm account (if you need to publish packages)
|
|
767
|
+
|
|
768
|
+
## Solution
|
|
769
|
+
|
|
770
|
+
### Understanding Different Types of Dependencies
|
|
771
|
+
|
|
772
|
+
1. **Monorepo Dependencies**
|
|
773
|
+
- The Powerhouse monorepo has three main branches:
|
|
774
|
+
- `main` (stable)
|
|
775
|
+
- `dev` (development)
|
|
776
|
+
- `staging` (pre-release)
|
|
777
|
+
- You can use these branches by:
|
|
778
|
+
```bash
|
|
779
|
+
# Install dev version of CLI
|
|
780
|
+
pnpm install -g ph-cmd@dev
|
|
781
|
+
|
|
782
|
+
# Initialize project with dev dependencies
|
|
783
|
+
ph init --dev
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
2. **Project Dependencies**
|
|
787
|
+
- These are dependencies from published npm packages
|
|
788
|
+
- Update them using:
|
|
789
|
+
```bash
|
|
790
|
+
# Update to latest stable versions
|
|
791
|
+
ph use
|
|
792
|
+
|
|
793
|
+
# Update to development versions
|
|
794
|
+
ph use dev
|
|
795
|
+
|
|
796
|
+
# Update to production versions
|
|
797
|
+
ph use prod
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
3. **Publishing Updated Dependencies**
|
|
801
|
+
- If you make changes to dependencies, you need to:
|
|
802
|
+
1. Update the dependencies in your project
|
|
803
|
+
2. Publish the updated package to npm
|
|
804
|
+
3. Other projects will then get the new version when they run `ph install`
|
|
805
|
+
|
|
806
|
+
### Important Notes
|
|
807
|
+
|
|
808
|
+
1. **Breaking Changes**
|
|
809
|
+
- Currently, updating Connect versions might break older packages
|
|
810
|
+
- Always test thoroughly after updating dependencies
|
|
811
|
+
- Consider publishing to a private npm registry for testing
|
|
812
|
+
|
|
813
|
+
2. **Local Development**
|
|
814
|
+
- Using `ph use` in a project folder only affects that specific project
|
|
815
|
+
- Other projects will still download the latest published version from npm
|
|
816
|
+
- For testing, you can publish to your own npm account
|
|
817
|
+
|
|
818
|
+
## Expected Outcome
|
|
819
|
+
- Clear understanding of different dependency types
|
|
820
|
+
- Ability to manage and update dependencies appropriately
|
|
821
|
+
- Knowledge of when to publish updated packages
|
|
822
|
+
|
|
823
|
+
## Common Issues and Solutions
|
|
824
|
+
- Issue: Dependencies not updating as expected
|
|
825
|
+
- Solution: Ensure you're using the correct `ph use` command for your needs
|
|
826
|
+
- Issue: Breaking changes after updates
|
|
827
|
+
- Solution: Test thoroughly and consider publishing to a private npm registry first
|
|
828
|
+
- Issue: Confusion about which version is being used
|
|
829
|
+
- Solution: Check your package.json and powerhouse.manifest.json for current versions
|
|
830
|
+
|
|
831
|
+
## Related Recipes
|
|
832
|
+
- [Installing 'ph-cmd'](#installing-ph-cmd)
|
|
833
|
+
- [Using Different Branches in Powerhouse](#using-different-branches-in-powerhouse)
|
|
834
|
+
- [Setting up or Resetting the Global Powerhouse Configuration](#setting-up-or-resetting-the-global-powerhouse-configuration)
|
|
835
|
+
|
|
836
|
+
## Further Reading
|
|
837
|
+
- [Powerhouse Builder Tools](/docs/academy/AdvancedTutorial/Create/BuilderTools)
|
|
838
|
+
- [GraphQL Schema Best Practices](/docs/academy/AdvancedTutorial/WorkWithData/GraphQLAtPowerhouse)
|
|
839
|
+
|
|
840
|
+
</details>
|
|
841
|
+
|
|
842
|
+
Data Synchronisation Recipes
|
|
843
|
+
|
|
844
|
+
<details id="troubleshooting-document-syncing">
|
|
845
|
+
<summary>Troubleshooting Document Syncing: Supergraph vs. Drive Endpoints</summary>
|
|
846
|
+
|
|
847
|
+
## Troubleshooting Document Syncing: Supergraph vs. Drive Endpoints
|
|
848
|
+
---
|
|
849
|
+
|
|
850
|
+
## Problem Statement
|
|
851
|
+
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.
|
|
852
|
+
|
|
853
|
+
## Prerequisites
|
|
854
|
+
- Powerhouse CLI (`ph-cmd`) installed.
|
|
855
|
+
- A Powerhouse project initialized (`ph init`).
|
|
856
|
+
- The Powerhouse Reactor is running (`ph reactor`).
|
|
857
|
+
- Powerhouse Connect is running (`ph connect`).
|
|
858
|
+
- You have attempted to create or modify documents in a drive (e.g., a "finances" drive).
|
|
859
|
+
|
|
860
|
+
## Solution
|
|
861
|
+
|
|
862
|
+
Understanding the different GraphQL endpoints in Powerhouse is crucial for effective troubleshooting:
|
|
863
|
+
|
|
864
|
+
1. **The Supergraph Endpoint (`http://localhost:4001/graphql`):**
|
|
865
|
+
* This is the main entry point for the supergraph, which combines various subgraphs (e.g., system information, user accounts, etc.).
|
|
866
|
+
* While you can query many things here, it's generally **not** the endpoint for direct, real-time document content operations like `pushUpdates` for a specific drive.
|
|
867
|
+
|
|
868
|
+
2. **Drive-Specific Endpoints (e.g., `http://localhost:4001/d/<driveId>` or `http://localhost:4001/d/<driveId>/graphql`):**
|
|
869
|
+
* Each drive (e.g., "finances", "mydocs") has its own dedicated endpoint.
|
|
870
|
+
* Operations that modify or directly interact with the content of a specific drive, such as creating new documents or pushing updates, are typically handled by this endpoint.
|
|
871
|
+
* When you interact with documents in Powerhouse Connect, it communicates with these drive-specific endpoints.
|
|
872
|
+
|
|
873
|
+
**Troubleshooting Steps:**
|
|
874
|
+
|
|
875
|
+
1. **Identify the Correct Endpoint:**
|
|
876
|
+
* As illustrated in the scenario where a user was looking for documents in a "finances" drive, the key realization was needing to interact with the `http://localhost:4001/d/finances` endpoint for document-specific operations, not just `http://localhost:4001/graphql`.
|
|
877
|
+
|
|
878
|
+
2. **Inspect Network Requests:**
|
|
879
|
+
* Open your browser's developer tools (usually by pressing F12) and go to the "Network" tab.
|
|
880
|
+
* Perform an action in Powerhouse Connect that involves a document (e.g., creating, saving).
|
|
881
|
+
* Look for GraphQL requests. You'll often see operations like `pushUpdates`.
|
|
882
|
+
* Examine the "Request URL" or "Path" for these requests. You'll likely see they are being sent to a drive-specific endpoint (e.g., `/d/finances`, `/d/powerhouse`).
|
|
883
|
+
* The payload might show `operationName: "pushUpdates"`, confirming a document modification attempt.
|
|
884
|
+
|
|
885
|
+
3. **Querying Drive Data:**
|
|
886
|
+
* If you want to query the state of documents within a specific drive via GraphQL, ensure you are targeting that drive's GraphQL endpoint (often `http://localhost:4001/d/<driveId>/graphql` or through specific queries available on the main supergraph that reference the drive). The exact query structure will depend on your document models.
|
|
887
|
+
|
|
888
|
+
4. **Clear Caches and Reset (If Necessary):**
|
|
889
|
+
* Sometimes, old state or cached data can cause confusion. As a general troubleshooting step if issues persist:
|
|
890
|
+
* Try deleting the `.ph` folder in your user's home directory (`~/.ph`). This folder stores global Powerhouse configurations and cached dependencies.
|
|
891
|
+
* Clear browser storage (localStorage, IndexedDB) for the Connect application.
|
|
892
|
+
|
|
893
|
+
## Expected Outcome
|
|
894
|
+
- You can correctly identify which GraphQL endpoint to use for different types of queries and operations.
|
|
895
|
+
- You understand that document-specific operations (like creating or updating documents in a drive) are typically handled by drive-specific endpoints.
|
|
896
|
+
- You can use browser developer tools to inspect network requests and confirm which endpoints Powerhouse Connect is using.
|
|
897
|
+
- Documents sync as expected, and you can retrieve their state by querying the appropriate endpoint.
|
|
898
|
+
|
|
899
|
+
## Common Issues and Solutions
|
|
900
|
+
- **Issue:** Documents created in Connect don't appear when querying `http://localhost:4001/graphql`.
|
|
901
|
+
- **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`.
|
|
902
|
+
- **Issue:** Persistent syncing problems or unexpected behavior after trying the above.
|
|
903
|
+
- **Solution:** Consider cleaning the global Powerhouse setup by removing `~/.ph`
|
|
904
|
+
|
|
905
|
+
</details>
|