@powerhousedao/academy 0.1.0-dev.3 → 0.1.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.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/docs/academy/01-GetStarted/00-ExploreDemoPackage.md +78 -0
- package/docs/academy/01-GetStarted/{03-ToDoList/01-CreateNewPowerhouseProject.md → 01-CreateNewPowerhouseProject.md} +10 -8
- package/docs/academy/01-GetStarted/02-DefineToDoListDocumentModel.md +97 -0
- package/docs/academy/01-GetStarted/{03-ToDoList/03-ImplementOperationReducers.md → 03-ImplementOperationReducers.md} +20 -16
- package/docs/academy/01-GetStarted/{03-ToDoList/04-BuildToDoListEditor.md → 04-BuildToDoListEditor.md} +15 -15
- package/docs/academy/01-GetStarted/{00-GetStarted.mdx → home.mdx} +12 -12
- package/docs/academy/{02-AdvancedTutorial/01-Create/01-SetupBuilderEnvironment.md → 02-MasteryTrack/01-BuilderEnvironment/01-Prerequisites.md} +78 -43
- package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/02-StandardDocumentModelWorkflow.md +253 -0
- package/docs/academy/{02-AdvancedTutorial/01-Create/00-BuilderTools.md → 02-MasteryTrack/01-BuilderEnvironment/03-BuilderTools.md} +1 -1
- package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/_category_.json +7 -0
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/01-WhatIsADocumentModel.md +188 -0
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/02-SpecifyTheStateSchema.md +72 -0
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/03-SpecifyDocumentOperations.md +119 -0
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/04-UseTheDocumentModelGenerator.md +116 -0
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/05-ImplementDocumentReducers.md +282 -0
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/06-ImplementDocumentModelTests.md +277 -0
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/07-ExampleToDoListRepository.md +1 -0
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/_category_.json +7 -0
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/02-ConfiguringDrives.md +2 -2
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/03-BuildingADriveExplorer.md +1 -1
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-DocumentTools/00-DocumentToolbar.md +20 -0
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/07-DocumentTools/01-OperationHistory.md +1 -1
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/01-ReadingAndWritingThroughTheAPI.mdx +2 -2
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/02-GraphQLAtPowerhouse.md +1 -1
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/graphql/index.md +1 -1
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/02-IntroductionToPackages.md +2 -2
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/03-RunOnACloudServer.md +3 -3
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/03-SetupEnvironment.md +1 -1
- package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/_category_.json +1 -1
- package/docs/academy/04-APIReferences/00-PowerhouseCLI.md +738 -0
- package/docs/academy/04-APIReferences/01-ReactHooks.md +16 -0
- package/docs/academy/04-APIReferences/02-ReactorAPI.md +1 -0
- package/docs/academy/04-APIReferences/03-Configuration.md +64 -0
- package/docs/academy/{04-ComponentLibrary/01-PowerhouseDesignSystem.md → 06-ComponentLibrary/00-PowerhouseDesignSystem.md} +8 -8
- package/docs/academy/{04-ComponentLibrary → 06-ComponentLibrary}/02-BuildingWithScalars.md +2 -2
- package/docs/academy/{04-ComponentLibrary → 06-ComponentLibrary}/03-Scalar-Components/01-phid-field.mdx +1 -1
- package/docs/academy/{06-Cookbook.md → 07-Cookbook.md} +24 -18
- package/docs/academy/08-Glossary.md +82 -0
- package/docusaurus.config.ts +7 -14
- package/package.json +10 -7
- package/scripts/generate-combined-cli-docs.ts +80 -0
- package/sidebars.ts +99 -13
- package/src/components/HomepageFeatures/index.tsx +10 -10
- package/src/css/custom.css +11 -0
- package/src/pages/{index.tsx → _archive-homepage.tsx} +1 -1
- package/src/theme/DocCardList/index.tsx +30 -0
- package/static/img/storybook-icon.svg +18 -0
- package/docs/academy/01-GetStarted/01-InstallDemoPackage.md +0 -38
- package/docs/academy/01-GetStarted/02-LoginWithRenown.md +0 -32
- package/docs/academy/01-GetStarted/03-ToDoList/02-DefineToDoListDocumentModel.md +0 -86
- package/docs/academy/01-GetStarted/03-ToDoList/_category_.json +0 -8
- package/docs/academy/01-GetStarted/_category_.json +0 -3
- package/docs/academy/02-AdvancedTutorial/01-Create/02-MoreTutorials/_category_.json +0 -8
- package/docs/academy/02-AdvancedTutorial/01-Create/02-StandardDocumentModelWorkflow.md +0 -229
- package/docs/academy/03-APIReferences/00-PowerhouseCLI.md +0 -40
- package/docs/academy/03-APIReferences/01-ReactHooks.md +0 -3
- package/docs/academy/03-APIReferences/02-ReactorUsage.md +0 -1
- package/docs/academy/07-Glossary.md +0 -53
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/DocumentModelHeader.png +0 -0
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/DocumentModelOperations.png +0 -0
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/OpenDocumentModelEditor.gif +0 -0
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/completeEditor.png +0 -0
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/connectApp.gif +0 -0
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/form.png +0 -0
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/mytodolist.gif +0 -0
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/reducers.png +0 -0
- /package/docs/academy/01-GetStarted/{03-ToDoList/images → images}/vscode.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/01-BuildingBeautifulDocumentEditors.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/07-DocumentTools/02-RevisionHistoryTimeline.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/07-DocumentTools/_category_.json +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/07-DocumentTools/images/committer-address-popup.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/07-DocumentTools/images/revision-hash-popup.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/07-DocumentTools/images/revision-history-list.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/07-DocumentTools/images/signature-details-popup.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/08-Authorization/01-RenownAuthenticationFlow.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/08-Authorization/02-Authorization.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/08-Authorization/_category_.json +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/08-Authorization/images/ConnectAddress.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/08-Authorization/images/LoginComplete.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/08-Authorization/images/OperationsHistory.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/08-Authorization/images/RenownLogin.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/08-Authorization/images/ReturnToConnect.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/_category_.json +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/images/CreateDrive.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/images/CreateNewDrive.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/03-BuildingUserExperiences/images/mytodolist.gif +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/03-WorkingWithSubgraphs/02-GraphQLAndSubgraphs.mdx +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/03-WorkingWithSubgraphs/03-WorkingWithSubgraphs.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/03-WorkingWithSubgraphs/_category_.json +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/04-analytics-processor.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/01-SetupBuilderEnvironment.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/02-CreateNewPowerhouseProject.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/03-GenerateAnAnalyticsProcessor.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/04-UpdateAnalyticsProcessor.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/_category_.json +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-SPV.gif +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-a-new-asset.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Create-a-transaction.gif +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/images/Transaction-table.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/images/create-a-new-RWA-document.gif +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/05-AnalyticsProcessorTutorial/images/granularity.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/GraphQL References/QueryingADocumentWithGraphQL.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/listener-raw.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/raw-reports1.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/raw-reports2.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/GraphQL References/rwa-reports/rwaRegister.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/apse.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/best-practices.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/filter.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/filteroptions.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/graphql/integration.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/dbs.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/high-level.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/indexeddb.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/libs-core.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/libs.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/lod.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/logo.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/navbar.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/overview-1.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/overview-2.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/overview-3.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/overview-4.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/overview-5.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/overview-6.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/paths-1.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/images/paths-2.jpg +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/intro.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/typescript/benchmarks.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/typescript/browser.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/typescript/compatibility.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/typescript/index.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/typescript/memory.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/typescript/pg.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/typescript/schema.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/typescript/utilities.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/use-cases/index.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/use-cases/maker.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/06-Analytics Engine/use-cases/processors.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/_category_.json +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/images/OperationHistory.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/images/OperationsQuery.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/images/QueryDocumentID.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/04-WorkWithData/images/SwitchboardButton.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/00-IntegrateInAFront-End +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/01-IntroducingFusion +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/02-PublishYourProject.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/04-GraphQLNamespacing +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/05-LaunchYourBackend.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/06-LaunchYourFrontend.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/_category_.json +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/images/SSHConnection.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/images/homedesign.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/images/keyconcepts.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/images/tutorialschema.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/01-SetupBuilderEnvironment.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/02-CreateNewPowerhouseProject.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/03-DefineChatroomDocumentModel.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/04-ImplementOperationReducers.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/05-ImplementChatroomEditor.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/06-LaunchALocalReactor.md +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/_category_.json +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/image-1.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/image-2.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/image-3.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/image-4.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/image-5.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/image.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/images/ChatRoomConnectApp.gif +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/images/ChatRoomTest.gif +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/images/completeEditor.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/images/form.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/images/reducers.png +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials → 03-ExampleUsecases}/Chatroom/images/vscode.png +0 -0
- /package/docs/academy/{03-APIReferences → 04-APIReferences}/_category_.json +0 -0
- /package/docs/academy/05-Architecture/05-DocumentModelTheory/{01-WhatIsADocumentModel.md → 01-WhatIsADocumentModel} +0 -0
- /package/docs/academy/05-Architecture/05-DocumentModelTheory/{02-DAOandDocumentsModelsQ+A.md → 02-DAOandDocumentsModelsQ+A} +0 -0
- /package/docs/academy/05-Architecture/05-DocumentModelTheory/{02-domain-modeling.md → 02-domain-modeling} +0 -0
- /package/docs/academy/05-Architecture/05-DocumentModelTheory/{03-BenefitsOfDocumentModels.md → 03-BenefitsOfDocumentModels} +0 -0
- /package/docs/academy/{02-AdvancedTutorial/01-Create/02-MoreTutorials/04-UtilitiesAndTips.md → 05-Architecture/05-DocumentModelTheory/04-UtilitiesAndTips} +0 -0
- /package/docs/academy/05-Architecture/05-DocumentModelTheory/{05-best-practices.md → 05-best-practices} +0 -0
- /package/docs/academy/{04-ComponentLibrary/00-StorybookLink → 06-ComponentLibrary/01-StorybookLink} +0 -0
- /package/docs/academy/{04-ComponentLibrary → 06-ComponentLibrary}/03-Scalar-Components/02-input-field.mdx +0 -0
- /package/docs/academy/{04-ComponentLibrary → 06-ComponentLibrary}/04-Complex-Components/01-sidebar.mdx +0 -0
- /package/docs/academy/{04-ComponentLibrary → 06-ComponentLibrary}/05-Layout-Components/01-test-toupdate.mdx +0 -0
- /package/docs/academy/{04-ComponentLibrary → 06-ComponentLibrary}/06-Fragments/01-test-toupdate.mdx +0 -0
- /package/docs/academy/{04-ComponentLibrary → 06-ComponentLibrary}/_category_.json +0 -0
package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/06-ImplementDocumentModelTests.md
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# Implement Document Model Tests
|
|
2
|
+
|
|
3
|
+
## Ensuring Robustness and Reliability
|
|
4
|
+
|
|
5
|
+
In the previous sections, we've meticulously defined our document model's state schema, specified its operations, used the generator to scaffold our codebase, and implemented the core reducer logic. Now, we reach a critical stage that underpins the reliability and correctness of our entire document model: **Implementing Document Model Tests**.
|
|
6
|
+
|
|
7
|
+
Testing is not merely an afterthought; it's an integral part of the development lifecycle, especially in systems like Powerhouse where data integrity, predictable state transitions, and auditable histories are paramount. Well-crafted tests serve as a safety net, allowing you to refactor and extend your document model with confidence, ensuring that it behaves as expected under all conditions.
|
|
8
|
+
|
|
9
|
+
This document will provide a deep dive into testing Powerhouse document models, focusing on the testing of reducer logic, which forms the heart of your model's behavior.
|
|
10
|
+
|
|
11
|
+
## The Importance of Testing Document Model Reducers
|
|
12
|
+
|
|
13
|
+
Document model reducers, as explored in "[Implement Document Reducers](05-ImplementDocumentReducers.md)", are pure functions responsible for calculating the next state of a document based on its current state and a given operation. Their purity and deterministic nature make them inherently testable. Testing reducers thoroughly ensures:
|
|
14
|
+
|
|
15
|
+
1. **Correctness of Business Logic**: Verifies that each operation transforms the document state according to the defined business rules.
|
|
16
|
+
2. **State Immutability**: Confirms that reducers do not mutate the original state, a cornerstone of Powerhouse's event sourcing architecture.
|
|
17
|
+
3. **Integrity of Operation History**: While reducers focus on state, tests can also implicitly verify that operations are being correctly structured for the event log (as seen in example tests in `01-GetStarted/03-ImplementOperationReducers.md`).
|
|
18
|
+
4. **Regression Prevention**: Protects against accidental breakage of existing functionality when new features are added or existing code is refactored.
|
|
19
|
+
5. **Living Documentation**: Well-written tests can serve as examples of how operations are intended to be used and how they affect the document state.
|
|
20
|
+
|
|
21
|
+
## Setting Up the Test Environment
|
|
22
|
+
|
|
23
|
+
Powerhouse projects, when initialized using `ph init` (as detailed in "[Standard Document Model Workflow](../01-BuilderEnvironment/02-StandardDocumentModelWorkflow.md)"), typically come pre-configured with a testing framework like Jest. You'll find that test files often end with `.test.ts` (e.g., `your-model-name.test.ts`) and are co-located with the code they test, often in a `tests/` subdirectory within the `src/reducers/` folder.
|
|
24
|
+
|
|
25
|
+
The Document Model Generator (`ph generate YourModelName.phdm.zip`) usually creates a skeleton test file for your reducers (e.g., `document-models/YourModelName/src/reducers/tests/your-model-name.test.ts`). This provides a great starting point.
|
|
26
|
+
|
|
27
|
+
Key tools and concepts you'll encounter in these test files include:
|
|
28
|
+
|
|
29
|
+
* **`describe(name, fn)`**: Creates a block that groups together several related tests.
|
|
30
|
+
* **`it(name, fn)`** or **`test(name, fn)`**: This is your actual test case.
|
|
31
|
+
* **`beforeEach(fn)`**: A function that runs before each test case in a `describe` block. Useful for setting up a common initial state for each test.
|
|
32
|
+
* **`expect(value)`**: Used with "matcher" functions to assert that a certain value meets expectations. Common matchers include `toBe()`, `toEqual()`, `toHaveLength()`, `toThrow()`, etc.
|
|
33
|
+
|
|
34
|
+
## Core Components for Testing Document Model Reducers
|
|
35
|
+
|
|
36
|
+
When testing your document model reducers, you'll primarily interact with artifacts generated by the Powerhouse Document Model Generator and the reducer logic you've written:
|
|
37
|
+
|
|
38
|
+
1. **Initial Document State (`utils.createDocument()`):**
|
|
39
|
+
* The `gen/utils.ts` file (or similar) often exports a `createDocument()` function. This utility, derived from your state schema (including default values), is crucial for creating a fresh, predictable starting state for your document model instance before each test.
|
|
40
|
+
* Example: `document = utils.createDocument();`
|
|
41
|
+
|
|
42
|
+
2. **Action Creators (`creators` or `operations`):**
|
|
43
|
+
* The `gen/operations.ts` or `gen/creators.ts` file exports action creator functions for each operation defined in your schema. Using these functions (e.g., `creators.addTodoItem(input)`) instead of manually constructing action objects is highly recommended because they ensure your actions are correctly typed and structured, reducing the chance of errors in your tests.
|
|
44
|
+
* Example: `const action = creators.addTodoItem({ id: '1', text: 'Test item' });`
|
|
45
|
+
|
|
46
|
+
3. **The Main Reducer (`reducer`):**
|
|
47
|
+
* The primary export from your reducer implementation file (e.g., `document-models/YourModelName/src/reducers/your-model-name.ts`) is the main reducer object or function that combines all your individual operation handlers. This is what you'll call with the current state and an action to get the new state.
|
|
48
|
+
* In some generated setups (like the `ToDoList` example from `01-GetStarted`), there might be a top-level `reducer` function exported from `gen/reducer.ts` that wraps your custom reducer logic and handles the overall document structure (state, operations history).
|
|
49
|
+
* Example: `const updatedDocument = reducer(document, action);`
|
|
50
|
+
|
|
51
|
+
4. **Generated Types (`types.ts`):**
|
|
52
|
+
* Using the TypeScript types from `gen/types.ts` (e.g., `ToDoListState`, `ToDoItem`, input types) in your test setup and assertions helps maintain type safety and clarity in your tests.
|
|
53
|
+
|
|
54
|
+
## Writing Effective Test Cases for Reducers
|
|
55
|
+
|
|
56
|
+
Let's draw inspiration from the `ToDoList` example tests found in `01-GetStarted/03-ImplementOperationReducers.md` and expand on the principles.
|
|
57
|
+
|
|
58
|
+
A typical test file structure:
|
|
59
|
+
```typescript
|
|
60
|
+
import utils from '../../gen/utils'; // For createDocument
|
|
61
|
+
import { reducer } from '../../gen/reducer'; // The main reducer
|
|
62
|
+
import * as creators from '../../gen/creators'; // Action creators
|
|
63
|
+
import { ToDoListDocument, ToDoListState, ToDoItem } from '../../gen/types'; // Your model's types
|
|
64
|
+
|
|
65
|
+
describe('ToDoList Document Model Operations', () => {
|
|
66
|
+
let initialDocument: ToDoListDocument; // Or your specific document type
|
|
67
|
+
|
|
68
|
+
beforeEach(() => {
|
|
69
|
+
// Start with a fresh, empty document for each test
|
|
70
|
+
initialDocument = utils.createDocument();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// Test suite for ADD_TODO_ITEM operation
|
|
74
|
+
describe('addTodoItemOperation', () => {
|
|
75
|
+
it('should add a new item to an empty list', () => {
|
|
76
|
+
const input = { id: 'task1', text: 'Buy groceries' };
|
|
77
|
+
const action = creators.addTodoItem(input);
|
|
78
|
+
|
|
79
|
+
const updatedDocument = reducer(initialDocument, action);
|
|
80
|
+
const state = updatedDocument.state.global; // Accessing the specific state slice
|
|
81
|
+
|
|
82
|
+
expect(state.items).toHaveLength(1);
|
|
83
|
+
expect(state.items[0]).toEqual({
|
|
84
|
+
id: 'task1',
|
|
85
|
+
text: 'Buy groceries',
|
|
86
|
+
checked: false, // Assuming default
|
|
87
|
+
});
|
|
88
|
+
// Verify immutability: the new items array should be a different instance
|
|
89
|
+
expect(state.items).not.toBe(initialDocument.state.global.items);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('should add a new item to an existing list', () => {
|
|
93
|
+
// First, add an initial item
|
|
94
|
+
const firstItemInput = { id: 'task1', text: 'First task' };
|
|
95
|
+
let currentDocument = reducer(initialDocument, creators.addTodoItem(firstItemInput));
|
|
96
|
+
|
|
97
|
+
// Now, add the second item
|
|
98
|
+
const secondItemInput = { id: 'task2', text: 'Second task' };
|
|
99
|
+
const action = creators.addTodoItem(secondItemInput);
|
|
100
|
+
currentDocument = reducer(currentDocument, action);
|
|
101
|
+
|
|
102
|
+
const state = currentDocument.state.global;
|
|
103
|
+
expect(state.items).toHaveLength(2);
|
|
104
|
+
expect(state.items[1]).toEqual({
|
|
105
|
+
id: 'task2',
|
|
106
|
+
text: 'Second task',
|
|
107
|
+
checked: false,
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// Test suite for UPDATE_TODO_ITEM operation
|
|
113
|
+
describe('updateTodoItemOperation', () => {
|
|
114
|
+
let docWithItem: ToDoListDocument;
|
|
115
|
+
const initialItemId = 'item-to-update';
|
|
116
|
+
|
|
117
|
+
beforeEach(() => {
|
|
118
|
+
// Setup: add an item that can be updated in subsequent tests
|
|
119
|
+
const addAction = creators.addTodoItem({ id: initialItemId, text: 'Original Text' });
|
|
120
|
+
docWithItem = reducer(initialDocument, addAction);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('should update the text of an existing item', () => {
|
|
124
|
+
const updateInput = { id: initialItemId, text: 'Updated Text' };
|
|
125
|
+
const action = creators.updateTodoItem(updateInput);
|
|
126
|
+
|
|
127
|
+
const updatedDocument = reducer(docWithItem, action);
|
|
128
|
+
const item = updatedDocument.state.global.items.find(i => i.id === initialItemId);
|
|
129
|
+
|
|
130
|
+
expect(item).toBeDefined();
|
|
131
|
+
expect(item?.text).toBe('Updated Text');
|
|
132
|
+
// The 'checked' status should remain unchanged if not provided
|
|
133
|
+
expect(item?.checked).toBe(false);
|
|
134
|
+
// Verify immutability for the updated item and the items array
|
|
135
|
+
expect(updatedDocument.state.global.items).not.toBe(docWithItem.state.global.items);
|
|
136
|
+
expect(item).not.toBe(docWithItem.state.global.items.find(i => i.id === initialItemId));
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('should update the checked status of an existing item', () => {
|
|
140
|
+
const updateInput = { id: initialItemId, checked: true };
|
|
141
|
+
const action = creators.updateTodoItem(updateInput);
|
|
142
|
+
|
|
143
|
+
const updatedDocument = reducer(docWithItem, action);
|
|
144
|
+
const item = updatedDocument.state.global.items.find(i => i.id === initialItemId);
|
|
145
|
+
|
|
146
|
+
expect(item?.checked).toBe(true);
|
|
147
|
+
// The 'text' should remain unchanged
|
|
148
|
+
expect(item?.text).toBe('Original Text');
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it('should update both text and checked status', () => {
|
|
152
|
+
const updateInput = { id: initialItemId, text: 'New Text Again', checked: true };
|
|
153
|
+
const action = creators.updateTodoItem(updateInput);
|
|
154
|
+
|
|
155
|
+
const updatedDocument = reducer(docWithItem, action);
|
|
156
|
+
const item = updatedDocument.state.global.items.find(i => i.id === initialItemId);
|
|
157
|
+
|
|
158
|
+
expect(item?.text).toBe('New Text Again');
|
|
159
|
+
expect(item?.checked).toBe(true);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it('should throw an error or not change state if item to update is not found', () => {
|
|
163
|
+
const updateInput = { id: 'non-existent-id', text: 'Wont matter' };
|
|
164
|
+
const action = creators.updateTodoItem(updateInput);
|
|
165
|
+
|
|
166
|
+
// Depending on your reducer's error handling for "item not found":
|
|
167
|
+
// Option 1: Reducer throws an error (as in 01-GetStarted/03-ImplementOperationReducers.md example)
|
|
168
|
+
expect(() => reducer(docWithItem, action)).toThrowError('Item with id non-existent-id not found');
|
|
169
|
+
|
|
170
|
+
// Option 2: Reducer returns original state (if it handles errors gracefully by not changing state)
|
|
171
|
+
// const updatedDocument = reducer(docWithItem, action);
|
|
172
|
+
// expect(updatedDocument.state.global).toEqual(docWithItem.state.global);
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// Test suite for DELETE_TODO_ITEM operation
|
|
177
|
+
describe('deleteTodoItemOperation', () => {
|
|
178
|
+
let docWithItems: ToDoListDocument;
|
|
179
|
+
const item1Id = 'item1';
|
|
180
|
+
const item2Id = 'item2';
|
|
181
|
+
|
|
182
|
+
beforeEach(() => {
|
|
183
|
+
// Setup: add multiple items
|
|
184
|
+
const addAction1 = creators.addTodoItem({ id: item1Id, text: 'Item One' });
|
|
185
|
+
let tempDoc = reducer(initialDocument, addAction1);
|
|
186
|
+
const addAction2 = creators.addTodoItem({ id: item2Id, text: 'Item Two' });
|
|
187
|
+
docWithItems = reducer(tempDoc, addAction2);
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
it('should delete an existing item', () => {
|
|
191
|
+
const deleteInput = { id: item1Id };
|
|
192
|
+
const action = creators.deleteTodoItem(deleteInput);
|
|
193
|
+
|
|
194
|
+
const updatedDocument = reducer(docWithItems, action);
|
|
195
|
+
const state = updatedDocument.state.global;
|
|
196
|
+
|
|
197
|
+
expect(state.items).toHaveLength(1);
|
|
198
|
+
expect(state.items.find(item => item.id === item1Id)).toBeUndefined();
|
|
199
|
+
expect(state.items[0].id).toBe(item2Id);
|
|
200
|
+
// Verify immutability
|
|
201
|
+
expect(state.items).not.toBe(docWithItems.state.global.items);
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it('should not change state if item to delete is not found', () => {
|
|
205
|
+
const deleteInput = { id: 'non-existent-id' };
|
|
206
|
+
const action = creators.deleteTodoItem(deleteInput);
|
|
207
|
+
|
|
208
|
+
const updatedDocument = reducer(docWithItems, action);
|
|
209
|
+
expect(updatedDocument.state.global.items).toHaveLength(2);
|
|
210
|
+
expect(updatedDocument.state.global).toEqual(docWithItems.state.global); // Or check for array instance equality
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// Testing Operation History (as shown in 01-GetStarted/03-ImplementOperationReducers.md)
|
|
215
|
+
it('should record operations in the document history', () => {
|
|
216
|
+
const addAction = creators.addTodoItem({ id: 'hist1', text: 'History Test' });
|
|
217
|
+
let doc = reducer(initialDocument, addAction);
|
|
218
|
+
|
|
219
|
+
expect(doc.operations.global).toHaveLength(1);
|
|
220
|
+
expect(doc.operations.global[0].type).toBe('ADD_TODO_ITEM'); // Ensure this matches actual operation type string
|
|
221
|
+
|
|
222
|
+
const updateAction = creators.updateTodoItem({ id: 'hist1', checked: true });
|
|
223
|
+
doc = reducer(doc, updateAction);
|
|
224
|
+
|
|
225
|
+
expect(doc.operations.global).toHaveLength(2);
|
|
226
|
+
expect(doc.operations.global[1].type).toBe('UPDATE_TODO_ITEM');
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Key Assertions to Make:
|
|
232
|
+
|
|
233
|
+
1. **State Changes**:
|
|
234
|
+
* Verify that the relevant parts of the state are updated correctly (e.g., an item is added to an array, a field is changed).
|
|
235
|
+
* Use `toEqual()` for deep equality checks on objects and arrays.
|
|
236
|
+
* Check array lengths, specific property values, etc.
|
|
237
|
+
|
|
238
|
+
2. **Immutability**:
|
|
239
|
+
* **Crucial**: Always assert that your reducers return *new* state objects/arrays when changes occur, rather than mutating the original ones.
|
|
240
|
+
* For objects: `expect(newState).not.toBe(oldState);`
|
|
241
|
+
* For arrays: `expect(newState.items).not.toBe(oldState.items);`
|
|
242
|
+
* For modified items within an array: `expect(updatedItem).not.toBe(originalItem);`
|
|
243
|
+
|
|
244
|
+
3. **Operation History (if applicable at this testing layer)**:
|
|
245
|
+
* As seen in `01-GetStarted/03-ImplementOperationReducers.md`, the top-level reducer provided by Powerhouse might also update an `operations` log in the document. If your tests involve this encompassing reducer, you can assert that operations are correctly recorded.
|
|
246
|
+
* `expect(updatedDocument.operations.global).toHaveLength(expectedCount);`
|
|
247
|
+
* `expect(updatedDocument.operations.global[index].type).toBe('EXPECTED_OPERATION_TYPE');`
|
|
248
|
+
|
|
249
|
+
4. **Edge Cases and Error Handling**:
|
|
250
|
+
* Test what happens when an operation receives invalid input (e.g., trying to update/delete an item that doesn't exist).
|
|
251
|
+
* If your reducer is designed to throw errors, use `expect(() => reducer(...)).toThrowError('Expected error message');`.
|
|
252
|
+
* If it handles errors by returning the original state or a specific error state, test for that outcome.
|
|
253
|
+
|
|
254
|
+
## Best Practices for Document Model Tests
|
|
255
|
+
|
|
256
|
+
* **Isolate Tests**: Each `it` block should ideally test one specific aspect or scenario. `beforeEach` can help reset state for this.
|
|
257
|
+
* **Descriptive Names**: Name your `describe` and `it` blocks clearly so they explain what's being tested.
|
|
258
|
+
* **AAA Pattern (Arrange, Act, Assert)**:
|
|
259
|
+
* **Arrange**: Set up the initial state and any required test data.
|
|
260
|
+
* **Act**: Execute the operation (call the reducer).
|
|
261
|
+
* **Assert**: Check if the outcome is as expected.
|
|
262
|
+
* **Test Pure Logic**: Focus on testing the input/output behavior of your reducers. Avoid testing implementation details if possible.
|
|
263
|
+
* **Cover All Operations**: Ensure every defined document operation has corresponding tests.
|
|
264
|
+
* **Cover All State Transitions**: For each operation, test different scenarios that lead to different state changes or outcomes.
|
|
265
|
+
* **Refactor Tests with Code**: As your reducer logic evolves, update your tests accordingly. Outdated tests are worse than no tests.
|
|
266
|
+
* **Run Tests Frequently**: Integrate testing into your development workflow. Run tests after making changes to ensure you haven't broken anything. The `pnpm run test` command is your friend.
|
|
267
|
+
|
|
268
|
+
## Conclusion: The Payoff of Diligent Testing
|
|
269
|
+
|
|
270
|
+
Implementing comprehensive tests for your document model reducers is an investment that pays dividends in the long run. It leads to:
|
|
271
|
+
|
|
272
|
+
* **Higher Quality Models**: More reliable and robust document models with fewer bugs.
|
|
273
|
+
* **Increased Confidence**: Ability to make changes and refactor code without fear of breaking existing functionality.
|
|
274
|
+
* **Easier Debugging**: When tests fail, they pinpoint the exact operation and scenario that's problematic.
|
|
275
|
+
* **Better Collaboration**: Tests clarify the intended behavior of the document model for all team members.
|
|
276
|
+
|
|
277
|
+
By following the principles and practices outlined in this document, and by drawing on the generated code and examples provided by Powerhouse, you can build a strong suite of tests that safeguard the integrity and functionality of your document models. This diligence is a hallmark of a "Mastery Track" developer, ensuring that the solutions you build are not just functional but also stable, maintainable, and trustworthy.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Example: ToDoList Repo
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": "Document Model Creation",
|
|
3
|
+
"link": {
|
|
4
|
+
"type": "generated-index",
|
|
5
|
+
"description": "This tutorial will guide you through the process of creating an advanced to-do list document model in Powerhouse, while getting you familiar with the Powerhouse document model framework."
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -5,7 +5,7 @@ A drive in Powerhouse is a container or a wrapper for documents and data. It's a
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
7
|
Before configuring a drive, ensure you have:
|
|
8
|
-
- Powerhouse [CLI installed](/
|
|
8
|
+
- Powerhouse [CLI installed](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
|
|
9
9
|
- Access to a Powerhouse instance
|
|
10
10
|
- Appropriate permissions to create and manage drives
|
|
11
11
|
|
|
@@ -38,7 +38,7 @@ A drive exists by making use of a reactor and the storagelayer that specific rea
|
|
|
38
38
|
|
|
39
39
|
These customized editors are called Drive explorers or Drive Apps. They provide custom views, organization tools, and interactive features tailored to specific use cases. For example, a Drive Explorer might present data as a Kanban board, provide aggregated insights, or offer specialized widgets for data processing.
|
|
40
40
|
|
|
41
|
-
To learn more about building and customizing Drive Explorers, check out our [Building a Drive Explorer](/
|
|
41
|
+
To learn more about building and customizing Drive Explorers, check out our [Building a Drive Explorer](/academy/MasteryTrack/BuildingUserExperiences/BuildingADriveExplorer) guide.
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
## Creating a New Drive
|
|
@@ -69,7 +69,7 @@ The application allows users to create and manage todo lists with a visual progr
|
|
|
69
69
|
- Start by running Connect locally with `ph connect`
|
|
70
70
|
|
|
71
71
|
:::warning
|
|
72
|
-
Since you've likely already run through the [document modeling process](/
|
|
72
|
+
Since you've likely already run through the [document modeling process](/academy/GetStarted/DefineToDoListDocumentModel) of a simplified todo list, we'll offer you a **slightly more advanced** todo list below!
|
|
73
73
|
:::
|
|
74
74
|
|
|
75
75
|
- Download [todo.phdm.zip](https://github.com/powerhouse-inc/todo-drive-explorer/blob/ee63786fa8ceed71de63cd9c52f1795ad11ac403/todo.phdm.zip) from our GitHub repo.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Document Toolbar
|
|
2
|
+
|
|
3
|
+
The Document Toolbar is a central component in Powerhouse Connect, appearing at the top of every document view. It provides quick access to a variety of tools and functions designed to streamline your workflow and enhance document management.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The toolbar is designed to be intuitive and context-aware, offering relevant options based on the document type and your current task. Its capabilities range from basic actions to more advanced document control features.
|
|
8
|
+
|
|
9
|
+
Key functionalities often include:
|
|
10
|
+
* **Switchboard API Access:** Access the Switchboard API via its logo in the toolbar. This opens the Apollo Studio Sandbox, pre-populating the DocumentID for your current document model. This feature is unavailable for locally stored documents.
|
|
11
|
+
* **Navigation and Versioning:** Tools for managing [document versions](/academy/MasteryTrack/BuildingUserExperiences/DocumentTools/OperationHistory), such as undo/redo, and accessing the [revision history timeline](/academy/MasteryTrack/BuildingUserExperiences/DocumentTools/RevisionHistoryTimeline).
|
|
12
|
+
* **Document Actions:** Buttons for common operations like exporting or deleting documents.
|
|
13
|
+
* **Information Display:** Shows the document title and may include indicators for status (e.g., connectivity, errors) or active modes.
|
|
14
|
+
* **Search and Filtering:** Integrated search capabilities to find assets or attachments within the document context.
|
|
15
|
+
* **View Customization:** Options to switch between different views or display modes.
|
|
16
|
+
* **Contextual Tools:** Depending on the document, you might find toggles, dropdowns for specific actions (e.g., "Sync Schema", "Fixed Income Purchase"), or buttons for settings and configurations.
|
|
17
|
+
|
|
18
|
+
The specific set of tools available on the toolbar can be configured and may evolve as new features are introduced. This section will detail the various components and options you may encounter.
|
|
19
|
+
|
|
20
|
+
*(Detailed sections on each toolbar feature, such as "Export Button", "Title Display", "Search Functionality", "Toggle Switches", "Icon Buttons", etc., will follow here.)*
|
|
@@ -49,7 +49,7 @@ Hovering over a revision reveals its event ID and state hash, providing traceabi
|
|
|
49
49
|
|
|
50
50
|
### Signature Verification
|
|
51
51
|
Clicking the signature badge shows signature details, including signer address, hash, and verification status. This ensures every operation is cryptographically auditable.
|
|
52
|
-
Read more about how we are using [Renown](/
|
|
52
|
+
Read more about how we are using [Renown](/academy/MasteryTrack/BuildingUserExperiences/Authorization/RenownAuthenticationFlow) for authentication & verification of signer data.
|
|
53
53
|
|
|
54
54
|

|
|
55
55
|
|
|
@@ -17,8 +17,8 @@ Your API requests are authenticated using API keys or tokens. Any request that d
|
|
|
17
17
|
|
|
18
18
|
### Starting the reactor locally
|
|
19
19
|
|
|
20
|
-
In this documentation we'll show how to use a **GraphQL** query to query a document model. We'll **continue on the ToDoList example** from our [introduction tutorial](/
|
|
21
|
-
To make our document model available in the Apollo Studio Sandbox we'll need to store it on a remote [Reactor](/
|
|
20
|
+
In this documentation we'll show how to use a **GraphQL** query to query a document model. We'll **continue on the ToDoList example** from our [introduction tutorial](/academy/GetStarted/DefineToDoListDocumentModel) , but the process can be applied to any other document model.
|
|
21
|
+
To make our document model available in the Apollo Studio Sandbox we'll need to store it on a remote [Reactor](/academy/Architecture/WorkingWithTheReactor).
|
|
22
22
|
|
|
23
23
|
:::info
|
|
24
24
|
**Powerhouse Reactors** are the nodes in the network that store documents, resolve conflicts and rerun operations to verify document event histories.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
In this section, we will cover **the core concepts of GraphQL with examples applied to the Powerhouse ecosystem**. More specifically, GraphQL is used as:
|
|
4
4
|
- The **schema definition language (SDL)** for defining our document models and thereby self-documenting the API to the data model. It allows developers to define the structure and relationships of data in a strongly-typed format.
|
|
5
|
-
- As the **query language in subgraphs**, which allow different services to expose and query structured data dynamically. Jump to the section [GraphQL and Subgraphs](/
|
|
5
|
+
- As the **query language in subgraphs**, which allow different services to expose and query structured data dynamically. Jump to the section [GraphQL and Subgraphs](/academy/MasteryTrack/WorkWithData/WorkingWithSubgraphs/GraphQLAndSubgraphs) to learn more about this.
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
### Why GraphQL?
|
|
@@ -31,7 +31,7 @@ query {
|
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
In this example, query is the operation type, user is the field on the root type, and name, email, and friends are fields on the user type. The id: `"1"` is a parameter passed to the query, specifying which user to fetch.
|
|
34
|
-
You can find more examples of GraphQL core concept in the section [GraphQL at Powerhouse](/
|
|
34
|
+
You can find more examples of GraphQL core concept in the section [GraphQL at Powerhouse](/academy/MasteryTrack/WorkWithData/GraphQLAtPowerhouse).
|
|
35
35
|
|
|
36
36
|
## Analytics Query Structure
|
|
37
37
|
|
package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/02-IntroductionToPackages.md
RENAMED
|
@@ -4,7 +4,7 @@ Packages of document models are a core structuring mechanism in the Powerhouse f
|
|
|
4
4
|
|
|
5
5
|
By packaging document models together, developers can create well-organized, interoperable sets of data structures that capture the specific needs of various operational processes. Whether used for financial operations, governance, or contributor management, these packages streamline development and integration within Powerhouse's decentralized framework.
|
|
6
6
|
|
|
7
|
-
### Key Features
|
|
7
|
+
### Key Features of Packages
|
|
8
8
|
|
|
9
9
|
- **Modular Structure** – Packages encapsulate related document models, making it easier to manage and deploy them as a cohesive unit.
|
|
10
10
|
- **Standardized Definitions** – Each document model within a package follows Powerhouse's structured schema approach, ensuring consistency in data representation.
|
|
@@ -12,7 +12,7 @@ By packaging document models together, developers can create well-organized, int
|
|
|
12
12
|
- **Dependency Management** – Developers can define dependencies between document models, ensuring proper relationships and data flows between interconnected components.
|
|
13
13
|
- **Automated Schema Evolution** – Versioning mechanisms allow document models within a package to evolve over time without breaking existing functionality.
|
|
14
14
|
|
|
15
|
-
### Example Use Cases
|
|
15
|
+
### Example Use Cases of Packages
|
|
16
16
|
|
|
17
17
|
- **Finance Package** – A set of document models handling invoices, payments, budgets, and financial reporting. link
|
|
18
18
|
- **Contributor Billing Package** – Defines document models for tracking work, invoicing, and facilitating payments (in both fiat and crypto) for contributors in decentralized organizations. link
|
package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/03-RunOnACloudServer.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Run
|
|
1
|
+
# Run on a EC2 instance (WIP)
|
|
2
2
|
|
|
3
3
|
## Tutorial Workflow
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ To help you navigate the steps involved, the diagram below illustrates the overa
|
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
Understanding this process is key because, within the Powerhouse ecosystem, users typically start by installing pre-built packages onto their Connect or Switchboard instances. These packages are often sourced from a central repository, similar to an app store.
|
|
11
|
+
Understanding this process is key because, within the Powerhouse ecosystem, users typically start by installing pre-built packages onto their Connect or Switchboard instances. These packages are often sourced from a central repository, similar to an app store. Now that we have [created and published our package](/academy/MasteryTrack/Launch/PublishYourProject) on the Node Package Manager (NPM) registry as our "app store", and now you'll learn how to deploy your own package to a cloud environment.
|
|
12
12
|
|
|
13
13
|
## 1. Setting up your cloud environment
|
|
14
14
|
### 1.1. Launching your server instance (AWS \- EC2 \- Ubuntu)
|
|
@@ -79,7 +79,7 @@ The script contains the following commands and will help you set up a series of
|
|
|
79
79
|
- **pnpm**: Fast, disk-space-efficient package manager
|
|
80
80
|
|
|
81
81
|
:::info
|
|
82
|
-
ph-cmd is a tool that helps you manage your Powerhouse projects. It's a command-line interface package that you can install globally on your server and personal machine. It gives you access to a series of powerful commands to create or manage your projects, start or stop your services, install your project on a server instance, etc. Visit this page to learn more about the [Powerhouse builder tooling](/
|
|
82
|
+
ph-cmd is a tool that helps you manage your Powerhouse projects. It's a command-line interface package that you can install globally on your server and personal machine. It gives you access to a series of powerful commands to create or manage your projects, start or stop your services, install your project on a server instance, etc. Visit this page to learn more about the [Powerhouse builder tooling](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
|
|
83
83
|
|
|
84
84
|
<details>
|
|
85
85
|
<summary> How to make use of different branches? </summary>
|
package/docs/academy/{02-AdvancedTutorial → 02-MasteryTrack}/05-Launch/03-SetupEnvironment.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Powerhouse Setup Guide
|
|
1
|
+
# Powerhouse Setup Guide (WIP)
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
Powerhouse is a powerful platform that helps you manage and deploy your applications efficiently. This guide will walk you through the process of setting up both the Powerhouse CLI and configuring your server machine to run Powerhouse services. Whether you're setting up a development environment or preparing for production deployment, this guide provides all the necessary steps and considerations.
|