feat: import upstream ZITADEL Login V2 v4.20.4 source workspace
This commit is contained in:
1 parent
eadd0e558b
commit
4404849fc4
644 files changed
+153201
-10
No files matched your search
@@ -17,7 +17,7 @@ ZitPlane is a central **identity and account-management platform**, not a billin
|
||||
|
||||
## Source ownership
|
||||
- Do **not** copy the complete ZITADEL backend Go tree into `core/backend/zitadel/`; use immutable/version-locked official image and maintain deployment config here.
|
||||
- Import compatible official Login V2 sources at a **single upstream commit**, including required workspace packages, generated clients/proto and lockfiles. The final layout may be adjusted to preserve upstream build integrity; document it before implementation.
|
||||
- P03 imported the official v4.20.4 Login V2 source at upstream commit `384bb9ec96b501ad39dc232ee2061a40fe180bbd`, including `apps/login`, `packages/zitadel-client`, `packages/zitadel-proto`, `proto` and workspace files under `auth/ui/v2/`. Source build and runtime integration await future CI/P05 approval; see `docs/P03-SOURCE-IMPORT.md`.
|
||||
- Share only presentation components/tokens across login and account projects unless explicitly approved. No shared browser-side admin credentials.
|
||||
|
||||
## Environments
|
||||
|
||||
+8
-2
@@ -3,7 +3,8 @@
|
||||
## 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.
|
||||
- P03 Login V2: official v4.20.4 Next.js source and upstream pnpm/Nx/client/proto dependencies **imported** under `auth/ui/v2/`; builds/dependency installation and runtime verification **intentionally deferred to Gitea Actions**.
|
||||
- P04 Account Portal: not started.
|
||||
|
||||
## Getting local ZITADEL running
|
||||
1. Install and launch Docker Desktop with Linux containers. Verify `docker compose version`.
|
||||
@@ -18,7 +19,7 @@ The proxy is **loopback-only and HTTP-only**. It is for disposable local develop
|
||||
|
||||
## 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.
|
||||
- Auth UI changes: `auth/ui/v2/apps/login/src/` (upstream workspace kept intact). See `auth/ui/v2/README.md` for beginner-friendly locations.
|
||||
- Account UI changes: `users/ui/` after P04.
|
||||
- Shared UI/components: `packages/` only if required by imported code.
|
||||
- Local Docker infrastructure: `deployment/docker/`.
|
||||
@@ -33,5 +34,10 @@ 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.
|
||||
|
||||
## P03 Login V2 — Source-only import
|
||||
The source lives at `auth/ui/v2/apps/login/` together with upstream `packages/zitadel-client`, `packages/zitadel-proto`, `proto` and the lockfile in `auth/ui/v2/`. **None of the following commands were run in P03.** A separately approved Gitea CI phase should run frozen install (reconcile the slim workspace lock if needed), proto generation, client and login builds, followed by isolated authentication checks. Do not replace the P02 prebuilt Login container without integration approval.
|
||||
|
||||
Read `docs/P03-SOURCE-IMPORT.md` for upstream revision, exact source scope and pending acceptance gates.
|
||||
|
||||
## 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.
|
||||
@@ -0,0 +1,51 @@
|
||||
# P03 — Official Login V2 Source Import Evidence
|
||||
|
||||
**Date:** 2026-11-22
|
||||
**ZitPlane baseline:** `eadd0e558b459061e48583192badfc0579e95140` (`main`)
|
||||
**Upstream:** `https://github.com/zitadel/zitadel.git`
|
||||
**Tag:** `v4.20.4`
|
||||
**Resolved upstream commit:** `384bb9ec96b501ad39dc232ee2061a40fe180bbd`
|
||||
|
||||
## Scope / approach
|
||||
|
||||
Import only the official Login V2 dependency closure, **without copying ZITADEL Go backend source**. Keep upstream's original workspace-relative paths **inside** `auth/ui/v2/` rather than moving TS/TSX source or modifying authentication logic:
|
||||
|
||||
| Upstream directory | ZitPlane location | Original tracked files |
|
||||
| --- | --- | ---: |
|
||||
| `apps/login/` | `auth/ui/v2/apps/login/` | 439 |
|
||||
| `packages/zitadel-client/` | `auth/ui/v2/packages/zitadel-client/` | 23 |
|
||||
| `packages/zitadel-proto/` | `auth/ui/v2/packages/zitadel-proto/` | 8 |
|
||||
| `proto/` | `auth/ui/v2/proto/` | 159 |
|
||||
| Selected root build files and licensing | `auth/ui/v2/` | 11 |
|
||||
|
||||
**Selected upstream inputs: 640 files.** The two upstream tracked environment files `apps/login/.env` and `apps/login/.env.prod` are deliberately **excluded from version control and the deliverable**: local/prod runtime credentials belong outside source. **Import deliverable: 638 upstream files**, plus this workspace's original ZitPlane README (updated in P03). Their omission must remain documented for future upgrades. Imported TS/TSX/authentication source files and package manifests are preserved, not redesigned.
|
||||
|
||||
Selected root files: `.nvmrc`, `.npmrc`, `.nxignore`, `package.json`, `pnpm-workspace.yaml`, `pnpm-lock.yaml`, `nx.json`, `buf.gen.yaml`, `buf.work.yaml`, `LICENSE`, `LICENSING.md`.
|
||||
|
||||
Upstream includes the Login app's `src/app`, `src/components`, `src/lib`, `src/proxy.ts`, localizations, assets, tests and Dockerfiles, in their original relative locations. The source is intended for later visual customization; the original behavior remains the baseline.
|
||||
|
||||
## License and supply-chain notes
|
||||
|
||||
The upstream `LICENSING.md` grants MIT exception to `apps/login/`, `packages/zitadel-client/` and `packages/zitadel-proto/`; `proto/` is Apache-2.0; other files may be AGPL-3.0-only. Preserve applicable notices, and review commercial/public-repo compliance before a custom release. Backend remains official version-pinned image `ghcr.io/zitadel/zitadel:v4.20.4` (P02).
|
||||
|
||||
The original root lockfile is retained without dependency installs or rewrites. Because this is a **slim source copy**, CI still needs to verify frozen-lockfile install reproducibility and resolve any absent importer/build requirements before it can be declared build-ready. The source revision was checked by `git rev-parse HEAD` in the isolated upstream clone; no upstream arbitrary `main` snapshot was used.
|
||||
|
||||
## Verification contract (source-only)
|
||||
|
||||
- Confirm ZitPlane baseline and approved paths; preserve unrelated untracked `AI_INSTRUCTIONS.md`.
|
||||
- Compare imported source files against the pinned upstream checkout, noting the two excluded environment files; record count and content integrity.
|
||||
- Confirm package manifests and workspace files exist together at the correct paths.
|
||||
- **Source-level result:** all **638/638 delivered upstream Git blobs match** the pinned official tag exactly; no missing/extra source files, no out-of-scope staged changes, and no staged `.env`, `.pem` or `.key` files. Four upstream `.gitignore`/`.gitkeep` Playwright output placeholders were force-staged because parent ZitPlane ignores their directories.
|
||||
- **Upstream whitespace exception:** a full `git diff --cached --check` reports pre-existing trailing whitespace/blank EOF lines in official source files (notably `proto/`). These imported blobs must **not** be reformatted: doing so would break verified upstream byte-for-byte provenance. Check ZitPlane-authored README/docs separately with `git diff --cached --check -- README.md docs/ auth/ui/v2/README.md`.
|
||||
- Exact Git staging scope and upstream blob identity verified; no build or test execution.
|
||||
- **No tests, pnpm install, Next.js builds, local dev server, Docker, health checks or deployment.** Runtime/build/security verification is deferred to **future Gitea Actions**, which have **not** been created or executed in this phase.
|
||||
- P02's existing Compose still starts the **prebuilt official** Login UI; it is deliberately *not wired* to the P03 source. That integration is reserved for an approved subsequent phase.
|
||||
|
||||
## Remaining gates (future phases)
|
||||
|
||||
1. Gitea CI on an isolated runner: lockfile reconciliation if required, frozen install, proto generation, client/login build, focused static/security checks and artifact verification.
|
||||
2. Disposable staging ZITADEL: session/PAT, login, signup, MFA/passkey, password reset, OIDC redirects and admin console.
|
||||
3. P05 approved image + proxy wiring, with explicit `ZITADEL_API_URL`, protected Login Client token, base path and reverse-proxy configuration.
|
||||
4. P06 AI-assisted UI customization with visual+auth regression.
|
||||
|
||||
Official guide: https://zitadel.com/docs/guides/integrate/login-ui/fork-and-deploy-login-app
|
||||
+8
-2
@@ -16,8 +16,14 @@ Implement one explicitly approved phase at a time. Keep out-of-scope files, exis
|
||||
- **P02-RUNTIME-ACCEPTANCE-01 instruction update (2026-11-22):** user explicitly deferred all local test/dev execution to a future Gitea Actions phase; this is a source handoff, **not** runtime acceptance. Existing source is committed; authorized push to `vibtools/ZitPlane` is in scope. CI workflow creation and UI import remain outside P02.
|
||||
- Existing unrelated untracked `AI_INSTRUCTIONS.md` must remain untouched.
|
||||
|
||||
## P03 — Login V2 import (proposed, NOT approved)
|
||||
Import one compatible upstream commit and necessary workspace/dependencies under an exact approved scope; verify original behavior. No visual redesign. Do not claim P02 runtime integration was verified if Docker remains unavailable.
|
||||
## P03 — Official Login V2 source import (APPROVED 2026-11-22; SOURCE IMPLEMENTED)
|
||||
- **Baseline:** `eadd0e558b459061e48583192badfc0579e95140`.
|
||||
- **Write Scope:** `auth/ui/v2/**` (Login V2 and required upstream workspace files), narrow `README.md` and `docs/**` (P03 source/phase notes). No other files.
|
||||
- **Upstream tag:** `v4.20.4` at `384bb9ec96b501ad39dc232ee2061a40fe180bbd`, matching P02 Go backend image.
|
||||
- Import `apps/login`, `packages/zitadel-client`, `packages/zitadel-proto`, `proto`, root pnpm/Nx/build files and licensing **nested under `auth/ui/v2/`**. Preserve auth/UI behavior. Exclude upstream environment files; never commit secrets.
|
||||
- User explicitly requested **no local builds, tests, dev servers or deployments**. Only source/provenance/patch audit, documentation, Git commit and approved Gitea push. CI deferred.
|
||||
- P02 prebuilt Login UI remains configured in the development Compose; do **not** replace it or call runtime acceptance complete.
|
||||
- Evidence and known gaps: `docs/P03-SOURCE-IMPORT.md`. CI workflow not part of this scope.
|
||||
|
||||
## P04 — Account portal foundation (proposed, NOT approved)
|
||||
OIDC-protected basic account self-service skeleton; no fake production authentication.
|
||||
|
||||
Reference in new issue
Block a user