Multi-tenant saas structure - #1
Merged
Merged
Conversation
- Add platform scaffold with db, auth, orgs, containers, proxy modules - Create PostgreSQL schema for users, orgs, memberships, containers - Implement JWT auth system with signup, login, middleware - Build org CRUD and lifecycle routes (provision, start, stop, restart) - Create Docker container manager for org isolation - Build gateway proxy to route requests to org containers - Add health monitoring with auto-restart capability - Create dashboard UI with Alpine.js and Tailwind - Add Claude Code tool integration for coding agents - Create docker-compose.platform.yml for deployment - Add platform tests
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: kaiyifan <kaiyifan@outlook.com>
- Create config.json with gateway.mode=local for each org - Add API key configuration if provided in org settings - Add --allow-unconfigured flag as fallback Co-authored-by: kaiyifan <kaiyifan@outlook.com>
This reverts commit 55868b6.
- Copy config-backup.json to each org's openclaw.json on provision - Same logic as reset-company.sh for config transformation - Mount config-backup.json into platform container - Add CONFIG_BACKUP_PATH env var for customization Co-authored-by: kaiyifan <kaiyifan@outlook.com>
- Change from Docker named volume to host path bind mount - Both platform container and org containers can now access the same path - Config files created by platform are accessible to org containers Co-authored-by: kaiyifan <kaiyifan@outlook.com>
The org containers run as 'node' user (uid 1000), so we need to chown the .openclaw directory after creating it. Co-authored-by: kaiyifan <kaiyifan@outlook.com>
Add OPENCLAW_ALLOW_INSECURE_CONTROL_UI=1 env var so the workstream can be accessed over HTTP from non-localhost IPs (for development). Co-authored-by: kaiyifan <kaiyifan@outlook.com>
landywei
marked this pull request as ready for review
March 20, 2026 03:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Describe the problem and fix in 2–5 bullets:
claude_codetool.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
claude_codetool for autonomous coding tasks.Security Impact (required)
Yes)Yes)Yes)Yes)Yes)Yes, explain risk + mitigation:Repro + Verification
Environment
JWT_SECRET,POSTGRES_URL,CONTAINER_PORT_RANGE_START,ANTHROPIC_API_KEYSteps
pnpm install.JWT_SECRET,POSTGRES_URL).docker-compose -f docker-compose.platform.yml up --build.http://localhost:3000(or configured port).Expected
Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
req.params.userId(string vs string[]).jsonwebtokenpayload typing.log.errorwith unknown types.Compatibility / Migration
No)Yes)No)Failure Recovery (if this breaks)
Dockerfile.platform,docker-compose.platform.yml, and thesrc/platformdirectory. Revert changes topackage.jsonandpnpm-lock.yaml.Risks and Mitigations
ANTHROPIC_API_KEYleakage.