@powerhousedao/academy 5.0.0-staging.9 → 5.0.1-staging.10
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 +1 -1
- package/CHANGELOG.md +415 -0
- package/README.md +3 -3
- package/babel.config.js +1 -1
- package/blog/BeyondCommunication-ABlueprintForDevelopment.md +25 -24
- package/blog/TheChallengeOfChange.md +21 -21
- package/docs/academy/01-GetStarted/00-ExploreDemoPackage.mdx +67 -30
- package/docs/academy/01-GetStarted/01-CreateNewPowerhouseProject.md +38 -21
- package/docs/academy/01-GetStarted/02-DefineToDoListDocumentModel.md +24 -19
- package/docs/academy/01-GetStarted/03-ImplementOperationReducers.md +44 -41
- package/docs/academy/01-GetStarted/04-BuildToDoListEditor.md +10 -10
- package/docs/academy/01-GetStarted/05-VetraStudio.md +164 -0
- package/docs/academy/01-GetStarted/06-ReactorMCP.md +58 -0
- package/docs/academy/01-GetStarted/home.mdx +185 -90
- package/docs/academy/01-GetStarted/images/Modules.png +0 -0
- package/docs/academy/01-GetStarted/images/VetraStudioDrive.png +0 -0
- package/docs/academy/01-GetStarted/styles.module.css +5 -5
- package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/01-Prerequisites.md +46 -18
- package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/02-StandardDocumentModelWorkflow.md +118 -68
- package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/03-BuilderTools.md +75 -33
- package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/_category_.json +6 -6
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/01-WhatIsADocumentModel.md +30 -21
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/02-SpecifyTheStateSchema.md +41 -37
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/03-SpecifyDocumentOperations.md +29 -25
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/04-UseTheDocumentModelGenerator.md +36 -37
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/05-ImplementDocumentReducers.md +128 -109
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/06-ImplementDocumentModelTests.md +95 -86
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/07-ExampleToDoListRepository.md +7 -9
- package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/_category_.json +6 -6
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/01-BuildingDocumentEditors.md +65 -47
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/02-ConfiguringDrives.md +77 -62
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/03-BuildingADriveExplorer.md +360 -349
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/00-DocumentToolbar.mdx +16 -10
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/01-OperationHistory.md +10 -7
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/02-RevisionHistoryTimeline.md +25 -17
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/_category_.json +6 -6
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-Authorization/01-RenownAuthenticationFlow.md +14 -7
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-Authorization/02-Authorization.md +0 -1
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-Authorization/_category_.json +5 -5
- package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/_category_.json +1 -1
- package/docs/academy/02-MasteryTrack/04-WorkWithData/01-GraphQLAtPowerhouse.md +45 -33
- package/docs/academy/02-MasteryTrack/04-WorkWithData/02-UsingTheAPI.mdx +61 -18
- package/docs/academy/02-MasteryTrack/04-WorkWithData/03-UsingSubgraphs.md +50 -54
- package/docs/academy/02-MasteryTrack/04-WorkWithData/04-analytics-processor.md +126 -110
- package/docs/academy/02-MasteryTrack/04-WorkWithData/05-RelationalDbProcessor.md +75 -45
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/GraphQL References/QueryingADocumentWithGraphQL.md +23 -21
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/best-practices.md +9 -9
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/graphql/index.md +11 -23
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/graphql/integration.md +25 -9
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/intro.md +10 -10
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/benchmarks.md +1 -1
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/index.md +16 -11
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/memory.md +6 -5
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/schema.md +2 -2
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/utilities.md +7 -5
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/use-cases/maker.md +32 -58
- package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/use-cases/processors.md +1 -1
- package/docs/academy/02-MasteryTrack/04-WorkWithData/07-drive-analytics.md +105 -71
- package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_01-SetupBuilderEnvironment.md +22 -0
- package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_02-CreateNewPowerhouseProject.md +9 -8
- package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_03-GenerateAnAnalyticsProcessor.md +28 -32
- package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_04-UpdateAnalyticsProcessor.md +25 -26
- package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_category_.json +1 -1
- package/docs/academy/02-MasteryTrack/04-WorkWithData/_category_.json +7 -7
- package/docs/academy/02-MasteryTrack/05-Launch/01-IntroductionToPackages.md +3 -4
- package/docs/academy/02-MasteryTrack/05-Launch/02-PublishYourProject.md +69 -45
- package/docs/academy/02-MasteryTrack/05-Launch/03-SetupEnvironment.md +70 -40
- package/docs/academy/02-MasteryTrack/05-Launch/04-ConfigureEnvironment.md +1 -0
- package/docs/academy/02-MasteryTrack/05-Launch/_category_.json +7 -7
- package/docs/academy/02-MasteryTrack/_category_.json +6 -6
- package/docs/academy/03-ExampleUsecases/Chatroom/02-CreateNewPowerhouseProject.md +5 -3
- package/docs/academy/03-ExampleUsecases/Chatroom/03-DefineChatroomDocumentModel.md +38 -37
- package/docs/academy/03-ExampleUsecases/Chatroom/04-ImplementOperationReducers.md +45 -41
- package/docs/academy/03-ExampleUsecases/Chatroom/05-ImplementChatroomEditor.md +14 -14
- package/docs/academy/03-ExampleUsecases/Chatroom/06-LaunchALocalReactor.md +6 -6
- package/docs/academy/03-ExampleUsecases/Chatroom/_category_.json +1 -1
- package/docs/academy/04-APIReferences/00-PowerhouseCLI.md +143 -48
- package/docs/academy/04-APIReferences/01-ReactHooks.md +177 -129
- package/docs/academy/04-APIReferences/04-RelationalDatabase.md +121 -113
- package/docs/academy/04-APIReferences/05-PHDocumentMigrationGuide.md +48 -41
- package/docs/academy/04-APIReferences/_category_.json +6 -6
- package/docs/academy/05-Architecture/00-PowerhouseArchitecture.md +1 -2
- package/docs/academy/05-Architecture/01-WorkingWithTheReactor.md +11 -8
- package/docs/academy/05-Architecture/05-DocumentModelTheory/_category_.json +1 -1
- package/docs/academy/05-Architecture/_category_.json +6 -6
- package/docs/academy/06-ComponentLibrary/00-DocumentEngineering.md +25 -23
- package/docs/academy/06-ComponentLibrary/02-CreateCustomScalars.md +105 -93
- package/docs/academy/06-ComponentLibrary/03-IntegrateIntoAReactComponent.md +1 -0
- package/docs/academy/06-ComponentLibrary/_category_.json +7 -7
- package/docs/academy/07-Cookbook.md +268 -35
- package/docs/academy/08-Glossary.md +7 -1
- package/docs/bookofpowerhouse/01-Overview.md +2 -2
- package/docs/bookofpowerhouse/02-GeneralFrameworkAndPhilosophy.md +1 -7
- package/docs/bookofpowerhouse/03-PowerhouseSoftwareArchitecture.md +10 -7
- package/docs/bookofpowerhouse/04-DevelopmentApproaches.md +10 -4
- package/docs/bookofpowerhouse/05-SNOsandANewModelForOSSandPublicGoods.md +23 -30
- package/docs/bookofpowerhouse/06-SNOsInActionAndPlatformEconomies.md +0 -7
- package/docusaurus.config.ts +64 -66
- package/package.json +9 -7
- package/scripts/generate-combined-cli-docs.ts +43 -13
- package/sidebars.ts +2 -0
- package/src/components/HomepageFeatures/index.tsx +171 -78
- package/src/components/HomepageFeatures/styles.module.css +1 -2
- package/src/css/custom.css +89 -89
- package/src/pages/_archive-homepage.tsx +17 -16
- package/src/theme/DocCardList/index.tsx +9 -8
- package/static.json +6 -6
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
# Configure a drive
|
|
2
2
|
|
|
3
|
-
A drive in Powerhouse is a container for documents and data. It's a place where you can organize and store your documents and share them with others. This guide walks you through configuring and managing drives in your Powerhouse environment.
|
|
3
|
+
A drive in Powerhouse is a container for documents and data. It's a place where you can organize and store your documents and share them with others. This guide walks you through configuring and managing drives in your Powerhouse environment.
|
|
4
4
|
|
|
5
5
|
:::info **Prerequisites**
|
|
6
6
|
|
|
7
7
|
Before configuring a drive, ensure you have:
|
|
8
|
+
|
|
8
9
|
- Powerhouse [CLI installed](/academy/MasteryTrack/BuilderEnvironment/BuilderTools)
|
|
9
10
|
- Access to a Powerhouse instance
|
|
10
11
|
- Appropriate permissions to create and manage drives
|
|
11
|
-
:::
|
|
12
|
+
:::
|
|
12
13
|
|
|
13
14
|
## Understanding drives
|
|
14
15
|
|
|
@@ -16,7 +17,7 @@ Before configuring a drive, ensure you have:
|
|
|
16
17
|
|
|
17
18
|
A local drive is a container for local documents and data, hosted on your local machine. Technically, a drive is itself a document that contains a list of the documents inside it. When you run Connect locally with `ph connect`, a local drive is automatically added. You can also create a new local drive by clicking **'Create New Drive'** in Connect.
|
|
18
19
|
|
|
19
|
-
### Remote drives vs. reactors
|
|
20
|
+
### Remote drives vs. reactors
|
|
20
21
|
|
|
21
22
|
Remote drives in Powerhouse allow you to connect to and work with data stored in external systems or cloud services. These drives act as bridges between Powerhouse contributors or other data sources, enabling seamless data synchronization. Drives can exist in three types of locations:
|
|
22
23
|
|
|
@@ -25,23 +26,22 @@ Remote drives in Powerhouse allow you to connect to and work with data stored in
|
|
|
25
26
|
- **Decentralized Storage**: Such as Ceramic or IPFS, enabling distributed and blockchain-based storage options.
|
|
26
27
|
|
|
27
28
|
:::tip **Explainer**
|
|
28
|
-
**Powerhouse Reactors** are the nodes in the network that store and synchronize documents and drives, resolve conflicts, and rerun operations to verify document event histories.
|
|
29
|
-
Reactors can be configured for local storage, centralized cloud storage, or a decentralized storage network.
|
|
29
|
+
**Powerhouse Reactors** are the nodes in the network that store and synchronize documents and drives, resolve conflicts, and rerun operations to verify document event histories.
|
|
30
|
+
Reactors can be configured for local storage, centralized cloud storage, or a decentralized storage network.
|
|
30
31
|
|
|
31
32
|
A reactor allows you to store multiple documents and host **drives** and Drive Explorers with different organizational purposes, users, access rights, and more.
|
|
32
33
|
:::
|
|
33
34
|
|
|
34
|
-
A drive uses a reactor and its underlying storage layer. A reactor is the low-level component that enables the synchronization of documents and drives.
|
|
35
|
+
A drive uses a reactor and its underlying storage layer. A reactor is the low-level component that enables the synchronization of documents and drives.
|
|
35
36
|
|
|
36
|
-
### Drive apps
|
|
37
|
+
### Drive apps
|
|
37
38
|
|
|
38
|
-
**Drive Explorers** (also known as Drive Apps) are specialized interfaces that enhance how users interact with documents within a drive. As mentioned, a drive is technically just another document containing a list of other documents. This means you can create a custom editor for your drive document.
|
|
39
|
+
**Drive Explorers** (also known as Drive Apps) are specialized interfaces that enhance how users interact with documents within a drive. As mentioned, a drive is technically just another document containing a list of other documents. This means you can create a custom editor for your drive document.
|
|
39
40
|
|
|
40
|
-
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.
|
|
41
|
+
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.
|
|
41
42
|
|
|
42
43
|
To learn more about building and customizing Drive Explorers, check out our [Building a Drive Explorer](/academy/MasteryTrack/BuildingUserExperiences/BuildingADriveExplorer) guide.
|
|
43
44
|
|
|
44
|
-
|
|
45
45
|
## Creating a new drive
|
|
46
46
|
|
|
47
47
|
<figure className="image-container">
|
|
@@ -50,7 +50,8 @@ To learn more about building and customizing Drive Explorers, check out our [Bui
|
|
|
50
50
|
</figure>
|
|
51
51
|
|
|
52
52
|
To create a new drive in Powerhouse, follow these steps:
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
1. Click the "**Create New Drive**" button in the Connect interface or the **+** icon in the Connect sidebar.
|
|
54
55
|
2. In the modal that appears, enter a name for your drive in the "**Drive Name**" field.
|
|
55
56
|
3. Select the desired Drive App (such as the Generic Drive Explorer, or any other Drive App you've installed).
|
|
56
57
|
4. Choose the location for your drive: **Local** (only available to you), **Cloud** (available to people in this drive), or **Public** (available to everyone).
|
|
@@ -62,13 +63,14 @@ To create a new drive in Powerhouse, follow these steps:
|
|
|
62
63
|
You can also add a new remote drive to your Connect environment programmatically using GraphQL mutations. This is especially useful for automation, scripting, or integrating with external systems.
|
|
63
64
|
|
|
64
65
|
:::info **Prerequisites**
|
|
65
|
-
|
|
66
|
+
|
|
67
|
+
- Access to the Switchboard or remote reactor (server node) of your Connect instance. In your local project, you can start your Reactor by running the following command in a different terminal from Connect Studio.
|
|
66
68
|
`bash
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
ph reactor
|
|
70
|
+
`
|
|
69
71
|
- The GraphQL endpoint of your instance. For example, for the staging environment, use: `https://staging.switchboard.phd/graphql/system` (this is a supergraph gateway. Read more about [subgraphs and supergraphs here](/academy/MasteryTrack/WorkWithData/UsingSubgraphs).
|
|
70
72
|
- Appropriate permissions to perform mutations.
|
|
71
|
-
:::
|
|
73
|
+
:::
|
|
72
74
|
|
|
73
75
|
<figure className="image-container">
|
|
74
76
|
<img src={require("./images/CreateNewDrive.png").default} alt="Create a new drive" />
|
|
@@ -76,58 +78,70 @@ You can also add a new remote drive to your Connect environment programmatically
|
|
|
76
78
|
</figure>
|
|
77
79
|
|
|
78
80
|
### 1. **Navigate to the GraphQL Playground or use a GraphQL client**
|
|
79
|
-
|
|
81
|
+
|
|
82
|
+
- Open [https://switchboard.phd/graphql/system](https://switchboard.phd/graphql/system) in your browser, or use a tool like [GraphQL Playground](https://www.apollographql.com/docs/apollo-server/testing/graphql-playground/).
|
|
80
83
|
|
|
81
84
|
### 2. **Prepare the Mutation**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
85
|
+
|
|
86
|
+
- Use the following mutation to create a new drive:
|
|
87
|
+
|
|
88
|
+
```graphql title="Create Drive Mutation"
|
|
89
|
+
mutation Mutation(
|
|
90
|
+
$name: String!
|
|
91
|
+
$icon: String
|
|
92
|
+
$addDriveId: String
|
|
93
|
+
$slug: String
|
|
94
|
+
) {
|
|
95
|
+
addDrive(name: $name, icon: $icon, id: $addDriveId, slug: $slug) {
|
|
96
|
+
icon
|
|
97
|
+
id
|
|
98
|
+
name
|
|
99
|
+
slug
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- These are the example variables, feel free to change these as you like and add a different name or logo for your drive:
|
|
105
|
+
|
|
106
|
+
```json title="Example Variables"
|
|
107
|
+
{
|
|
108
|
+
"name": "AcademyTest",
|
|
109
|
+
"icon": "https://static.thenounproject.com/png/3009860-200.png",
|
|
110
|
+
"addDriveId": null,
|
|
111
|
+
"slug": null
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
- You can also provide a custom `id` or `slug` if needed.
|
|
105
116
|
|
|
106
117
|
### 3. **Execute the Mutation**
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
|
|
119
|
+
- Run the mutation. On success, you will receive a response containing the new drive's `icon`, `id`, `name`, and `slug`:
|
|
120
|
+
|
|
121
|
+
```json title="Successful Response"
|
|
122
|
+
{
|
|
123
|
+
"data": {
|
|
124
|
+
"addDrive": {
|
|
125
|
+
"icon": "https://static.thenounproject.com/png/3009860-200.png",
|
|
126
|
+
"id": "6461580b-d317-4596-942d-f6b3d1bfc8fd",
|
|
127
|
+
"name": "AcademyTest",
|
|
128
|
+
"slug": "6461580b-d317-4596-942d-f6b3d1bfc8fd"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
121
133
|
|
|
122
134
|
### 4. **Construct the Drive URL**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
135
|
+
|
|
136
|
+
- Once you have the `id` or `slug`, you can construct the drive URL for Connect:
|
|
137
|
+
- Format: `domain/d/<driveId>` or `domain/d/<driveSlug>`
|
|
138
|
+
- Depending on whether you are using a hosted or a local environment, the domain in your URL will change.
|
|
139
|
+
- Example: `https://connect.phd/d/6461580b-d317-4596-942d-f6b3d1bfc8fd`
|
|
140
|
+
- Example: `https://localhost:4001/d/6461580b-d317-4596-942d-f6b3d1bfc8fd`
|
|
128
141
|
|
|
129
142
|
### 5. **Add the Drive in Connect**
|
|
130
|
-
|
|
143
|
+
|
|
144
|
+
- Use the constructed URL to add or access the drive in your Connect environment via the 'Add Drive' button.
|
|
131
145
|
|
|
132
146
|
<figure className="image-container">
|
|
133
147
|
<img src={require("./images/AddDrive.png").default} alt="Create a new drive" />
|
|
@@ -138,11 +152,12 @@ You can also add a new remote drive to your Connect environment programmatically
|
|
|
138
152
|
|
|
139
153
|
This approach allows you to automate drive creation and integration with other systems, making it easy to manage drives at scale.
|
|
140
154
|
|
|
141
|
-
## Up next
|
|
155
|
+
## Up next
|
|
142
156
|
|
|
143
|
-
You've now experienced the use of GraphQL to modify or read data captured in Powerhouse for the first time.
|
|
157
|
+
You've now experienced the use of GraphQL to modify or read data captured in Powerhouse for the first time.
|
|
144
158
|
You can now either continue with:
|
|
145
|
-
|
|
159
|
+
|
|
160
|
+
- User interfaces and [build a custom drive experiences](/academy/MasteryTrack/BuildingUserExperiences/BuildingADriveExplorer)
|
|
146
161
|
- Keep playing with data and the [Switchboard API](/academy/MasteryTrack/WorkWithData/UsingTheAPI)
|
|
147
162
|
|
|
148
163
|
Enjoy!
|