@powerhousedao/switchboard 4.1.0-dev.5 → 4.1.0-dev.51

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,401 @@
1
+ ## 4.1.0-dev.51 (2025-09-11)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **reactor-api:** generate sdk ([ec107015c](https://github.com/powerhouse-inc/powerhouse/commit/ec107015c))
6
+ - **reactor-api:** initial gql codegen ([3db9e9778](https://github.com/powerhouse-inc/powerhouse/commit/3db9e9778))
7
+ - **monorepo:** make format consistent across ignores ([98469560f](https://github.com/powerhouse-inc/powerhouse/commit/98469560f))
8
+ - **monorepo:** use consistent separate type imports ([6fd4ac0f4](https://github.com/powerhouse-inc/powerhouse/commit/6fd4ac0f4))
9
+
10
+ ### 🩹 Fixes
11
+
12
+ - annoyingly, you have to add ignores to the root eslint ([bb6d993bd](https://github.com/powerhouse-inc/powerhouse/commit/bb6d993bd))
13
+ - **docs:** improve document hooks documentation ([d05fcb835](https://github.com/powerhouse-inc/powerhouse/commit/d05fcb835))
14
+
15
+ ### ❤️ Thank You
16
+
17
+ - Benjamin Jordan (@thegoldenmule)
18
+ - Callme-T
19
+ - ryanwolhuter @ryanwolhuter
20
+
21
+ ## 4.1.0-dev.50 (2025-09-09)
22
+
23
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
24
+
25
+ ## 4.1.0-dev.49 (2025-09-09)
26
+
27
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
28
+
29
+ ## 4.1.0-dev.48 (2025-09-09)
30
+
31
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
32
+
33
+ ## 4.1.0-dev.47 (2025-09-06)
34
+
35
+ ### 🩹 Fixes
36
+
37
+ - **docs:** added zip redundancy to release notes ([3acfe1027](https://github.com/powerhouse-inc/powerhouse/commit/3acfe1027))
38
+
39
+ ### ❤️ Thank You
40
+
41
+ - Callme-T
42
+
43
+ ## 4.1.0-dev.46 (2025-09-05)
44
+
45
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
46
+
47
+ ## 5.0.0-staging.3 (2025-09-08)
48
+
49
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
50
+
51
+ ## 5.0.0-staging.2 (2025-09-05)
52
+
53
+ ### 🩹 Fixes
54
+
55
+ - **docs:** added zip redundancy to release notes ([3acfe1027](https://github.com/powerhouse-inc/powerhouse/commit/3acfe1027))
56
+
57
+ ### ❤️ Thank You
58
+
59
+ - Callme-T
60
+
61
+ ## 5.0.0-staging.1 (2025-09-04)
62
+
63
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
64
+
65
+ ## 4.1.0-dev.44 (2025-09-04)
66
+
67
+ ### 🚀 Features
68
+
69
+ - **switchboard:** updated readme ([9659cf035](https://github.com/powerhouse-inc/powerhouse/commit/9659cf035))
70
+
71
+ ### ❤️ Thank You
72
+
73
+ - Frank
74
+
75
+ ## 4.1.0-dev.43 (2025-09-02)
76
+
77
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
78
+
79
+ ## 4.1.0-dev.42 (2025-09-02)
80
+
81
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
82
+
83
+ ## 4.1.0-dev.41 (2025-09-02)
84
+
85
+ ### 🩹 Fixes
86
+
87
+ - **document-drive:** install openssl ([89f21529e](https://github.com/powerhouse-inc/powerhouse/commit/89f21529e))
88
+ - **document-drive:** prisma build ([7884368a2](https://github.com/powerhouse-inc/powerhouse/commit/7884368a2))
89
+ - **switchboard, connect:** fetch proper tag ([79a0bc967](https://github.com/powerhouse-inc/powerhouse/commit/79a0bc967))
90
+
91
+ ### ❤️ Thank You
92
+
93
+ - Frank
94
+
95
+ ## 4.1.0-dev.40 (2025-09-02)
96
+
97
+ ### 🩹 Fixes
98
+
99
+ - **switchboard:** added openssl to dockerfile ([a10230c60](https://github.com/powerhouse-inc/powerhouse/commit/a10230c60))
100
+
101
+ ### ❤️ Thank You
102
+
103
+ - Frank
104
+
105
+ ## 4.1.0-dev.39 (2025-09-02)
106
+
107
+ ### 🩹 Fixes
108
+
109
+ - **switchboard:** added db push to switchboard entrypoint ([d109e4afb](https://github.com/powerhouse-inc/powerhouse/commit/d109e4afb))
110
+
111
+ ### ❤️ Thank You
112
+
113
+ - Frank
114
+
115
+ ## 4.1.0-dev.38 (2025-08-30)
116
+
117
+ ### 🚀 Features
118
+
119
+ - gql-gen spec ([5bf2c7226](https://github.com/powerhouse-inc/powerhouse/commit/5bf2c7226))
120
+ - **reactor:** we have a reactor facade ([7a61e68ab](https://github.com/powerhouse-inc/powerhouse/commit/7a61e68ab))
121
+ - **reactor:** impstubbing out initial interface and types ([b74b194f9](https://github.com/powerhouse-inc/powerhouse/commit/b74b194f9))
122
+
123
+ ### ❤️ Thank You
124
+
125
+ - Benjamin Jordan (@thegoldenmule)
126
+
127
+ ## 4.1.0-dev.37 (2025-08-29)
128
+
129
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
130
+
131
+ ## 4.1.0-dev.36 (2025-08-28)
132
+
133
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
134
+
135
+ ## 4.1.0-dev.35 (2025-08-27)
136
+
137
+ ### 🩹 Fixes
138
+
139
+ - **switchboard, ph-cli:** slight type fixes ([b1bf76f1b](https://github.com/powerhouse-inc/powerhouse/commit/b1bf76f1b))
140
+
141
+ ### ❤️ Thank You
142
+
143
+ - Benjamin Jordan (@thegoldenmule)
144
+
145
+ ## 4.1.0-dev.34 (2025-08-26)
146
+
147
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
148
+
149
+ ## 4.1.0-dev.33 (2025-08-21)
150
+
151
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
152
+
153
+ ## 4.1.0-dev.32 (2025-08-21)
154
+
155
+ ### 🩹 Fixes
156
+
157
+ - **ph-cli:** resolve local document model loading in switchboard and vetra ([262f13035](https://github.com/powerhouse-inc/powerhouse/commit/262f13035))
158
+
159
+ ### ❤️ Thank You
160
+
161
+ - Guillermo Puente @gpuente
162
+
163
+ ## 4.1.0-dev.31 (2025-08-20)
164
+
165
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
166
+
167
+ ## 4.1.0-dev.30 (2025-08-20)
168
+
169
+ ### 🩹 Fixes
170
+
171
+ - add additional tags ([4f0cf8658](https://github.com/powerhouse-inc/powerhouse/commit/4f0cf8658))
172
+
173
+ ### ❤️ Thank You
174
+
175
+ - Frank
176
+
177
+ ## 4.1.0-dev.29 (2025-08-20)
178
+
179
+ ### 🩹 Fixes
180
+
181
+ - fetch tags :-) ([df0b7beba](https://github.com/powerhouse-inc/powerhouse/commit/df0b7beba))
182
+
183
+ ### ❤️ Thank You
184
+
185
+ - Frank
186
+
187
+ ## 4.1.0-dev.28 (2025-08-20)
188
+
189
+ ### 🩹 Fixes
190
+
191
+ - removed metadata extraction from commit ([637960021](https://github.com/powerhouse-inc/powerhouse/commit/637960021))
192
+
193
+ ### ❤️ Thank You
194
+
195
+ - Frank
196
+
197
+ ## 4.1.0-dev.27 (2025-08-20)
198
+
199
+ ### 🩹 Fixes
200
+
201
+ - extract metadata tags and labels for docker ([bb9c81ce7](https://github.com/powerhouse-inc/powerhouse/commit/bb9c81ce7))
202
+ - use github tag properly ([95ccff4b8](https://github.com/powerhouse-inc/powerhouse/commit/95ccff4b8))
203
+ - proper tag for docker images ([e73e10617](https://github.com/powerhouse-inc/powerhouse/commit/e73e10617))
204
+ - use patname secret instead of github token ([db9dfd5cd](https://github.com/powerhouse-inc/powerhouse/commit/db9dfd5cd))
205
+
206
+ ### ❤️ Thank You
207
+
208
+ - Frank
209
+
210
+ ## 4.1.0-dev.26 (2025-08-20)
211
+
212
+ ### 🩹 Fixes
213
+
214
+ - docker deploy alternative approach ([2a5522cdc](https://github.com/powerhouse-inc/powerhouse/commit/2a5522cdc))
215
+
216
+ ### ❤️ Thank You
217
+
218
+ - Frank
219
+
220
+ ## 4.1.0-dev.25 (2025-08-20)
221
+
222
+ ### 🩹 Fixes
223
+
224
+ - docker deploy ([b057a7cce](https://github.com/powerhouse-inc/powerhouse/commit/b057a7cce))
225
+
226
+ ### ❤️ Thank You
227
+
228
+ - Frank
229
+
230
+ ## 4.1.0-dev.24 (2025-08-20)
231
+
232
+ ### 🚀 Features
233
+
234
+ - **codegen:** add drive explorer template ([9c27219dc](https://github.com/powerhouse-inc/powerhouse/commit/9c27219dc))
235
+ - **connect,reactor-browser:** remove more old electron garbage ([5cd255568](https://github.com/powerhouse-inc/powerhouse/commit/5cd255568))
236
+ - **connect:** remove broken electron code ([3f28d6a46](https://github.com/powerhouse-inc/powerhouse/commit/3f28d6a46))
237
+ - **reactor-browser,connect,vetra:** move state hooks into reactor browser and eliminate redundant and dead code ([30fa16f1f](https://github.com/powerhouse-inc/powerhouse/commit/30fa16f1f))
238
+ - **connect,state,renown:** add state hook for renown ([5beb1252b](https://github.com/powerhouse-inc/powerhouse/commit/5beb1252b))
239
+ - **connect:** remove unused dep ([ef492bc7a](https://github.com/powerhouse-inc/powerhouse/commit/ef492bc7a))
240
+ - **connect,state,reactor-browser:** eliminate jotai ([53b1ab759](https://github.com/powerhouse-inc/powerhouse/commit/53b1ab759))
241
+ - **state:** rename to vetra packages ([c415b7dc2](https://github.com/powerhouse-inc/powerhouse/commit/c415b7dc2))
242
+ - **state:** use ph packages atoms ([6421fbeea](https://github.com/powerhouse-inc/powerhouse/commit/6421fbeea))
243
+
244
+ ### 🩹 Fixes
245
+
246
+ - today claude taught me I could mock a package to fix circular references ([dcb83174c](https://github.com/powerhouse-inc/powerhouse/commit/dcb83174c))
247
+ - **monorepo:** numerous build issues ([04349dd25](https://github.com/powerhouse-inc/powerhouse/commit/04349dd25))
248
+
249
+ ### ❤️ Thank You
250
+
251
+ - Benjamin Jordan (@thegoldenmule)
252
+ - ryanwolhuter @ryanwolhuter
253
+
254
+ ## 4.1.0-dev.23 (2025-08-19)
255
+
256
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
257
+
258
+ ## 4.1.0-dev.22 (2025-08-15)
259
+
260
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
261
+
262
+ ## 4.1.0-dev.21 (2025-08-15)
263
+
264
+ ### 🚀 Features
265
+
266
+ - **vetra:** update manifest when new module is added ([#1766](https://github.com/powerhouse-inc/powerhouse/pull/1766))
267
+
268
+ ### 🩹 Fixes
269
+
270
+ - fixed debug launch configuration now that source maps are in the proper locations ([c75d793ed](https://github.com/powerhouse-inc/powerhouse/commit/c75d793ed))
271
+
272
+ ### ❤️ Thank You
273
+
274
+ - Benjamin Jordan (@thegoldenmule)
275
+ - Guillermo Puente Sandoval @gpuente
276
+
277
+ ## 4.1.0-dev.20 (2025-08-15)
278
+
279
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
280
+
281
+ ## 4.1.0-dev.19 (2025-08-14)
282
+
283
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
284
+
285
+ ## 4.1.0-dev.18 (2025-08-14)
286
+
287
+ ### 🩹 Fixes
288
+
289
+ - overly aggressive linter fixes ([e074de3df](https://github.com/powerhouse-inc/powerhouse/commit/e074de3df))
290
+
291
+ ### ❤️ Thank You
292
+
293
+ - Benjamin Jordan (@thegoldenmule)
294
+
295
+ ## 4.1.0-dev.17 (2025-08-12)
296
+
297
+ ### 🚀 Features
298
+
299
+ - refactor vetra command and remove vetra deps in connect and reactor ([#1753](https://github.com/powerhouse-inc/powerhouse/pull/1753))
300
+
301
+ ### ❤️ Thank You
302
+
303
+ - Guillermo Puente Sandoval @gpuente
304
+
305
+ ## 4.1.0-dev.16 (2025-08-12)
306
+
307
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
308
+
309
+ ## 4.1.0-dev.15 (2025-08-12)
310
+
311
+ ### 🚀 Features
312
+
313
+ - **reactor-mcp,reactor-api,reactor-local,switchboard,ph-cli:** run mcp on express app ([d51fa590e](https://github.com/powerhouse-inc/powerhouse/commit/d51fa590e))
314
+
315
+ ### ❤️ Thank You
316
+
317
+ - acaldas @acaldas
318
+
319
+ ## 4.1.0-dev.14 (2025-08-11)
320
+
321
+ ### 🚀 Features
322
+
323
+ - update document engineering dep ([54dcee90d](https://github.com/powerhouse-inc/powerhouse/commit/54dcee90d))
324
+
325
+ ### ❤️ Thank You
326
+
327
+ - acaldas @acaldas
328
+
329
+ ## 4.1.0-dev.13 (2025-08-09)
330
+
331
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
332
+
333
+ ## 4.1.0-dev.12 (2025-08-08)
334
+
335
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
336
+
337
+ ## 4.1.0-dev.11 (2025-08-07)
338
+
339
+ ### 🚀 Features
340
+
341
+ - **switchboard:** added dev mode to switchboard where local document models are loaded ([449e730b6](https://github.com/powerhouse-inc/powerhouse/commit/449e730b6))
342
+ - **switchboard,reactor-local,reactor-api:** moved vite loader to reactor-api package ([c84f0a2a3](https://github.com/powerhouse-inc/powerhouse/commit/c84f0a2a3))
343
+ - vetra package documents and app integration ([0e4053302](https://github.com/powerhouse-inc/powerhouse/commit/0e4053302))
344
+ - **vetra:** added vetra drive editor ([4ebafd143](https://github.com/powerhouse-inc/powerhouse/commit/4ebafd143))
345
+ - integrate package documents into reactor system ([939fe8e80](https://github.com/powerhouse-inc/powerhouse/commit/939fe8e80))
346
+ - **connect:** integrate Vetra package documents and editors ([2ecb9bd15](https://github.com/powerhouse-inc/powerhouse/commit/2ecb9bd15))
347
+
348
+ ### ❤️ Thank You
349
+
350
+ - acaldas @acaldas
351
+ - Guillermo Puente @gpuente
352
+ - Guillermo Puente Sandoval @gpuente
353
+
354
+ ## 4.1.0-dev.10 (2025-08-07)
355
+
356
+ ### 🚀 Features
357
+
358
+ - **builder-tools,codegen,design-system,reactor-api:** updated document-engineering version ([e74068b43](https://github.com/powerhouse-inc/powerhouse/commit/e74068b43))
359
+
360
+ ### ❤️ Thank You
361
+
362
+ - acaldas @acaldas
363
+
364
+ ## 4.1.0-dev.9 (2025-08-07)
365
+
366
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
367
+
368
+ ## 4.1.0-dev.8 (2025-08-06)
369
+
370
+ ### 🚀 Features
371
+
372
+ - **switchboard,config,reactor-api:** handle auth in reactor-api ([f33c921ee](https://github.com/powerhouse-inc/powerhouse/commit/f33c921ee))
373
+
374
+ ### ❤️ Thank You
375
+
376
+ - acaldas @acaldas
377
+
378
+ ## 4.1.0-dev.7 (2025-08-06)
379
+
380
+ ### 🚀 Features
381
+
382
+ - **switchboard:** added readme ([fbadfca11](https://github.com/powerhouse-inc/powerhouse/commit/fbadfca11))
383
+
384
+ ### ❤️ Thank You
385
+
386
+ - Frank
387
+
388
+ ## 4.1.0-dev.6 (2025-08-06)
389
+
390
+ ### 🚀 Features
391
+
392
+ - **reactor-mcp:** load local document models and reload when they change ([0408a017c](https://github.com/powerhouse-inc/powerhouse/commit/0408a017c))
393
+ - **reactor-local,reactor-api,document-drive:** reload local document models when they change ([5d9af3951](https://github.com/powerhouse-inc/powerhouse/commit/5d9af3951))
394
+
395
+ ### ❤️ Thank You
396
+
397
+ - acaldas @acaldas
398
+
1
399
  ## 4.1.0-dev.5 (2025-08-05)
2
400
 
3
401
  This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
@@ -1067,7 +1465,7 @@ This was a version bump only for @powerhousedao/switchboard to align it with oth
1067
1465
 
1068
1466
  - **reactor-api:** init project ([#388](https://github.com/powerhouse-inc/powerhouse/pull/388))
1069
1467
 
1070
- ### ❤️ Thank You
1468
+ ### ❤️ Thank You
1071
1469
 
1072
1470
  - acaldas
1073
1471
 
@@ -1081,7 +1479,7 @@ This was a version bump only for @powerhousedao/switchboard to align it with oth
1081
1479
 
1082
1480
  - Updated @powerhousedao/reactor-api to 1.1.0
1083
1481
 
1084
- ### ❤️ Thank You
1482
+ ### ❤️ Thank You
1085
1483
 
1086
1484
  - acaldas
1087
1485
 
@@ -1095,6 +1493,6 @@ This was a version bump only for @powerhousedao/switchboard to align it with oth
1095
1493
 
1096
1494
  - Updated @powerhousedao/general-document-indexer to 1.1.0
1097
1495
 
1098
- ### ❤️ Thank You
1496
+ ### ❤️ Thank You
1099
1497
 
1100
- - acaldas
1498
+ - acaldas
package/Dockerfile CHANGED
@@ -36,10 +36,12 @@ ENV PH_SWITCHBOARD_PORT=$PORT
36
36
  # Other
37
37
  ARG TAG=latest
38
38
  ENV TAG=$TAG
39
-
40
- RUN pnpm add -g ph-cmd@$TAG
41
- RUN if [ "$TAG" = "dev" ] || [ "$TAG" = "staging" ]; then \
42
- ph init project --${TAG} --package-manager pnpm; \
39
+ RUN apk add --no-cache openssl
40
+ RUN pnpm add -g ph-cmd@$TAG prisma
41
+ RUN if [[ "$TAG" == *"dev"* ]]; then \
42
+ ph init project --dev --package-manager pnpm; \
43
+ elif [[ "$TAG" == *"staging"* ]]; then \
44
+ ph init project --staging --package-manager pnpm; \
43
45
  else \
44
46
  ph init project --package-manager pnpm; \
45
47
  fi
package/README.md ADDED
@@ -0,0 +1,218 @@
1
+ # Switchboard
2
+
3
+ A powerful document-driven server that provides a unified API for managing and serving document models, drives, and reactors in the Powerhouse ecosystem.
4
+
5
+ ## 🚀 Features
6
+
7
+ - **Document Model Management**: Serve and manage document models with GraphQL API
8
+ - **Document Drive Support**: Handle document drives with filesystem and PostgreSQL storage
9
+ - **Reactor Integration**: Built-in support for Powerhouse reactors
10
+ - **Flexible Storage**: Support for filesystem, PostgreSQL, and Redis caching
11
+ - **Docker Ready**: Containerized deployment with comprehensive environment configuration
12
+ - **Authentication**: Configurable authentication with guest, user, and admin roles
13
+ - **HTTPS Support**: Built-in HTTPS server with custom certificates
14
+ - **Profiling**: Integration with Pyroscope for performance monitoring
15
+ - **Error Tracking**: Sentry integration for error monitoring and reporting
16
+
17
+ ## 📦 Installation
18
+
19
+ ### Prerequisites
20
+
21
+ - Node.js 22+
22
+ - pnpm (recommended) or npm
23
+ - Redis (optional, for caching)
24
+ - PostgreSQL (optional, for persistent storage)
25
+
26
+ ### Local Development
27
+
28
+ ```bash
29
+ # Clone the repository
30
+ git clone https://github.com/powerhouse-inc/powerhouse.git
31
+ cd powerhouse
32
+
33
+ # Install dependencies
34
+ pnpm install
35
+
36
+ # Build the switchboard
37
+ pnpm --filter @powerhousedao/switchboard build
38
+
39
+ # Start in development mode
40
+ pnpm --filter @powerhousedao/switchboard dev
41
+ ```
42
+
43
+ ### Global Installation
44
+
45
+ ```bash
46
+ # Install globally
47
+ npm install -g @powerhousedao/switchboard
48
+
49
+ # Or using pnpm
50
+ pnpm add -g @powerhousedao/switchboard
51
+ ```
52
+
53
+ ## 🏃‍♂️ Quick Start
54
+
55
+ ## ⚙️ Configuration
56
+
57
+ ### Environment Variables
58
+
59
+ | Variable | Description | Default |
60
+ | -------------------------- | ----------------------------- | --------------------- |
61
+ | `PORT` | Server port | `4001` |
62
+ | `DATABASE_URL` | Database connection string | `./.ph/drive-storage` |
63
+ | `REDIS_URL` | Redis connection URL | - |
64
+ | `REDIS_TLS_URL` | Redis TLS connection URL | - |
65
+ | `SENTRY_DSN` | Sentry DSN for error tracking | - |
66
+ | `SENTRY_ENV` | Sentry environment | - |
67
+ | `PYROSCOPE_SERVER_ADDRESS` | Pyroscope server address | - |
68
+
69
+ ### Authentication Configuration
70
+
71
+ ```typescript
72
+ const options = {
73
+ auth: {
74
+ enabled: true,
75
+ guests: ["0x123", "0x456"],
76
+ users: ["0x789", "0xabc"],
77
+ admins: ["0xdef", "0xghi"],
78
+ },
79
+ };
80
+ ```
81
+
82
+ ### Storage Options
83
+
84
+ Switchboard supports multiple storage backends:
85
+
86
+ - **Filesystem**: Local file-based storage (default)
87
+ - **PostgreSQL**: Persistent database storage
88
+ - **Redis**: Caching layer (optional)
89
+
90
+ ## 🐳 Docker Deployment
91
+
92
+ ### Using Docker Compose
93
+
94
+ ```yaml
95
+ version: "3.8"
96
+ services:
97
+ switchboard:
98
+ image: powerhouse/switchboard:latest
99
+ ports:
100
+ - "4001:4001"
101
+ environment:
102
+ - PORT=4001
103
+ - DATABASE_URL=postgresql://user:pass@db:5432/switchboard
104
+ - REDIS_URL=redis://redis:6379
105
+ depends_on:
106
+ - db
107
+ - redis
108
+
109
+ db:
110
+ image: postgres:15
111
+ environment:
112
+ POSTGRES_DB: switchboard
113
+ POSTGRES_USER: user
114
+ POSTGRES_PASSWORD: pass
115
+
116
+ redis:
117
+ image: redis:7-alpine
118
+ ```
119
+
120
+ ### Environment Variables for Docker
121
+
122
+ ```bash
123
+ # Database
124
+ PH_SWITCHBOARD_DATABASE_URL="postgresql://user:pass@db:5432/switchboard"
125
+ PH_SWITCHBOARD_REDIS_URL="redis://redis:6379"
126
+
127
+ # Authentication
128
+ PH_SWITCHBOARD_AUTH_ENABLED=true
129
+ PH_SWITCHBOARD_ADMINS_LIST="0x123,0x456"
130
+ PH_SWITCHBOARD_USERS_LIST="0x789,0xabc"
131
+ PH_SWITCHBOARD_GUESTS_LIST="0xdef,0xghi"
132
+
133
+ # Packages
134
+ PH_PACKAGES="package1,package2,package3"
135
+ ```
136
+
137
+ ## 🔧 Development
138
+
139
+ ### Project Structure
140
+
141
+ ```
142
+ src/
143
+ ├── index.ts # Main entry point
144
+ ├── server.ts # Server implementation
145
+ ├── config.ts # Configuration management
146
+ ├── types.ts # TypeScript type definitions
147
+ ├── utils.ts # Utility functions
148
+ ├── profiler.ts # Profiling integration
149
+ ├── install-packages.ts # Package installation
150
+ └── clients/ # External client integrations
151
+ └── redis.ts # Redis client
152
+ ```
153
+
154
+ ### Available Scripts
155
+
156
+ ```bash
157
+ # Build the project
158
+ pnpm build
159
+
160
+ # Start in development mode
161
+ pnpm dev
162
+
163
+ # Start production server
164
+ pnpm start
165
+
166
+ # Lint code
167
+ pnpm lint
168
+
169
+ # Clean build artifacts
170
+ pnpm clean
171
+ ```
172
+
173
+ ### Adding New Features
174
+
175
+ 1. **Document Models**: Add new document model modules to the reactor builder
176
+ 2. **Storage Backends**: Implement new storage adapters
177
+ 3. **Authentication**: Extend authentication logic
178
+ 4. **API Endpoints**: Add new GraphQL resolvers
179
+
180
+ ## 📚 API Reference
181
+
182
+ ### GraphQL Endpoints
183
+
184
+ Switchboard exposes a GraphQL API for document operations:
185
+
186
+ - **Document Models**: Query and mutate document models
187
+ - **Document Drives**: Manage document drives
188
+ - **Reactor Operations**: Execute reactor operations
189
+
190
+ ### REST Endpoints
191
+
192
+ - `GET /health` - Health check endpoint
193
+ - `POST /graphql` - GraphQL endpoint
194
+ - `GET /graphql` - GraphQL playground (development)
195
+
196
+ ## 🤝 Contributing
197
+
198
+ 1. Fork the repository
199
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
200
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
201
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
202
+ 5. Open a Pull Request
203
+
204
+ ## 📄 License
205
+
206
+ This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.
207
+
208
+ ## 🆘 Support
209
+
210
+ - **Documentation**: [Powerhouse Docs](https://docs.powerhouse.com)
211
+ - **Issues**: [GitHub Issues](https://github.com/powerhouse-inc/powerhouse/issues)
212
+ - **Discussions**: [GitHub Discussions](https://github.com/powerhouse-inc/powerhouse/discussions)
213
+
214
+ ## 🔗 Related Projects
215
+
216
+ - [@powerhousedao/reactor-api](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/reactor-api) - Reactor API package
217
+ - [@powerhousedao/document-drive](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/document-drive) - Document drive management
218
+ - [@powerhousedao/document-model](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/document-model) - Document model system
@@ -1,4 +1,4 @@
1
- import { type RedisClientType } from "redis";
1
+ import type { RedisClientType } from "redis";
2
2
  export declare let redisClient: RedisClientType | undefined;
3
3
  export declare const initRedis: (url: string) => Promise<RedisClientType | undefined>;
4
4
  export declare const closeRedis: () => Promise<void> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../../src/clients/redis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,OAAO,CAAC;AAE3D,eAAO,IAAI,WAAW,EAAE,eAAe,GAAG,SAAS,CAAC;AACpD,eAAO,MAAM,SAAS,GACpB,KAAK,MAAM,KACV,OAAO,CAAC,eAAe,GAAG,SAAS,CAiCrC,CAAC;AAeF,eAAO,MAAM,UAAU,iCAItB,CAAC"}
1
+ {"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../../src/clients/redis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAG7C,eAAO,IAAI,WAAW,EAAE,eAAe,GAAG,SAAS,CAAC;AACpD,eAAO,MAAM,SAAS,GACpB,KAAK,MAAM,KACV,OAAO,CAAC,eAAe,GAAG,SAAS,CAiCrC,CAAC;AAeF,eAAO,MAAM,UAAU,iCAItB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"redis.js","sourceRoot":"","sources":["../../../src/clients/redis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwB,MAAM,OAAO,CAAC;AAE3D,MAAM,CAAC,IAAI,WAAwC,CAAC;AACpD,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAC5B,GAAW,EAC2B,EAAE;IACxC,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC;YACnC,CAAC,CAAC;gBACE,GAAG,EAAE,IAAI;gBACT,kBAAkB,EA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AW,EAAE,CAAC;YAChB,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC,EACD,IAAI,GAAG,EAAE,GAAG,CAAC,CACd,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,aAAa,CAAC,KAAK,CAAC,CAAC;IAErB,OAAO,WAAW,EAAE,UAAU,EAAE,CAAC;AACnC,CAAC,CAAC"}
@@ -3,6 +3,7 @@ interface Config {
3
3
  url: string;
4
4
  };
5
5
  port: number;
6
+ mcp: boolean;
6
7
  }
7
8
  export declare const config: Config;
8
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAMA,UAAU,MAAM;IACd,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AACD,eAAO,MAAM,MAAM,EAAE,MAapB,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAMA,UAAU,MAAM;IACd,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;CACd;AACD,eAAO,MAAM,MAAM,EAAE,MAcpB,CAAC"}