feat: prepare isolated ZITADEL v4 local backend (Docker verification pending)
This commit is contained in:
1 parent
8f54ccb304
commit
433a0a32f8
9 files changed
+500
-68
No files matched your search
+30
-18
@@ -1,25 +1,37 @@
|
||||
# Developer quick guide
|
||||
|
||||
**Current phase:** Foundation only. No `npm install`, Docker build or login preview is available yet.
|
||||
## Current status
|
||||
- P01 Foundation: committed.
|
||||
- P02 Local backend: configuration and helper implemented; **runtime verification blocked** because Docker is not installed on the connected Windows PC.
|
||||
- No customized Login V2 or Account Portal source has been imported yet.
|
||||
|
||||
## Where to make changes (after later phases)
|
||||
- Login / signup / password recovery appearance: `auth/ui/v2/`.
|
||||
- Account dashboard appearance: `users/ui/`.
|
||||
- Reusable color tokens and components: `packages/` (only after created).
|
||||
- ZITADEL image/config, not Go application code: `core/backend/zitadel/`.
|
||||
- Compose, HTTPS routing and service configuration: `deployment/`.
|
||||
## Getting local ZITADEL running
|
||||
1. Install and launch Docker Desktop with Linux containers. Verify `docker compose version`.
|
||||
2. Open PowerShell in `ZitPlane`.
|
||||
3. Run `py core/backend/zitadel/dev.py init` once. This creates ignored local `.env` with random credentials; **never put secrets in Git**.
|
||||
4. Run `py core/backend/zitadel/dev.py config` to validate Compose after Docker is installed.
|
||||
5. Run `py core/backend/zitadel/dev.py up` to pull/start official images and verify `/debug/ready`.
|
||||
6. Visit `http://localhost:8080/ui/console`. Log in as `zitadel-admin@zitadel.localhost` using the private generated initial password; change it as prompted.
|
||||
7. Use `py core/backend/zitadel/dev.py down` to stop without destroying PostgreSQL or bootstrap-token volumes.
|
||||
|
||||
## Planned local development
|
||||
1. Install Git, Node.js with compatible pnpm and Docker Desktop.
|
||||
2. Start a **local-only** ZITADEL + PostgreSQL stack using a later phase's documented script.
|
||||
3. Start Login V2 and Account UI in Next.js development mode (hot reload).
|
||||
4. Use test accounts, synthetic profile data and local-only UI states.
|
||||
5. Inspect mobile/desktop, keyboard accessibility and full auth flows before any production build.
|
||||
The proxy is **loopback-only and HTTP-only**. It is for disposable local development, not shared network access or Coolify. Read `core/backend/zitadel/README.md` for expected persistence and limitations.
|
||||
|
||||
Commands, required versions and ports will be documented when the real upstream dependencies are installed. Do not guess them from this scaffold.
|
||||
## Where to change code (future phases)
|
||||
- Official Go server: **no core source edits**, see `core/backend/zitadel/`.
|
||||
- Auth UI changes: `auth/ui/v2/` after P03 import.
|
||||
- Account UI changes: `users/ui/` after P04.
|
||||
- Shared UI/components: `packages/` only if required by imported code.
|
||||
- Local Docker infrastructure: `deployment/docker/`.
|
||||
|
||||
## Working with AI Studio / coding agents
|
||||
Ask for changes scoped to JSX/TSX, CSS and design tokens. Review the resulting diff before integrating. Never paste generated mock auth, fake JWT handlers or browser-side admin API credentials into production. Protected auth/route code requires separate approval and focused security testing.
|
||||
## Development/production separation
|
||||
The P02 file `deployment/docker/compose.backend.dev.yaml` is not the production Compose file. Production secrets, HTTPS routing, remote domains, Admin access security, backup/restore and Coolify deployment are reserved for later approved phases. The dev master key and data **must never** be reused in production.
|
||||
|
||||
## Deployment rule
|
||||
Coolify must use an explicit, production-safe Compose configuration. Local overrides and secrets must not be copied into production. Production deploy is not part of Phase 01.
|
||||
## Local checks
|
||||
```powershell
|
||||
py -m unittest discover -s tests -p test_backend_dev.py -v
|
||||
git diff --check
|
||||
```
|
||||
A green stdlib-only test means only that local config and secret-generation contracts passed; it does **not** mean Docker images booted or authentication worked.
|
||||
|
||||
## AI Studio and coding agents
|
||||
Allow AI to modify layout/components/styles only in approved UI scopes. Never replace ZITADEL session, OAuth, MFA or passkey logic with mocks. Do not use real credentials in screenshots/prompts. Run approved UI regression tests before integration.
|
||||
Reference in new issue
Block a user