Restructures frontend to a feature-based folder layout
Continuous Integration / config (pull_request) Successful in 11s
Continuous Integration / changes (pull_request) Successful in 21s
Continuous Integration / backend-build (pull_request) Skipped
Continuous Integration / backend-test (pull_request) Skipped
Continuous Integration / vulnerability-scan (pull_request) Skipped
Continuous Integration / frontend-prepare (pull_request) Successful in 1m37s
Continuous Integration / frontend-build (pull_request) Successful in 2m12s
Continuous Integration / frontend-test (pull_request) Successful in 4m42s
Continuous Integration / frontend-lint (pull_request) Successful in 2m2s
Continuous Integration / publish-production (pull_request) Skipped
Continuous Integration / deploy-production (pull_request) Skipped
Continuous Integration / publish-test (pull_request) Successful in 6m51s
Continuous Integration / deploy-test (pull_request) Skipped

Groups auth, setup, invitation, profile, users, cms, availability and
system code (services/hooks, components, schemas, mocks, pages) under
src/features/<name> instead of splitting by technical layer (api/,
components/, lib/schemas/, mocks/, pages/). Renames the old
connection-oriented `api` layer to `services` per feature, and splits
the monolithic api/types.ts into per-feature types.ts files (with
ProblemDetails/ApiResult merged into lib/api-client.ts as shared
infra). Layout-agnostic code (ui primitives, app shell, i18n, test
utils, lib) stays at the top level.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 22:30:37 +02:00
co-authored by Claude Sonnet 5
parent 650cf09cfa
commit 11ec08aac3
83 changed files with 249 additions and 254 deletions
@@ -0,0 +1,44 @@
import { http, HttpResponse } from 'msw';
import { API_BASE } from '@/features/auth/mocks/fixtures';
export const invitationHandlers = [
http.get(`${API_BASE}/api/v1/Invitation/validate`, ({ request }) => {
const token = new URL(request.url).searchParams.get('token');
if (token === 'valid-token') {
return HttpResponse.json(
{ isValid: true, email: 'invited@example.com', name: null, errorCode: null },
{ status: 200 },
);
}
return HttpResponse.json(
{ isValid: false, email: '', name: null, errorCode: 'EXPIRED' },
{ status: 200 },
);
}),
http.post(`${API_BASE}/api/v1/Invitation/complete`, async ({ request }) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const body = await request.json() as any;
if (!body.token || !body.name || !body.password) {
return HttpResponse.json(
{ type: 'about:blank', title: 'Bad Request', status: 400, detail: 'Missing required fields' },
{ status: 400 },
);
}
if (body.token !== 'valid-token') {
return HttpResponse.json(
{ type: 'about:blank', title: 'Bad Request', status: 400, detail: 'Invalid or expired token' },
{ status: 400 },
);
}
return HttpResponse.json(
{ message: 'Account created', user: { id: '2', name: body.name, email: 'invited@example.com', role: 'User' } },
{ status: 201 },
);
}),
];