Files
ZitPlane/docs/P03-SOURCE-IMPORT.md
T

4.9 KiB

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