Commit 7d7378e
committed
refactor(auth-ui): restructure to layered cloud-portal architecture
Squash of the 23-commit refactor/auth-ui-restructure branch. Behavior-preserving throughout (URL paths and auth flows unchanged); full gate green (react-router typegen, tsc, 657 vitest tests, build, eslint) and verified live against Zitadel.
Pass 1 — flat app/ reorganized into the cloud-portal layered model: routes/ (domain-nested), resources/<domain>/, modules/auth/ (providers + session), components/<name>/, with tests co-located in __tests__/.
Pass 2 — per-domain route logic extracted into resources/<domain>/<domain>.service.ts; routes thinned to parse->service->render/redirect; route tests rewritten as service tests; client/server module boundary enforced.
Post-restructure refinements:
- Service export verbs aligned to one convention (verify=read-only check, submit/record=write, resolve=route/dispatch); submitPassword->verifyLoginPassword and 7 sibling renames.
- Schemas centralized per-domain in server-free resources/<domain>/<domain>.schema.ts; resources/schemas/ keeps only shared primitives (check-your-email, request-id); client/server boundary hardened (schema files carry no @/server imports).
- routes.ts grouped by domain with nested layout.tsx per sub-folder (2+ routes); login layout hoists the side-effect-free URL render-context consumed via useRouteLoaderData('login'); other layouts Outlet-only.
- Prettier import-sort applied across the refactored files.1 parent c4cbf41 commit 7d7378e
230 files changed
Lines changed: 8584 additions & 5767 deletions
File tree
- app
- components
- auth-card
- auth-form
- webauthn-button
- __tests__
- modules/auth
- __tests__
- providers
- fake
- zitadel
- session
- __tests__
- resources
- authorize
- __tests__
- device
- __tests__
- login
- __tests__
- mfa
- __tests__
- otp
- __tests__
- password
- __tests__
- schemas
- session
- __tests__
- signup
- __tests__
- sso
- __tests__
- verify
- __tests__
- webauthn
- __tests__
- routes
- _schemas
- authorize
- device
- login
- __tests__
- verify
- __tests__
- logout
- password
- setup
- signup
- sso
- provider
- __tests__
- verify
- server
- __tests__
- audit/__tests__
- middleware/__tests__
- routes
- __tests__
- utils
- env
- __tests__
- errors
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
File renamed without changes.
File renamed without changes.
0 commit comments