@powerhousedao/academy 3.2.0-dev.0 → 3.2.0-dev.2

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,17 @@
1
+ ## 3.2.0-dev.2 (2025-06-20)
2
+
3
+ This was a version bump only for @powerhousedao/academy to align it with other projects, there were no code changes.
4
+
5
+ ## 3.2.0-dev.1 (2025-06-19)
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **connect,builder-tools:** support base paths without ending slash ([1ee6d9d9f](https://github.com/powerhouse-inc/powerhouse/commit/1ee6d9d9f))
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - acaldas
14
+
1
15
  ## 3.2.0-dev.0 (2025-06-18)
2
16
 
3
17
  ### 🚀 Features
@@ -1,4 +1,4 @@
1
- # Powerhouse Setup Guide
1
+ # Environment Setup Guide
2
2
 
3
3
  ## Introduction
4
4
  Powerhouse is a powerful platform that helps you manage and deploy your applications efficiently.
@@ -345,10 +345,14 @@ Up next is the configurations of your services.
345
345
 
346
346
  ### Service Configuration
347
347
 
348
- Next, run `ph service setup` and follow the interactive prompts. This command installs the Powerhouse services (Connect and Switchboard) and guides you through their configuration.
348
+ Next, run
349
+ ```bash
350
+ ph service setup
351
+ ```
352
+
353
+ Follow the interactive prompts. This command installs the Powerhouse services (Connect and Switchboard) and guides you through their configuration.
349
354
 
350
- :::info
351
- **What does `ph service setup` do?**
355
+ :::info **What does `ph service setup` do?**
352
356
  The script takes care of all the necessary service configuration automatically.
353
357
  It installs and configures **Nginx** as a reverse proxy, sets up SSL certificates, and configures the proxy settings for optimal performance.
354
358
  It also installs **PM2** for process management and starts your services with the appropriate configuration based on your SSL choice.
@@ -0,0 +1,168 @@
1
+ # Configure Your Environment
2
+
3
+ After successfully setting up your server and installing the Powerhouse services using the `ph service setup` command as described in the [Setup Environment](./03-SetupEnvironment.md) guide, the next crucial step is to configure your environment. Proper configuration ensures that your Powerhouse Connect and Switchboard instances behave exactly as you need them to for your specific application.
4
+
5
+ Powerhouse offers two primary methods for configuration:
6
+
7
+ 1. **Environment Variables**: Using a `.env` file in your project root. This is a straightforward way to set configuration values.
8
+ 2. **Configuration Files**: For more complex configurations, some services might use a JSON configuration file (e.g., `powerhouse.config.json`).
9
+
10
+ :::warning
11
+ A key principle to remember is that **environment variables will always override values set in configuration files**. This allows for flexible setups, where you can have default configurations in a file and override them for different environments (development, staging, production) using environment variables.
12
+ :::
13
+
14
+ This guide will walk you through both methods and provide details on common configuration options, including setting up authorization.
15
+
16
+ ## Using Environment Variables
17
+
18
+ The most common way to configure Powerhouse services is through environment variables. You can place these variables in a `.env` file at the root of your project directory. When you run `ph service start` or `ph service restart`, these variables are loaded into the environment of your running services.
19
+
20
+ ### How to Create and Edit Your `.env` File
21
+
22
+ If you're on your cloud server, you can create and edit the `.env` file directly:
23
+
24
+ 1. Navigate to your project directory: `cd <your-project-name>`
25
+ 2. Open the `.env` file with a text editor like `vim` or `nano`:
26
+ ```bash
27
+ vim .env
28
+ ```
29
+ 3. Add your configuration variables, one per line, in the `KEY="VALUE"` format.
30
+ ```env
31
+ # Example for Connect
32
+ PH_CONNECT_STUDIO_MODE="true"
33
+ PH_CONNECT_DISABLE_ADD_DRIVE="true"
34
+ ```
35
+ 4. Save the file and exit the editor (in `vim`, press `Esc`, then type `:wq` and press `Enter`).
36
+ 5. For the changes to take effect, you must restart the Powerhouse services:
37
+ ```bash
38
+ ph service restart
39
+ ```
40
+
41
+ ### Common Environment Variables for Connect
42
+
43
+ The Powerhouse Connect application has a wide range of available environment variables to toggle features and change its behavior. Below is a list of some variables you can configure.
44
+
45
+ ```bash
46
+ # build arguments
47
+ BASE_PATH="/" # vite base path
48
+ BASE_HREF="./" # electron-forge base href
49
+ PH_CONNECT_APP_REQUIRES_HARD_REFRESH="true"
50
+ SENTRY_AUTH_TOKEN=""
51
+ SENTRY_ORG=""
52
+ SENTRY_PROJECT=""
53
+
54
+ # environment variables
55
+ LOG_LEVEL="info"
56
+
57
+ ## app configuration & feature flags
58
+ PH_CONNECT_DISABLE_ADD_DRIVE="false"
59
+ PH_CONNECT_WARN_OUTDATED_APP="false"
60
+ PH_CONNECT_STUDIO_MODE="false"
61
+ PH_CONNECT_ROUTER_BASENAME="/"
62
+ PH_CONNECT_DEFAULT_DRIVES_URL=""
63
+ PH_CONNECT_ENABLED_EDITORS=""
64
+ PH_CONNECT_DISABLE_ADD_PUBLIC_DRIVES="false"
65
+ PH_CONNECT_SEARCH_BAR_ENABLED="false"
66
+ PH_CONNECT_DISABLE_ADD_CLOUD_DRIVES="false"
67
+ PH_CONNECT_DISABLE_ADD_LOCAL_DRIVES="false"
68
+ PH_CONNECT_DISABLE_DELETE_PUBLIC_DRIVES="false"
69
+ PH_CONNECT_DISABLE_DELETE_CLOUD_DRIVES="false"
70
+ PH_CONNECT_DISABLE_DELETE_LOCAL_DRIVES="false"
71
+ PH_CONNECT_PUBLIC_DRIVES_ENABLED="true"
72
+ PH_CONNECT_CLOUD_DRIVES_ENABLED="true"
73
+ PH_CONNECT_LOCAL_DRIVES_ENABLED="true"
74
+ PH_CONNECT_ARBITRUM_ALLOW_LIST=""
75
+ PH_CONNECT_RWA_ALLOW_LIST=""
76
+ PH_CONNECT_HIDE_DOCUMENT_MODEL_SELECTION_SETTINGS="true"
77
+
78
+ PH_CONNECT_RENOWN_URL="https://auth.renown.id"
79
+ PH_CONNECT_RENOWN_NETWORK_ID="eip155"
80
+ PH_CONNECT_RENOWN_CHAIN_ID=1
81
+ PH_CONNECT_DISABLED_EDITORS="powerhouse/document-drive"
82
+
83
+ PH_CONNECT_ANALYTICS_DATABASE_NAME=""
84
+ PH_CONNECT_ANALYTICS_DATABASE_WORKER_DISABLED="false"
85
+
86
+ ## error tracking
87
+ PH_CONNECT_SENTRY_DSN=""
88
+ PH_CONNECT_SENTRY_PROJECT=""
89
+ PH_CONNECT_SENTRY_ENV="prod"
90
+ PH_CONNECT_SENTRY_TRACING_ENABLED="false"
91
+
92
+ ## analytics
93
+ PH_CONNECT_GA_TRACKING_ID=
94
+
95
+ FILE_UPLOAD_OPERATIONS_CHUNK_SIZE="50"
96
+ PH_CONNECT_VERSION_CHECK_INTERVAL="3600000"
97
+ PH_CONNECT_CLI_VERSION=""
98
+
99
+ ## set during build
100
+ APP_VERSION=""
101
+ SENTRY_RELEASE=""
102
+ ```
103
+ You can find the most up-to-date list of variables in the source repository: [https://github.com/powerhouse-inc/powerhouse/blob/main/apps/connect/.env](https://github.com/powerhouse-inc/powerhouse/blob/main/apps/connect/.env)
104
+
105
+ ## Using a Configuration File
106
+
107
+ For services like the Switchboard, you can also use a `powerhouse.config.json` file for more structured configuration, especially for features like authorization.
108
+
109
+ ### Configuring Authorization
110
+
111
+ A critical aspect of your environment configuration is setting up authorization to control who can access your services and what they can do. As detailed in our dedicated [Switchboard Authorization](/academy/MasteryTrack/BuildingUserExperiences/Authorization/Authorization) guide, you can manage access using a role-based system.
112
+
113
+ Here's a quick overview of how you can configure authorization:
114
+
115
+ #### Via Environment Variables
116
+
117
+ You can set the roles directly in your `.env` file. This is quick and easy for simple allowlists.
118
+
119
+ ```bash
120
+ # Required: Enable/disable authentication
121
+ AUTH_ENABLED=true
122
+
123
+ # Optional: Comma-separated list of guest wallet addresses
124
+ GUESTS="0x789...,0xabc..."
125
+
126
+ # Optional: Comma-separated list of regular user wallet addresses
127
+ USERS="0xdef...,0xghi..."
128
+
129
+ # Optional: Comma-separated list of admin wallet addresses
130
+ ADMINS="0x123...,0x456..."
131
+ ```
132
+
133
+ #### Via `powerhouse.config.json`
134
+
135
+ For a cleaner setup, especially with longer lists of addresses, you can define them in `powerhouse.config.json` in your project root.
136
+
137
+ ```json
138
+ {
139
+ "switchboard": {
140
+ "auth": {
141
+ "enabled": true,
142
+ "guests": ["0x789...", "0xabc..."],
143
+ "users": ["0xdef...", "0xghi..."],
144
+ "admins": ["0x123...", "0x456..."]
145
+ }
146
+ }
147
+ }
148
+ ```
149
+
150
+ Remember, if you define `AUTH_ENABLED=false` as an environment variable, it will override the `enabled: true` setting in your JSON file.
151
+
152
+ For a complete understanding of how roles (Guest, User, Admin) work and the permissions they have, please refer to the full [Authorization guide](/academy/MasteryTrack/BuildingUserExperiences/Authorization/Authorization).
153
+
154
+ ## Applying Your Changes
155
+
156
+ Regardless of which method you use to update your configuration, the changes will not be applied until you restart your services.
157
+
158
+ Use the following command to do so:
159
+
160
+ ```bash
161
+ ph service restart
162
+ ```
163
+
164
+ This will stop and then start the Connect and Switchboard services, ensuring they load the new configuration. You can check the status with `ph service status`.
165
+
166
+ ## Summary
167
+
168
+ Configuring your environment is a key step to tailor the Powerhouse platform to your needs. By using a combination of `.env` files for simple key-value settings and `powerhouse.config.json` for more structured data, you have fine-grained control over all features, from the UI of the Connect app to the security and authorization on your Switchboard.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/academy",
3
- "version": "3.2.0-dev.0",
3
+ "version": "3.2.0-dev.2",
4
4
  "homepage": "https://powerhouse.academy",
5
5
  "repository": {
6
6
  "type": "git",