website refactor

This commit is contained in:
2026-01-14 02:02:24 +01:00
parent 8d7c709e0c
commit 4522d41aef
291 changed files with 12763 additions and 9309 deletions

View File

@@ -0,0 +1,26 @@
/**
* Signup Mutation
*
* Framework-agnostic mutation for signup operations.
* Called from Server Actions.
*
* Pattern: Server Action → Mutation → Service → API Client
*/
import { Result } from '@/lib/contracts/Result';
import { AuthService } from '@/lib/services/auth/AuthService';
import { SessionViewModel } from '@/lib/view-models/SessionViewModel';
import { SignupParamsDTO } from '@/lib/types/generated/SignupParamsDTO';
export class SignupMutation {
async execute(params: SignupParamsDTO): Promise<Result<SessionViewModel, string>> {
try {
const authService = new AuthService();
const session = await authService.signup(params);
return Result.ok(session);
} catch (error) {
const errorMessage = error instanceof Error ? error.message : 'Signup failed';
return Result.err(errorMessage);
}
}
}