Commit 33a302b
feat: Cloud-version support with multi-tenant provisioning, agent connectivity, and workspace management (#30)
* feat: zero-connection startup with PostgreSQL SSL support
Enable graceful application startup without pre-configured database connections
and add SSL support for cloud PostgreSQL deployments.
## Features
- **Zero-Connection Startup**: App starts without DB_HOST set, users add connections via UI
- **PostgreSQL SSL**: New STORAGE_SSL_CA env var supports file paths or URLs (AWS RDS, GCP, Azure)
- **Server Startup Guard**: Frontend waits for backend initialization to prevent race conditions
- **SPA Routing**: Fixed client-side routing on page refresh with proper NestJS architecture
- **Enhanced UX**: Loading states, error boundaries, and helpful guidance for first-time setup
## Technical Changes
- New `waiting` status in health endpoints when no connections configured
- SpaFallbackModule with type-safe Fastify handlers and static file whitelist
- ServerStartupGuard component with progress indicators and timeout handling
- NoConnectionsGuard shows arrow pointing to sidebar connection selector
- Proper timeout cleanup to prevent memory leaks
- SSL certificate fetching with domain whitelist and 10s timeout
## Migration
- Fully backwards compatible - existing DB_HOST configurations work unchanged
- Optional: Set STORAGE_SSL_CA for cloud PostgreSQL requiring SSL
- API docs now at /docs instead of /api/docs
## Fixes
- SPA routing on page refresh in production
- Race condition on server startup
- Memory leak in polling component
- Inconsistent error messaging
* feat: zero-connection startup with PostgreSQL SSL support
Enable graceful application startup without pre-configured database connections
and add SSL support for cloud PostgreSQL deployments.
## Features
- **Zero-Connection Startup**: App starts without DB_HOST set, users add connections via UI
- **PostgreSQL SSL**: New STORAGE_SSL_CA env var supports file paths or URLs (AWS RDS, GCP, Azure)
- **Server Startup Guard**: Frontend waits for backend initialization to prevent race conditions
- **SPA Routing**: Fixed client-side routing on page refresh with proper NestJS architecture
- **Enhanced UX**: Loading states, error boundaries, and helpful guidance for first-time setup
## Technical Changes
- New `waiting` status in health endpoints when no connections configured
- SpaFallbackModule with type-safe Fastify handlers and static file whitelist
- ServerStartupGuard component with progress indicators and timeout handling
- NoConnectionsGuard shows arrow pointing to sidebar connection selector
- Proper timeout cleanup to prevent memory leaks
- SSL certificate fetching with domain whitelist and 10s timeout
## Migration
- Fully backwards compatible - existing DB_HOST configurations work unchanged
- Optional: Set STORAGE_SSL_CA for cloud PostgreSQL requiring SSL
- API docs now at /docs instead of /api/docs
## Fixes
- SPA routing on page refresh in production
- Race condition on server startup
- Memory leak in polling component
- Inconsistent error messaging
* fix: address security issues in SPA routing and SSL certificate handling
Fix SPA fallback broken by global API prefix, prevent subdomain spoofing in SSL CA domain whitelist, and block insecure HTTP URLs for certificate fetching.
* fix: address security issues in SPA routing and SSL certificate handling
Fix SPA fallback broken by global API prefix, prevent subdomain spoofing in SSL CA domain whitelist, and block insecure HTTP URLs for certificate fetching.
* fix: address security issues in SPA routing and SSL certificate handling
Move SPA fallback to Fastify setNotFoundHandler to avoid global prefix conflict, ensure API 404s return JSON not HTML, prevent subdomain spoofing in SSL CA domain validation, and block insecure HTTP URLs for certificate fetching.
* fix: address security issues in SPA routing and SSL certificate handling
Move SPA fallback to Fastify setNotFoundHandler to avoid global prefix conflict, ensure API 404s return JSON not HTML, prevent subdomain spoofing in SSL CA domain validation, and block insecure HTTP URLs for certificate fetching.
* fixed deployed conflict between fastify and nest
* fixed deployed conflict between fastify and nest
* fix: address security issues in SPA routing and SSL certificate handling
Register SPA fallback at Fastify level before NestJS to avoid global prefix conflicts, ensure API 404s return JSON, block insecure HTTP for SSL certificates, prevent subdomain spoofing with proper domain validation, restrict SPA fallback to GET requests only, and update DTOs with 'waiting' status.
* fix: address security issues in SPA routing and SSL certificate handling
Register SPA fallback at Fastify level before NestJS to avoid global prefix conflicts, ensure API 404s return JSON, block insecure HTTP for SSL certificates, prevent subdomain spoofing with proper domain validation, restrict SPA fallback to GET requests only, and update DTOs with 'waiting' status.
* fix: address security issues in SPA routing and SSL certificate handling
Register SPA fallback at Fastify level before NestJS to handle client-side routes correctly, ensure missing API routes return JSON 404, block HTTP for SSL certificates and validate only official CA distribution endpoints (AWS RDS PKI, GCP Cloud SQL, DigiCert), prevent subdomain spoofing with proper domain validation, restrict SPA fallback to GET requests only, exclude HEAD from catch-all to preserve Docker healthchecks, and update DTOs with 'waiting' status.
* fix: address security issues in SPA routing and SSL certificate handling
Register SPA fallback at Fastify level before NestJS to handle client-side routes correctly, ensure missing API routes return JSON 404, block HTTP for SSL certificates and validate only official CA distribution endpoints (AWS RDS PKI, GCP Cloud SQL, DigiCert), prevent subdomain spoofing with proper domain validation, restrict SPA fallback to GET requests only, exclude HEAD from catch-all to preserve Docker healthchecks, and update DTOs with 'waiting' status.
* fix: address security issues in SPA routing and SSL certificate handling
Register SPA fallback at Fastify level before NestJS to handle client-side routes, ensure missing API routes return JSON 404, block HTTP for SSL certificates and validate only official CA endpoints with proper path boundaries (AWS RDS PKI, GCP Cloud SQL with trailing slash, DigiCert), prevent subdomain spoofing, exclude HEAD from catch-all for Docker healthchecks, consolidate publicPath computation to prevent divergence, and update DTOs with 'waiting' status.
* fix: address security issues in SPA routing and SSL certificate handling
Register SPA fallback at Fastify level before NestJS to handle client-side routes, ensure missing API routes return JSON 404, block HTTP for SSL certificates and validate only official CA endpoints with proper path boundaries (AWS RDS PKI, GCP Cloud SQL with trailing slash, DigiCert), prevent subdomain spoofing, exclude HEAD from catch-all for Docker healthchecks, consolidate publicPath computation to prevent divergence, and update DTOs with 'waiting' status.
* fix: redirect follow behavior
* fix: redirect follow behavior
* fix: default config conflicting with new checks for the docker version
* fix: default config conflicting with new checks for the docker version
* version bump
* version bump
* Initial cloud-version setup and provisioning
* cloud-version phase 5A
* Phase 5c
* Phase 5 - testing and polishing
* Workspace management and basic handling
* basic agent for VPC connection
* graceful degradation and network improvements
* added docs about how to connect via agent
* build and deploy for the agent
* refreshing bug for agent conenctions
* terraform added to gitignore
* fix: add RuntimeCapabilityTracker to connection registry test providers
* fix: add RuntimeCapabilityTracker to remaining test provider
* tracking improvements
* fix: address bugbot review issues for cloud-version PR
- Remove debug || true from isCloudMode prop
- Separate try/catch for cluster slot stats to avoid disabling canClusterInfo
- Block commands with subcommand restrictions when args are empty
- Add .catch() to pool connect handler to prevent unhandled promise rejection
- Fix Docker env var names (BETTERDB_TOKEN, BETTERDB_CLOUD_URL)
- Fix npx package name to betterdb-agent
* fix: move agent token to Authorization header, fix slowlog overlay text
- Send agent WebSocket token via Bearer header instead of URL query param
- Server falls back to query param for backwards compat with older agents
- Show "SLOWLOG/COMMANDLOG" in unavailable overlay instead of always SLOWLOG
* fix: prevent shell injection in agent release CI script
Use process.env.VERSION instead of shell-interpolated $VERSION in node -e
* fix: hide update banner in cloud mode
* fix: generate Prisma client before API tests in CI
* feat: add deploymentMode field to telemetry payload
* version bump1
* build(deps): bump axios from 1.13.2 to 1.13.5 (#21)
Bumps [axios](https://github.com/axios/axios) from 1.13.2 to 1.13.5.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.13.2...v1.13.5)
---
updated-dependencies:
- dependency-name: axios
dependency-version: 1.13.5
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* version bumps
* fix: include deploymentMode in license_check payload
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent 5ae8ca2 commit 33a302b
File tree
161 files changed
+8271
-260
lines changed- .github/workflows
- apps
- api
- src
- audit
- auth
- client-analytics
- commandlog-analytics
- common/interfaces
- config
- connections
- __tests__
- health
- metrics
- prometheus
- slowlog-analytics
- storage
- adapters
- factory
- web
- src
- api
- components
- dashboard
- hooks
- pages
- types
- docs
- packages
- agent
- src
- cli
- proprietary
- agent
- cloud-auth
- workspace
- entitlement
- prisma
- migrations
- 20260211151131_init
- 20260214130000_add_user_model_and_domain
- 20260224120000_add_invitations
- src
- admin
- auth
- dto
- entitlement
- __tests__
- health
- invitation
- dto
- prisma
- provisioning
- stripe
- tenant
- dto
- user
- dto
- infra
- k8s
- lambda/api-key-authorizer
- terraform
- builds
- license
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
161 files changed
+8271
-260
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| 80 | + | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | | - | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | | - | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | | - | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
62 | 87 | | |
63 | 88 | | |
64 | 89 | | |
65 | 90 | | |
66 | 91 | | |
67 | 92 | | |
| 93 | + | |
68 | 94 | | |
69 | 95 | | |
70 | 96 | | |
| |||
83 | 109 | | |
84 | 110 | | |
85 | 111 | | |
| 112 | + | |
86 | 113 | | |
87 | 114 | | |
88 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
165 | 171 | | |
166 | 172 | | |
167 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments