@powerhousedao/academy 5.0.3 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/docs/academy/00-EthereumArgentinaHackathon.md +207 -0
  3. package/docs/academy/01-GetStarted/00-ExploreDemoPackage.mdx +1 -1
  4. package/docs/academy/01-GetStarted/05-VetraStudio.md +76 -27
  5. package/docs/academy/01-GetStarted/home.mdx +4 -4
  6. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/01-Prerequisites.md +24 -8
  7. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/02-StandardDocumentModelWorkflow.md +25 -7
  8. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/03-BuilderTools.md +17 -3
  9. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/01-WhatIsADocumentModel.md +5 -2
  10. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/06-ImplementDocumentModelTests.md +7 -1
  11. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/07-ExampleToDoListRepository.md +5 -5
  12. package/docs/academy/03-ExampleUsecases/Chatroom/02-CreateNewPowerhouseProject.md +4 -1
  13. package/docs/academy/03-ExampleUsecases/Chatroom/03-DefineChatroomDocumentModel.md +21 -9
  14. package/docs/academy/03-ExampleUsecases/Chatroom/04-ImplementOperationReducers.md +132 -129
  15. package/docs/academy/03-ExampleUsecases/Chatroom/05-ImplementChatroomEditor.md +50 -44
  16. package/docs/academy/03-ExampleUsecases/Chatroom/image-4.png +0 -0
  17. package/docs/academy/03-ExampleUsecases/Chatroom/image-5.png +0 -0
  18. package/docs/academy/03-ExampleUsecases/Chatroom/images/ChatRoomConnectApp.gif +0 -0
  19. package/docs/academy/03-ExampleUsecases/Chatroom/images/ChatRoomTest.gif +0 -0
  20. package/docs/academy/04-APIReferences/00-PowerhouseCLI.md +39 -5
  21. package/docs/academy/05-Architecture/01-WorkingWithTheReactor.md +0 -2
  22. package/package.json +1 -1
  23. package/sidebars.ts +8 -0
  24. package/src/css/custom.css +20 -0
  25. package/static/img/ethereum-logo.jpeg +0 -0
  26. package/docs/academy/09-AIResources +0 -131
  27. package/docs/academy/TUTORIAL_VERIFICATION_ARCHITECTURE +0 -325
  28. /package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/{02-RevisionHistoryTimeline.md → 02-RevisionHistoryTimeline} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 5.0.4 (2025-11-18)
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
  ## 5.0.3 (2025-11-13)
2
6
 
3
7
  This was a version bump only for @powerhousedao/academy to align it with other projects, there were no code changes.
@@ -0,0 +1,207 @@
1
+ ---
2
+ id: EthereumArgentinaHackathon
3
+ title: Ethereum Argentina Hackathon
4
+ ---
5
+
6
+ # Ethereum Argentina Hackathon
7
+
8
+ **November 19-20, 2024**
9
+
10
+ Welcome to the Vetra hacker page for the Ethereum Argentina Hackathon! We're excited to support developers building with Powerhouse during this event.
11
+
12
+ ## Overview
13
+
14
+ Join us for two days of intensive development support as you build decentralized applications using the Vetra framework. Our team will be available online and at the mentor's table to help you navigate the builder platform, answer questions, and guide you through best practices.
15
+
16
+ ## 📅 Event Details
17
+
18
+ - **Dates**: November 19-20, 2024
19
+ - **Format**: Online & IRL Developer Support
20
+ - **Time Zone**: Argentina Time (ART)
21
+ - **Support Hours at Mentor Table @ la Rural**: Please get in touch [on Discord to schedule](https://discord.gg/pwQJwgaQKd)
22
+ - **Hackathon informations**: [Taiki Hackathon](https://taikai.network/ethargentina/hackathons/tierra-de-buidlers-2025/overview)
23
+
24
+ ## 🚀 Getting Started
25
+
26
+ <details>
27
+ <summary> Vetra Introduction & Follow Along Demo </summary>
28
+
29
+ Please Rewatch our Hackathon introduction & follow along tutorial.
30
+
31
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/R5MAaGaopJg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
32
+
33
+ Find a complete overview of how to use the Vetra Studio for you project [here](./01-GetStarted/05-VetraStudio.md)
34
+
35
+ **Quick Start Summary**
36
+
37
+ - Step 1: Install the powerhouse-CLI: `pnpm install -g ph-cmd`
38
+ - Step 2: Initialize a project & directory `ph init my-project-name`
39
+ - Step 3: CD into you project directory
40
+ - Step 4: Launch Vetra Studio with the `ph vetra`command
41
+ - Step 5: Add the necessary document models & editors for your intended solution in Vetra Studio
42
+ - Step 6: If you're well versed in schema creation or graphql. Just talk with an agent about your imagined solution.
43
+ - Step 7: Start your preferred agent to help you with the initial scaffolding of your schema, operations and reducers.
44
+ - Step 8: Test your implementation in the "Vetra Preview Drive" with the `ph vetra --watch`command.
45
+ - Step 9: Run pnpm build and push your project to a remote repository. Follow the package publishing [Tutorial](./02-MasteryTrack/05-Launch/02-PublishYourProject.md)
46
+
47
+ **Basic tips**
48
+ - 1️⃣ Write a detailed description of your intented functionality inside the document model specification manifest
49
+ - 2️⃣ Ask your agent to ask for clarifying questions before starting any ideation process.
50
+ - 3️⃣ For each document model you'll want to create an accompanying editor in vetra studio.
51
+ - 4️⃣ An 'App' specifcation is an drive that can act as an app because of the specific interface you create for it.
52
+
53
+ ### Before the Hackathon
54
+
55
+ 1. **Set Up Your Environment**
56
+ - Install the Powerhouse CLI
57
+ - Set up your development environment
58
+ - Review the [Get Started Guide](./01-GetStarted/home.mdx)
59
+
60
+ 2. **Explore the Platform**
61
+ - Check out the [Demo Package](./01-GetStarted/00-ExploreDemoPackage.mdx)
62
+ - Familiarize yourself with [Document Models](./02-MasteryTrack/02-DocumentModelCreation/01-WhatIsADocumentModel.md)
63
+
64
+ 3. **Join Our Community**
65
+ - Discord: [Join our server](#)
66
+
67
+
68
+ </details>
69
+
70
+ :::tip Use your preferred AI agent
71
+ Vetra studio is compatible with Cursor, Claude and Gemini. Find the dedicated markdown files to guide your agent with the correct instruction in your directory. Your agent should also have access to the MCP's available.
72
+ :::
73
+
74
+
75
+ ## **Hackathon Project Ideas**
76
+
77
+ Powerhouse is perfect for building:
78
+
79
+ - **Real World Use-cases**: Every document can act as a mini ledger/blockchain.
80
+ - **Decentralized Applications**: Create apps with built-in version control and collaboration.
81
+ - **Document-Based Systems**: Build structured data applications.
82
+ - **Collaborative Tools**: Enable real-time multi-user editing.
83
+ - **Data Management Platforms**: Create systems with queryable, structured data.
84
+
85
+ ### Coordination & DAO Design
86
+
87
+ - 🧩 **What if** DAOs weren't chaotic? What documents would you need to make them coordinate like space X and ship like stripe?
88
+ - 🎯 **What if** making decisions as a group felt like playing a co-op strategy game. With a clearly aligned vision, instant dashboards and a way to capture hard won knowledge in expertise into custom software for the Dao?
89
+
90
+ :::tip IDEA
91
+ The ultimate DAO Template toolkit where vision & mission documents influence guidelines & onboarding for contributors.
92
+ :::
93
+
94
+ ---
95
+
96
+ ### GovTech & Public Infrastructure
97
+
98
+ - 🗳 **What if** local governments had to reach consensus with residents before making a decision? How would that look like?
99
+ - 🚧 **What if** you could submit pothole fixes or transit complaints into a civic DAO, and track the response like GitHub issues?
100
+ - 🧾 **What if** municipal budgets were editable public documents with community feedback loops?
101
+
102
+ :::tip IDEA
103
+ An Open Source Enterprise Resource Planning-suite for municipalities & governments
104
+ :::
105
+
106
+ ---
107
+
108
+ ### Education & Group Work
109
+
110
+ - 📝 **What if** your group project auto-divided work, tracked contributions, and paid out in real-time?
111
+ - 👾 **What if** "homework" was a multiplayer quest, and grades came from the DAO?
112
+ - 🏫 **What if** we DAO-ified a classroom and let the students vote on rules, roles, and rewards?
113
+
114
+ :::tip IDEA
115
+ The remote classroom SAAS back-end that fosters connection, gives purpose to bullies and empowers younger generation to dream big again.
116
+ :::
117
+
118
+ ---
119
+
120
+ ### 💸 Grants, Crypto, and Incentive Design
121
+
122
+ - 💰 **What if** grant tooling felt like bounty hunting across a galaxy of projects?
123
+ - 📊 **What if** every grant had a live budget dashboard, contributor feed, and impact score?
124
+ - 🎮 **What if** you could stake on coordination itself, betting that people will work together well?
125
+
126
+ :::tip IDEA
127
+ The future of grant platforms that dares to imagine grants in new ways. With follow up, tracking and impact visualisations of teams, time, risk & resources invested.
128
+ :::
129
+
130
+ ---
131
+
132
+ ### 💸 Lawmaking, Legislation & Legal
133
+
134
+ - 🧑‍⚖️ **What if** any government or DAO could fork a legal template, customize it, and track changes in a public, composable way?
135
+ - 🎨 **What if** legislation could be transparently co-created by citizens, NGOs, and governments all with aligned incentives?
136
+ - 💻 **What if** legislation, contracts & templates could exist on an open-source market place like software?
137
+ - 🤖 **What if** a network agent could create a legal vehicle by simply inputing set of requirements and risk preferences (in non legalese)?
138
+ - 🤝 **What if** 2 agents in a network could negotiate terms of an agreement according to predefined functions and risk parameters, without lawyers?
139
+
140
+ :::tip IDEA
141
+ Build a Decentralized Lawmaking Engine using Reactive Document Models
142
+ :::
143
+
144
+
145
+ ## 🛠️ Resources
146
+
147
+ ### Documentation
148
+
149
+ - [Quick Start Guide](./01-GetStarted/home.mdx)
150
+ - [Create a New Project](./01-GetStarted/01-CreateNewPowerhouseProject.md)
151
+ - [Define Document Models](./01-GetStarted/02-DefineToDoListDocumentModel.md)
152
+ - [Build Editors](./01-GetStarted/04-BuildToDoListEditor.md)
153
+ - [API References](./04-APIReferences/00-PowerhouseCLI.md)
154
+
155
+ ### Tutorials
156
+
157
+ - [To-Do List Example](./01-GetStarted/02-DefineToDoListDocumentModel.md)
158
+ - [Chatroom Use Case](./03-ExampleUsecases/Chatroom/02-CreateNewPowerhouseProject.md)
159
+
160
+ ## 🏆 Judging Criteria
161
+
162
+ Projects will be evaluated based on:
163
+
164
+ - **Usefulness & Impact**: How well does it solve a certain job or problem?
165
+ - **Composability/Structure**: How are the different document models and / or drive apps collaborating?
166
+ - **Clarity of the developer or user experience**: Did you unlock the secret sauce of UX & reactive documents?
167
+ - **Alignment with Vetra/Powerhouse principles**: Local-first, auditable, usefull for common good.
168
+
169
+ ## 📋 Submission Guidelines
170
+
171
+ ### What to Submit
172
+
173
+ - GitHub repository with your code
174
+ - (Video) presentation (2-3 minutes)
175
+ - README with:
176
+ - Project description
177
+ - Setup instructions
178
+ - Screenshots/demos
179
+ - Technologies used
180
+
181
+ The Powerhouse team will add you as a builder on the Vetra platform and host your application and drive.
182
+
183
+
184
+ ## Tips for Success
185
+
186
+ ### Development Tips
187
+
188
+ 1. **Start Simple**: Begin with a basic implementation and iterate
189
+ 2. **Use Templates**: Leverage existing examples and templates
190
+ 3. **Ask Questions**: Don't hesitate to reach out for help
191
+ 4. **Test Early**: Test your application frequently during development
192
+ 5. **Document**: Keep notes on your decisions and implementations
193
+
194
+ ### Presentation Tips
195
+
196
+ 1. **Show, Don't Tell**: Live demos are more impactful than slides
197
+ 2. **Tell a Story**: Explain the problem you're solving
198
+ 3. **Highlight Innovation**: Show what makes your solution unique
199
+ 4. **Be Concise**: Respect the time limits for presentations
200
+ 5. **Prepare Backup**: Have screenshots/video in case of technical issues
201
+
202
+ ---
203
+
204
+ **Good luck, and happy hacking! 🚀**
205
+
206
+ *Last updated: November 17, 2025*
207
+
@@ -17,7 +17,7 @@ pnpm install -g ph-cmd
17
17
  Verify the installation:
18
18
 
19
19
  ```bash
20
- ph-cmd --version
20
+ ph --version
21
21
  ```
22
22
 
23
23
  ## Step 2: Install the to-do list demo package
@@ -1,31 +1,26 @@
1
1
  # Tool: Vetra Studio
2
2
 
3
- This chapter introduces you to one of the most powerfull features of the Powerhouse development framework: Specification Driven AI-control. In the **'Get Started'** chapter we've been making use of strict schema definition principles to communicate the intended use case of our reactive documents.
4
-
5
3
  :::tip Important
6
- The **schema definition language**, is a not only a shared language that bridges the gap between developer, designer and analyst but also the gap between **builder and AI-agent**.
7
- :::
8
4
 
9
5
  ## Vision: Specification Driven AI
10
6
 
11
- At Powerhouse we are embracing the progress of AI assisted coding while unlocking the next level of AI control through **specification driven AI control**.
7
+ In the **'Get Started'** chapter we've been making use of strict schema definition principles to communicate the intended use case of our reactive documents.
8
+ The **schema definition language**, is a not only a shared language that bridges the gap between developer, designer and analyst but also the gap between builder and AI-agent through **specification driven AI control**.
12
9
 
13
10
  - Communicate your solution and intent through a structured specification framework designed for AI collaboration.
14
11
  - Specifications enable precise, iterative edits, since all our specification documents are machine-readable and executable.
15
- - Specifications offer the ability to update exact parameters and properties as your specs evolve in lock-step with your agent.
16
- - Specifications turn fragile sandcastles into solid, editable, and maintainable functionality with predictable results.
17
-
18
- This approach allows for the creation of editable specifications, enabling business analysts to modify details and instruct the AI to generate code based on updated specifications.
19
- It results in composable, maintainable, and scalable functionality.
12
+ :::
20
13
 
21
14
  ## Introducing Vetra Studio
22
15
 
23
- **Vetra Studio** serves as a centralized hub for developers to access and manage specifications.
24
- It allows developers to open packages (Git repositories with metadata) from a Vetra package library, providing access to a remote Vetra drive where all specifications are stored.
16
+ **Vetra Studio Drive**: Serves as a hub for developers to access, manage & share specification through a remote Vetra drive.
17
+ **Vetra Package Library**: Store, publish and fork git repositories of packages in the Vetra Package Library.
18
+ Visit the [Vetra Package Library here](https://vetra.io/packages)
25
19
 
26
- This setup ensures that all necessary documentation and project requirements are in one accessible location, streamlining communication and agreement on requirements and operations. Additionally, **Vetra Studio** functions as the orchestration hub where you as a builder assemble all the necessary specifications for your intended use-case, software solution or package. For each of the different **modules** that together form a package a specification document can be created in **Vetra Studio**.
20
+ **Vetra Studio Drive** functions as the orchestration hub where you as a builder assemble all the necessary specifications for your intended use-case, software solution or package. For each of the different **modules** that together form a package a **specification document** can be created in Vetra Studio Drive.
27
21
 
28
22
  As Vetra Studio matures each of these specification documents will offer an interface by which you as a builder get more control over the modules that make up your package.
23
+ For now they offer you a template for code generation.
29
24
 
30
25
  <figure className="image-container">
31
26
  <img
@@ -37,14 +32,14 @@ As Vetra Studio matures each of these specification documents will offer an inte
37
32
 
38
33
  ### Module Categories
39
34
 
40
- #### 1. Document Models
35
+ ### 1. Document Models
41
36
  - **Document model specification**: Defines the structure and operations of a document model using GraphQL SDL, ensuring consistent data management and processing.
42
37
 
43
- #### 2. User Experiences
38
+ ### 2. User Experiences
44
39
  - **Editor specification**: Outlines the interface and functionalities of a document model editor, allowing users to interact with and modify document data.
45
40
  - **Drive-app specification**: Specifies the UI and interactions for managing documents within a Drive, providing tailored views and functionalities.
46
41
 
47
- #### 3. Data integrations
42
+ ### 3. Data integrations
48
43
  - **Subgraph specification**: Details the connections and relationships within a subgraph, facilitating efficient data querying and manipulation.
49
44
  - **Codegen Processor Specification**: Describes the process for automatically generating code from document model specifications, ensuring alignment with intended architecture.
50
45
  - **RelationalDb Processor Specification**: Defines how relational databases are structured and queried, supporting efficient data management and retrieval.
@@ -57,6 +52,31 @@ As Vetra Studio matures each of these specification documents will offer an inte
57
52
  <figcaption>The Vetra Studio Drive, a builder app that collects all of the specification of a package.</figcaption>
58
53
  </figure>
59
54
 
55
+ ### Configure a Vetra drive in your project
56
+
57
+ You can connect to a remote vetra drive instead of using the local one auto-generated when you run `ph vetra`
58
+ If you run Vetra without the `--remote-drive` option: Vetra will create a Vetra drive for you that is local and lives in your local environment / local browser storage.
59
+ If you provide the remote drive with `--remote-drive` argument: Vetra will use this drive instead of creating a local one. the remote drive can be hosted whatever you want.
60
+ The powerhouse config includes a Vetra URL for consistent project configuration across different environments.
61
+
62
+ ```vetra: {
63
+ driveId: string;
64
+ driveUrl: string;
65
+ };
66
+ ```
67
+
68
+ Imagine you are a builder and want to work on, or continue with a set of specifications from your team mates.
69
+ You could then add the specific remote Vetra drive to your powerhouse configuration in the `powerhouse.config.json`file to get going.
70
+
71
+ ```
72
+ "vetra": {
73
+ "driveId": "bai-specifications",
74
+ "driveUrl": "https://switchboard.staging.vetra.io/d/bai-specifications"
75
+ }
76
+ ```
77
+
78
+ An example of a builder team building on the Powerhouse Vetra Ecosystem and it's complementary Vetra Studio Drive specifications for the different packages be found [here](https://vetra.io/builders/bai)
79
+
60
80
  ## Vetra Studio Workflow
61
81
 
62
82
  ### 1. Launch Vetra Studio
@@ -72,6 +92,21 @@ In interactive mode:
72
92
  - Changes require explicit confirmation before being processed
73
93
  - Provides better control and visibility over document changes
74
94
 
95
+ #### Watch Mode
96
+
97
+ ```bash
98
+ ph vetra --interactive --watch
99
+ ```
100
+ In watch mode:
101
+
102
+ - Adding `--watch` to your command enables dynamic loading for document-models and editors in Vetra studio and switchboard.
103
+ - When enabled, the system will watch for changes in these directories and reload them dynamically.
104
+
105
+ :::warning Be Aware
106
+ When you are building your document model the code can break the Vetra Studio environment.
107
+ A full overview of the Vetra Studio commands can be found in the [Powerhouse CLI](/academy/APIReferences/PowerhouseCLI#vetra)
108
+ :::
109
+
75
110
  #### Standard Mode
76
111
  ```bash
77
112
  ph vetra
@@ -86,28 +121,42 @@ In standard mode:
86
121
  Vetra Studio integrates deeply with Claude through MCP (Model Control Protocol). This is where AI comes into the mix and you get the chance to have greater control and direction over what your llm is coding for you.
87
122
 
88
123
  #### 1. Start the Reactor MCP:
124
+
125
+ Make sure you are in the same directory as your project.
126
+ Claude will automatically recognize the necessary files and MCP tools.
127
+
128
+ ```bash
129
+ claude
130
+ ```
131
+
132
+ Since you're interacting with a llm it has a high capacit for interpretating your intentions.
133
+ Any commands in the same trend will do the job.
134
+
89
135
  ```bash
90
- ph mcp
136
+ connect to the reactor mcp
91
137
  ```
92
138
 
93
139
  #### 2. Verify MCP connection:
94
140
  - Check that the Reactor MCP is available.
95
141
  - Confirm Vetra Studio shows "Connected to Reactor MCP"
96
142
 
97
- - To learn what is a [Reactor] itself read (apps/academy/docs/academy/Architecture/WorkingWithTheReactor)
98
- - To learn more about the [Reactor MCP] read (apps/academy/docs/academy/GetStarted/ReactorMCP)
143
+ ```bash
144
+ Connected to MCP successfully! I can see there's a
145
+ "vetra-4de7fa45" drive available. The reactor-mcp server is
146
+ running and ready for document model operations.
147
+ ```
99
148
 
100
- #### Key Reactor MCP Features:
101
- - Automatic document model creation from natural language descriptions
102
- - Smart editor generation based on document models
103
- - Automatically triggers code generation when documents reach valid state
149
+ - To learn what is a [Reactor](apps/academy/docs/academy/Architecture/WorkingWithTheReactor) read the reactor article
150
+ - To learn more about the [Reactor MCP](apps/academy/docs/academy/GetStarted/ReactorMCP) read the reactor MCP article
104
151
 
105
- The powerhouse config includes a vetra URL for consistent project configuration across different environments.
152
+ ### Key Reactor MCP Features
106
153
 
107
- :::tip
108
- - Vetra supports integration with custom remote drives, allowing users to create, share and manage documents within these drives.
154
+ - It supports automatic document model creation from natural language descriptions
155
+ - It implements a smart editor based on the underlying document models
156
+ - It automatically triggers code generation when documents reach valid state
109
157
  - The MCP server enables the agent to work with both existing and newly created document models.
110
- :::
158
+ - Vetra supports integration with custom remote drives, allowing users to create, share and manage documents within these drives.
159
+
111
160
 
112
161
  ### 3. Vetra Studio Package Creation Workflow
113
162
 
@@ -20,14 +20,14 @@ import BrowserOnly from "@docusaurus/BrowserOnly";
20
20
  <div className={styles.cardContent}>
21
21
  <div style={{ maxWidth: '960px', margin: '0 auto', textAlign: 'center' }}>
22
22
  <div style={{ marginBottom: '1.5rem' }}>
23
- <p style={{ fontSize: '1.1rem', marginBottom: '1rem' }}><strong>Welcome to Powerhouse!</strong></p>
24
- <p style={{ lineHeight: '1.6', color: '#444' }}>As a developer, you're about to dive into a <strong>unique ecosystem built to empower decentralized organizations</strong>. Powerhouse provides the software, infrastructure, and frameworks that enable scalable network organizations to operate efficiently.</p>
23
+ <p style={{ fontSize: '1.1rem', marginBottom: '1rem' }}><strong>Welcome to Powerhouse Vetra!</strong></p>
24
+ <p style={{ lineHeight: '1.6', color: '#444' }}>As a developer, you're about to dive into a <strong>unique ecosystem built to empower decentralized organizations</strong>. Powerhouse Vetra provides the software, infrastructure, and frameworks that enable scalable network organizations to operate efficiently.</p>
25
25
  </div>
26
26
  <div style={{ margin: '20px 0', textAlign: 'center' }}>
27
27
  <iframe
28
- src="https://drive.google.com/file/d/17dDKy-hQeI4ZlLiUZ4xhnXL4bDhJB0N-/preview"
28
+ src="https://www.youtube.com/embed/wCrUgPrMtak"
29
29
  frameBorder="0"
30
- allow="autoplay; fullscreen"
30
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
31
31
  allowFullScreen
32
32
  title="Powerhouse Introduction Video"
33
33
  style={{
@@ -3,7 +3,7 @@
3
3
  Let's set up your machine to start building your first Document Model. Don't worry if this is your first time setting up a development environment - we'll guide you through each step!
4
4
 
5
5
  :::info
6
- If you've already set up **Git, Node, and pnpm**, your most important step is to install the **Powerhouse CLI** with the command: `pnpm install ph-cmd`. A global install is recommended if you want to use the command from any directory as a power user. In this case use `pnpm install -g ph-cmd`. The Powerhouse CLI is used to create, build, and run your Document Models and gives you direct access to a series of Powerhouse Builder Tools. Move to the end of this page to [verify your installation.](#verify-installation)
6
+ If you've already set up **Git, Node.js 22, and a package manager (pnpm or npm)**, your most important step is to install the **Powerhouse CLI** with the command: `pnpm install -g ph-cmd` or `npm install -g ph-cmd`. A global install is recommended if you want to use the command from any directory as a power user. The Powerhouse CLI is used to create, build, and run your Document Models and gives you direct access to a series of Powerhouse Builder Tools. Move to the end of this page to [verify your installation.](#verify-installation)
7
7
  :::
8
8
 
9
9
  ---
@@ -43,13 +43,15 @@ node.js 22 is a tool that lets us run our application. Let's install it step by
43
43
  - Once the installer downloads, double-click it to start installation
44
44
  - Click "Next" through the installation wizard, leaving all settings at their defaults
45
45
 
46
- 3. **Install pnpm:**
46
+ 3. **Install a package manager (pnpm or npm):**
47
47
  - Open PowerShell (no need for admin mode)
48
- - Type this command and press Enter:
48
+ - For pnpm (recommended), type this command and press Enter:
49
49
 
50
50
  ```powershell
51
51
  npm install -g pnpm
52
52
  ```
53
+
54
+ - Note: Node.js comes with npm by default, so npm is already available after installing Node.js
53
55
 
54
56
  4. **Verify Installation:**
55
57
  - Open PowerShell (no need for admin mode)
@@ -57,9 +59,11 @@ node.js 22 is a tool that lets us run our application. Let's install it step by
57
59
  ```powershell
58
60
  node --version
59
61
  pnpm --version
62
+ # or
63
+ npm --version
60
64
  ```
61
65
 
62
- - You should see version numbers appear after each command (e.g., v18.17.0). If you do, congratulations - Node.js and pnpm are installed!
66
+ - You should see version numbers appear after each command (e.g., v22.x.x for Node.js). If you do, congratulations - Node.js and your package manager are installed!
63
67
 
64
68
  > **Note**: If node.js 22 commands don't work in VS Code, restart VS Code to refresh environment variables.
65
69
 
@@ -82,7 +86,7 @@ node.js 22 is a tool that lets us run our application. Let's install it step by
82
86
  brew install node@22
83
87
  ```
84
88
 
85
- - Then, install pnpm:
89
+ - Then, optionally install pnpm (npm comes with Node.js):
86
90
 
87
91
  ```bash
88
92
  brew install pnpm
@@ -93,9 +97,11 @@ node.js 22 is a tool that lets us run our application. Let's install it step by
93
97
  ```bash
94
98
  node --version
95
99
  pnpm --version
100
+ # or
101
+ npm --version
96
102
  ```
97
103
 
98
- - If you see version numbers, you've successfully installed Node.js and pnpm!
104
+ - If you see version numbers, you've successfully installed Node.js and your package manager!
99
105
 
100
106
  #### For Linux (Ubuntu/Debian):
101
107
 
@@ -109,10 +115,12 @@ node.js 22 is a tool that lets us run our application. Let's install it step by
109
115
  sudo apt update
110
116
  ```
111
117
 
112
- 3. **Install node.js 22 and pnpm:**
118
+ 3. **Install node.js 22 and optionally pnpm:**
113
119
 
114
120
  ```bash
115
- sudo apt install nodejs pnpm
121
+ sudo apt install nodejs
122
+ # Optionally install pnpm (npm comes with Node.js)
123
+ sudo apt install pnpm
116
124
  ```
117
125
 
118
126
  4. **Verify Installation:**
@@ -120,6 +128,8 @@ node.js 22 is a tool that lets us run our application. Let's install it step by
120
128
  ```bash
121
129
  node --version
122
130
  pnpm --version
131
+ # or
132
+ npm --version
123
133
  ```
124
134
 
125
135
  - If you see version numbers, you're all set!
@@ -234,6 +244,12 @@ The Powerhouse CLI (installed via the `ph-cmd` package) is a command-line interf
234
244
  pnpm install -g ph-cmd
235
245
  ```
236
246
 
247
+ Or if you're using npm:
248
+
249
+ ```bash
250
+ npm install -g ph-cmd
251
+ ```
252
+
237
253
  Key commands include:
238
254
 
239
255
  - `ph connect` for running the Connect application locally
@@ -10,13 +10,13 @@ Please start with the '**Get Started**' Chapter or '**Document Model Creation**'
10
10
  <details>
11
11
  <summary>Key commands that you'll use in this flow</summary>
12
12
 
13
- - `pnpm install -g ph-cmd`: Installs the Powerhouse CLI globally.
13
+ - `pnpm install -g ph-cmd` or `npm install -g ph-cmd`: Installs the Powerhouse CLI globally.
14
14
  - `ph init`: Initializes a new Powerhouse project or sets up the local environment.
15
15
  - `ph connect`: Runs Connect in Studio Mode for local development and testing.
16
16
  - `ph generate <YourModelName.phdm.zip>`: Generates scaffolding code from an exported document model specification.
17
17
  - `ph generate --editor YourModelName --document-types powerhouse/YourModelName`: Generates an editor template for a document model.
18
- - `pnpm build`: Builds the project for production.
19
- - `pnpm run test`: Runs unit tests.
18
+ - `pnpm build` or `npm run build`: Builds the project for production.
19
+ - `pnpm run test` or `npm test`: Runs unit tests.
20
20
  - `npm login`: Logs into your NPM account.
21
21
  - `npm publish`: Publishes your package to NPM.
22
22
  - `ph install @your-org-ph/your-package-name`: Installs a published package into a local Powerhouse environment.
@@ -33,8 +33,14 @@ Ensure you have the Powerhouse Command Line Interface (`ph-cmd`) installed. This
33
33
  pnpm install -g ph-cmd
34
34
  ```
35
35
 
36
+ Or if you're using npm:
37
+
38
+ ```bash
39
+ npm install -g ph-cmd
40
+ ```
41
+
36
42
  :::info **Prerequisites**
37
- The [Prerequisites](/academy/MasteryTrack/BuilderEnvironment/Prerequisites) guide for detailed installation instructions for Node.js, pnpm, and Git if you haven't set them up yet.
43
+ See the [Prerequisites](/academy/MasteryTrack/BuilderEnvironment/Prerequisites) guide for detailed installation instructions for Node.js 22, package managers (pnpm or npm), and Git if you haven't set them up yet.
38
44
  :::
39
45
 
40
46
  ### 1.2. Initialize your project environment
@@ -54,9 +60,9 @@ When installing or using the Powerhouse CLI commands you are able to make use of
54
60
 
55
61
  | Command | Description |
56
62
  | ---------------------------------- | ----------------------------------------------------- |
57
- | **pnpm install -g ph-cmd** | Install latest stable version |
58
- | **pnpm install -g ph-cmd@dev** | Install development version |
59
- | **pnpm install -g ph-cmd@staging** | Install staging version |
63
+ | **pnpm install -g ph-cmd** or **npm install -g ph-cmd** | Install latest stable version |
64
+ | **pnpm install -g ph-cmd@dev** or **npm install -g ph-cmd@dev** | Install development version |
65
+ | **pnpm install -g ph-cmd@staging** or **npm install -g ph-cmd@staging** | Install staging version |
60
66
  | **ph init** | Use latest stable version of the boilerplate |
61
67
  | **ph init --dev** | Use development version of the boilerplate |
62
68
  | **ph init --staging** | Use staging version of the boilerplate |
@@ -143,6 +149,12 @@ It's crucial to test your reducer logic. Write unit tests in the `document-model
143
149
  pnpm run test
144
150
  ```
145
151
 
152
+ Or with npm:
153
+
154
+ ```bash
155
+ npm test
156
+ ```
157
+
146
158
  ### 3.4. Implement the document editor
147
159
 
148
160
  A document editor provides the user interface for interacting with your document model in Connect. Generate an editor template:
@@ -262,6 +274,12 @@ Compile and optimize your project for production:
262
274
  pnpm build
263
275
  ```
264
276
 
277
+ Or with npm:
278
+
279
+ ```bash
280
+ npm run build
281
+ ```
282
+
265
283
  This command typically creates a `dist/` or `build/` directory with the compiled assets. Ensure your `package.json`'s `files` array includes this directory and other necessary assets like `manifest.json`, `document-models`, and `editors` if they are not part of the build output but need to be in the package.
266
284
 
267
285
  ### 4.5. Version control
@@ -20,6 +20,12 @@ The Powerhouse CLI (`ph-cmd`) is a command-line interface tool that provides ess
20
20
  pnpm install -g ph-cmd
21
21
  ```
22
22
 
23
+ Or if you're using npm:
24
+
25
+ ```bash
26
+ npm install -g ph-cmd
27
+ ```
28
+
23
29
  Key commands include:
24
30
 
25
31
  - `ph connect` for running the Connect application locally
@@ -36,9 +42,9 @@ When installing or using the Powerhouse CLI commands you are able to make use of
36
42
 
37
43
  | Command | Description |
38
44
  | ---------------------------------- | ----------------------------------------------------- |
39
- | **pnpm install -g ph-cmd** | Install latest stable version |
40
- | **pnpm install -g ph-cmd@dev** | Install development version |
41
- | **pnpm install -g ph-cmd@staging** | Install staging version |
45
+ | **pnpm install -g ph-cmd** or **npm install -g ph-cmd ** | Install latest stable version |
46
+ | **pnpm install -g ph-cmd@dev** or **npm install -g ph-cmd@dev** | Install development version |
47
+ | **pnpm install -g ph-cmd@staging** or **npm install -g ph-cmd@staging** | Install staging version |
42
48
  | **ph init** | Use latest stable version of the boilerplate |
43
49
  | **ph init --dev** | Use development version of the boilerplate |
44
50
  | **ph init --staging** | Use staging version of the boilerplate |
@@ -62,6 +68,8 @@ If you need to perform a clean reinstallation of the Powerhouse CLI (`ph-cmd`),
62
68
 
63
69
  ```bash
64
70
  pnpm uninstall -g ph-cmd
71
+ # or with npm
72
+ npm uninstall -g ph-cmd
65
73
  ```
66
74
 
67
75
  2. Remove the Powerhouse configuration directory:
@@ -75,12 +83,18 @@ rm -rf ~/.ph
75
83
  ```bash
76
84
  # For the latest stable version
77
85
  pnpm install -g ph-cmd
86
+ # or with npm
87
+ npm install -g ph-cmd
78
88
 
79
89
  # For the staging version
80
90
  pnpm install -g ph-cmd@staging
91
+ # or with npm
92
+ npm install -g ph-cmd@staging
81
93
 
82
94
  # For a specific version
83
95
  pnpm install -g ph-cmd@<version>
96
+ # or with npm
97
+ npm install -g ph-cmd@<version>
84
98
  ```
85
99
 
86
100
  This process ensures a clean slate by removing both the CLI tool and its configuration files before installing the desired version. It's particularly useful when:
@@ -1,8 +1,11 @@
1
1
  # What is a document model?
2
2
 
3
3
  :::tip
4
- This chapter on **Document Model Creation** will help you with an in depth practicial understanding while building an **advanced to-do list** document model.
5
- Although not required, if you have completed the 'Get Started' tutorial you will revisit familiar topics and can update your existing document model.
4
+ This chapter on **Document Model Creation** will help you with an in-depth practical understanding while building an **advanced to-do list** document model.
5
+
6
+ If you have completed the [Get Started](/academy/GetStarted/CreateNewPowerhouseProject) tutorial (which includes creating a simple to-do list document model), you will revisit familiar topics and can enhance your existing document model with the advanced features covered in this Mastery Track, such as statistics tracking.
7
+
8
+ Although not required, completing the Get Started tutorial first is highly recommended as it provides a hands-on foundation for the concepts explored in depth here.
6
9
  :::
7
10
 
8
11
  :::info **Definition: What is a Document Model?**