@powerhousedao/academy 2.5.0-dev.11 → 2.5.0-dev.12

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.5.0-dev.12 (2025-06-10)
2
+
3
+ This was a version bump only for @powerhousedao/academy to align it with other projects, there were no code changes.
4
+
1
5
  ## 2.5.0-dev.11 (2025-06-07)
2
6
 
3
7
  ### 🚀 Features
@@ -1,7 +1,8 @@
1
- # Powerhouse Setup Guide (WIP)
1
+ # Powerhouse Setup Guide
2
2
 
3
3
  ## Introduction
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.
4
+ Powerhouse is a powerful platform that helps you manage and deploy your applications efficiently.
5
+ 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.
5
6
 
6
7
  ## Prerequisites
7
8
  Before you begin, ensure you have a Linux-based system (Ubuntu or Debian recommended), sudo privileges, and a stable internet connection. These are essential for the installation and configuration process. The system should have at least 1GB of RAM and 10GB of free disk space for optimal performance. While these are minimum requirements, more resources will provide better performance, especially when running multiple services.
@@ -12,6 +13,7 @@ The `install` script provides a streamlined way to install the Powerhouse CLI to
12
13
 
13
14
 
14
15
  ### Installation Steps:
16
+
15
17
  1. Run the setup script:
16
18
  ```bash
17
19
  curl -fsSL https://apps.powerhouse.io/install | bash # for macOS, Linux, and WSL
@@ -32,10 +34,14 @@ If you are a builder that wants to make use of the dev releases use `ph use dev`
32
34
  - `ph use dev`: Development version - Use this for testing new features or development work
33
35
  - `ph use staging`: Staging version - Use this for pre-production testing
34
36
 
35
- 5. Follow the interactive prompts:
37
+ 5. Initialize your project with `ph init <project-name>`
38
+
39
+ 6. Follow the interactive prompts that are appearing after having installed your first package.
36
40
 
37
41
  ### Step 1: Package Installation
38
- During the package installation phase, you'll be prompted to enter package names that you want to install. For example, you might want to install `@powerhousedao/todo-demo-package` or other Powerhouse packages. This step is crucial for adding the specific functionality you need to your Powerhouse installation. You can press Enter to skip this step if you don't need to install any packages immediately, but you can always install packages later using the `ph install` command.
42
+ During the package installation phase, you'll be prompted to enter package names that you want to install. For example, you might want to `ph install @powerhousedao/todo-demo-package` or other Powerhouse packages. This step is crucial for adding the specific functionality you need to your Powerhouse installation.
43
+
44
+ You can also press Enter to skip this step if you don't need to install any packages immediately, but you can always install packages later using the `ph install` command.
39
45
 
40
46
  ### Step 2: Database Configuration
41
47
  The script offers two options for database configuration.
@@ -302,7 +308,7 @@ You can also use
302
308
  ```bash
303
309
  ph service start | stop | restart
304
310
  ```
305
- - to start | stop | restart switchboard and connect
311
+ to start | stop | restart switchboard and connect
306
312
 
307
313
  2. View Nginx configuration:
308
314
  ```bash
@@ -2,10 +2,12 @@
2
2
 
3
3
  ### Installing the Powerhouse CLI
4
4
  :::tip
5
- The **Powerhouse CLI tool** is the only essential tool to install on this page. Install it with the command below.
5
+ The **Powerhouse CLI tool** is the only essential tool to install on this page. Install it with the command below.
6
+
6
7
  You can find all of the commands on this page, similar to what would displayed when using ph --help or ph *command* --help.
7
- Use the table of content or the search function to find what you are looking for.
8
- The Powerhouse CLI (`ph-cmd`) is a command-line interface tool that provides essential commands for managing Powerhouse projects. You can get access to the Powerhouse ecosystem tools by installing them globally using:
8
+ Use the table of content or the search function to find what you are looking for.
9
+
10
+ The Powerhouse CLI (`ph-cmd`) is a command-line interface tool that provides essential commands for managing Powerhouse projects. You can get access to the Powerhouse ecosystem tools by installing them globally.
9
11
 
10
12
  ```bash
11
13
  pnpm install -g ph-cmd
@@ -208,7 +210,7 @@ Examples:
208
210
 
209
211
  ---
210
212
 
211
- *This document was automatically generated from the help text in the codebase.*\n\n### ph-cli Commands\n\n- [Connect Build](#connect-build)
213
+ - [Connect Build](#connect-build)
212
214
  - [Connect Preview](#connect-preview)
213
215
  - [Connect Studio](#connect-studio)
214
216
  - [Dev](#dev)
@@ -702,39 +704,4 @@ Notes:
702
704
 
703
705
  ---
704
706
 
705
- *This document was automatically generated from the help text in the codebase.*\n<!-- AUTO-GENERATED-CLI-COMMANDS-END -->
706
-
707
- <details>
708
- <summary> How to make use of different branches? </summary>
709
-
710
- When installing or using the Powerhouse CLI commands you are able to make use of the dev & staging branches. These branches contain more experimental features then the latest stable release the PH CLI uses by default. They can be used to get access to a bugfix or features under development.
711
-
712
- | Command | Description |
713
- |---------|-------------|
714
- | **pnpm install -g ph-cmd** | Install latest stable version |
715
- | **pnpm install -g ph-cmd@dev** | Install development version |
716
- | **pnpm install -g ph-cmd@staging** | Install staging version |
717
- | **ph init** | Use latest stable version of the boilerplate |
718
- | **ph init --dev** | Use development version of the boilerplate |
719
- | **ph init --staging** | Use staging version of the boilerplate |
720
- | **ph use** | Switch all dependencies to latest production versions |
721
- | **ph use dev** | Switch all dependencies to development versions |
722
- | **ph use prod** | Switch all dependencies to production versions |
723
-
724
- Please be aware that these versions can contain bugs and experimental features that aren't fully tested.
725
- </details>
726
-
727
-
728
- the ph connect command now uses three subcommands:
729
-
730
- studio (default) — runs connect studio. since this is the default argument, running ph connect still has the same behavior as before,
731
-
732
- build — bundles the project's local and external model/editor code and injects the js/css into the already-built connect bundle for deployment,
733
-
734
- preview — runs the vite preview server with the output of build for testing purposes,
735
-
736
- running ph connect --help now lists the sub-commands. Running ph connect studio --help now shows the help for the studio command, likewise for the other new commands.
737
-
738
- This approach avoids redundant build/compilation which is great for minimizing server resource use. The only compilation that runs is the esbuild of the project code (does not need tsc as that is handled separately) and then tailwind for the local project styles. The whole thing takes less than a second, albeit on my macbook.
739
-
740
- This should just work with the current boilerplate since these are just new arguments to the existing ph-cli connect command.
707
+ *This document was automatically generated from the help text in the codebase.* <!-- AUTO-GENERATED-CLI-COMMANDS-END -->
@@ -1,10 +1,60 @@
1
- ---
2
- sidebar_label: 'PHID Field'
3
- sidebar_position: 1
4
- ---
5
-
6
1
  import { Tabs, TabItem } from '@theme/Tabs';
7
2
 
3
+ # E.g. Scalar Component
4
+
5
+ Scalars are here to help you define custom fields in your document model schema and speed up the development process.
6
+ There are two applications of scalar components in the document model workflow:
7
+
8
+ 1. At the **schema definition** level where you build your schema and write your GraphQL state schema.
9
+ 2. At the **frontend / react** level where you import it and place it in your UI to represent the scalar field
10
+
11
+ ## Scalar Definition in the Document Model Schema
12
+
13
+ As you might know, the document model schema defines the structure of the document and serves as the backbone of the document model. The GraphQL state schema defines how data is captured with the help of types & scalars. When you define a scalar in the document model schema, you are essentially defining a new field that can be used in the document model to capture data.
14
+
15
+ In the Document Model Editor, you can find all the custom scalar types available in our documentation under the 'Scalars' section.
16
+
17
+ Insert image of the feature.
18
+
19
+ ````
20
+ scalar PHID <-- imported from the design system library? not sure
21
+ type MyType {
22
+ myScalar: PHID
23
+ }
24
+ ````
25
+
26
+ ## React Component Implementation in the Frontend
27
+
28
+ All of our reusable components are available in the Document-Engineering design system library or package.
29
+ This package comes as a dependency in your project when creating a new document model project.
30
+ ````
31
+ import PHIDField from 'document-engineering'
32
+ const reactComponent = () => {
33
+
34
+ return (
35
+ <div>
36
+ <PHIDField
37
+ fetchOptionsCallback={function Js(){}}
38
+ fetchSelectedOptionCallback={function Js(){}}
39
+ label="PHID field"
40
+ name="phid-field"
41
+ placeholder="phd:"
42
+ />
43
+
44
+ </div>
45
+
46
+ )
47
+
48
+ }
49
+ ````
50
+
51
+ ## Scalars & Reusable Components
52
+
53
+ To make your life easier, Powerhouse has defined all useful scalars with a set of reusable code and UI components.
54
+ The reusable components are essentially a set of front-end components based on GraphQL scalars. Powerhouse also has a set of custom scalars that are not part of the GraphQL standard but are specific to the web3 ecosystem.
55
+
56
+ Read the next chapter to get familiar with our reusable components.
57
+
8
58
  # PHID Field Example
9
59
 
10
60
  ### **Scalar Definition**
@@ -1,6 +1,8 @@
1
1
  import { Tabs, TabItem } from '@theme/Tabs';
2
2
 
3
- # Sidebar
3
+ # E.g. Complex Component
4
+
5
+ ## Sidebar
4
6
 
5
7
  ### **Scalar Definition**
6
8
 
@@ -1,11 +1,8 @@
1
- ---
2
- sidebar_label: 'PHID Field'
3
- sidebar_position: 1
4
- ---
5
-
6
1
  import { Tabs, TabItem } from '@theme/Tabs';
7
2
 
8
- # PHID Field Example
3
+ # E.g. Layout Component
4
+
5
+ ## PHID Field Example
9
6
 
10
7
  ### **Scalar Definition**
11
8
 
@@ -1,11 +1,8 @@
1
- ---
2
- sidebar_label: 'PHID Field'
3
- sidebar_position: 1
4
- ---
5
-
6
1
  import { Tabs, TabItem } from '@theme/Tabs';
7
2
 
8
- # PHID Field Example
3
+ # E.g. Fragments Component
4
+
5
+ ## PHID Field Example
9
6
 
10
7
  ### **Scalar Definition**
11
8
 
@@ -30,7 +30,9 @@
30
30
  - **Actions (Document Actions)** – Typed objects representing an intent to change a document's state, dispatched to reducers, containing an operation type and input data.
31
31
  - **API Integration (for Document Models)** – The capability of Document Models to connect with Switchboard API or external APIs, facilitating data exchange between Powerhouse applications and other systems.
32
32
  - **Boilerplate (Powerhouse Project)** – The `ph init` command's initial project structure, providing a standard starting point for new Powerhouse packages.
33
+ - **Connect Build** – The output of the `ph connect build` command, which packages a Connect project into a distributable format. This build includes all necessary local/external packages, assets, and styles, and can be previewed locally with `ph connect preview` or deployed.
33
34
  - **Data Analysis (with Document Models)** – Leveraging the structured data within Document Models, often via read models, to extract insights, generate reports, and perform analytics on operational and historical data.
35
+ - **Development Environment (Powerhouse)** – A local setup for developing Powerhouse applications, typically initiated with the `ph dev` command. It runs essential backend services like the Powerhouse Switchboard to enable real-time document model processing, code generation, and live updates, separate from the front-end Connect Studio.
34
36
  - **Dispatch (in Document Models)** – The act of sending an action (representing an operation) to a document model's reducer to trigger a state update.
35
37
  - **Document Model Editors** – An interface or UI to a document model that allows users to create and modify the data captured by the document models.
36
38
  - **Document Model Specification** – The formal definition of a document model (state, operations), created in Connect Studio (using GraphQL SDL) and exported (e.g., `.phdm.zip`) for code generation.
@@ -39,6 +41,7 @@
39
41
  - **Document Type** – A unique string identifier (e.g., `powerhouse/todolist`) for a Document Model, used by host apps to select the correct editor/logic.
40
42
  - **Drive** – A logical container in Powerhouse for storing, organizing, and managing collections of documents.
41
43
  - **Drive App (Custom Drive Explorer)** – A UI application, often custom, providing tailored views and interactions with documents in a Drive.
44
+ - **Environments (Powerhouse Environments)** – Pre-defined configurations for a project's Powerhouse dependencies, such as `dev` (development), `prod` (production/latest), and `local`. The Powerhouse CLI (`ph use` command) allows developers to easily switch between these environments to use different versions of packages (e.g., bleeding-edge, stable, or from a local monorepo).
42
45
  - **Event History (Append-Only Log)** – An immutable, append-only log where every operation applied to a Powerhouse document is stored as an event. It provides a transparent audit trail and enables features like time travel debugging and state reconstruction.
43
46
  - **GraphQL Scalars** – Data types used in Powerhouse document modeling (e.g., `String`, `Int`, `Currency`, `OID` for unique object IDs).
44
47
  - **GraphQL Schema Definition Language (SDL) (for Document Models)** – Language used in Connect Studio to define a Document Model's data structure (state) and operations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/academy",
3
- "version": "2.5.0-dev.11",
3
+ "version": "2.5.0-dev.12",
4
4
  "homepage": "https://powerhouse.academy",
5
5
  "repository": {
6
6
  "type": "git",
package/sidebars.ts CHANGED
@@ -68,27 +68,7 @@ const sidebars = {
68
68
  link: {
69
69
  type: 'generated-index',
70
70
  },
71
- items: [
72
- 'academy/MasteryTrack/BuildingUserExperiences/BuildingDocumentEditors',
73
- 'academy/MasteryTrack/BuildingUserExperiences/ConfiguringDrives',
74
- 'academy/MasteryTrack/BuildingUserExperiences/BuildingADriveExplorer',
75
- ]
76
- },
77
- {
78
- type: 'category',
79
- label: 'Document Tools',
80
- link: {
81
- type: 'generated-index',
82
- },
83
- items: [{ type: 'autogenerated', dirName: 'academy/02-MasteryTrack/03-BuildingUserExperiences/07-DocumentTools' }]
84
- },
85
- {
86
- type: 'category',
87
- label: 'Authorization',
88
- link: {
89
- type: 'generated-index',
90
- },
91
- items: [{ type: 'autogenerated', dirName: 'academy/02-MasteryTrack/03-BuildingUserExperiences/08-Authorization' }]
71
+ items: [{ type: 'autogenerated', dirName: 'academy/02-MasteryTrack/03-BuildingUserExperiences' }]
92
72
  },
93
73
  {
94
74
  type: 'category',
@@ -140,30 +120,10 @@ const sidebars = {
140
120
  </a>
141
121
  `,
142
122
  },
143
- {
144
- type: 'doc',
145
- id: 'academy/ComponentLibrary/BuildingWithScalars',
146
- },
147
- {
148
- type: 'category',
149
- label: 'Scalar Components',
150
- items: [{type: 'autogenerated', dirName: 'academy/06-ComponentLibrary/03-Scalar-Components'}],
151
- },
152
- {
153
- type: 'category',
154
- label: 'Complex Components',
155
- items: [{type: 'autogenerated', dirName: 'academy/06-ComponentLibrary/04-Complex-Components'}],
156
- },
157
- {
158
- type: 'category',
159
- label: 'Layout Components',
160
- items: [{type: 'autogenerated', dirName: 'academy/06-ComponentLibrary/05-Layout-Components'}],
161
- },
162
- {
163
- type: 'category',
164
- label: 'Fragments',
165
- items: [{type: 'autogenerated', dirName: 'academy/06-ComponentLibrary/06-Fragments'}],
166
- },
123
+ 'academy/ComponentLibrary/ScalarComponent',
124
+ 'academy/ComponentLibrary/ComplexComponent',
125
+ 'academy/ComponentLibrary/LayoutComponent',
126
+ 'academy/ComponentLibrary/FragmentsComponent',
167
127
  ],
168
128
  },
169
129
 
@@ -1,54 +0,0 @@
1
- # Build with Scalars
2
-
3
- Scalars are here to help you define custom fields in your document model schema and speed up the development process.
4
- There are two applications of scalar components in the document model workflow:
5
-
6
- 1. At the **schema definition** level where you build your schema and write your GraphQL state schema.
7
- 2. At the **frontend / react** level where you import it and place it in your UI to represent the scalar field
8
-
9
- ## Scalar Definition in the Document Model Schema
10
-
11
- As you might know, the document model schema defines the structure of the document and serves as the backbone of the document model. The GraphQL state schema defines how data is captured with the help of types & scalars. When you define a scalar in the document model schema, you are essentially defining a new field that can be used in the document model to capture data.
12
-
13
- In the Document Model Editor, you can find all the custom scalar types available in our documentation under the 'Scalars' section.
14
-
15
- Insert image of the feature.
16
-
17
- ````
18
- scalar PHID <-- imported from the design system library? not sure
19
- type MyType {
20
- myScalar: PHID
21
- }
22
- ````
23
-
24
- ## React Component Implementation in the Frontend
25
-
26
- All of our reusable components are available in the Document-Engineering design system library or package.
27
- This package comes as a dependency in your project when creating a new document model project.
28
- ````
29
- import PHIDField from 'document-engineering'
30
- const reactComponent = () => {
31
-
32
- return (
33
- <div>
34
- <PHIDField
35
- fetchOptionsCallback={function Js(){}}
36
- fetchSelectedOptionCallback={function Js(){}}
37
- label="PHID field"
38
- name="phid-field"
39
- placeholder="phd:"
40
- />
41
-
42
- </div>
43
-
44
- )
45
-
46
- }
47
- ````
48
-
49
- ## Scalars & Reusable Components
50
-
51
- To make your life easier, Powerhouse has defined all useful scalars with a set of reusable code and UI components.
52
- The reusable components are essentially a set of front-end components based on GraphQL scalars. Powerhouse also has a set of custom scalars that are not part of the GraphQL standard but are specific to the web3 ecosystem.
53
-
54
- Read the next chapter to get familiar with our reusable components.