website refactor

This commit is contained in:
2026-01-16 15:20:25 +01:00
parent 7e02fc3ea5
commit 37b1aa626c
325 changed files with 2167 additions and 2782 deletions

View File

@@ -1,36 +1,36 @@
import { Provider } from '@nestjs/common';
import type { Logger } from '@core/shared/application';
import { CookieIdentitySessionAdapter } from '@adapters/identity/session/CookieIdentitySessionAdapter';
import type { IdentitySessionPort } from '@core/identity/application/ports/IdentitySessionPort';
import { ForgotPasswordUseCase } from '@core/identity/application/use-cases/ForgotPasswordUseCase';
import { LoginUseCase } from '@core/identity/application/use-cases/LoginUseCase';
import { LogoutUseCase } from '@core/identity/application/use-cases/LogoutUseCase';
import { SignupUseCase } from '@core/identity/application/use-cases/SignupUseCase';
import { SignupSponsorUseCase } from '@core/identity/application/use-cases/SignupSponsorUseCase';
import { ForgotPasswordUseCase } from '@core/identity/application/use-cases/ForgotPasswordUseCase';
import { ResetPasswordUseCase } from '@core/identity/application/use-cases/ResetPasswordUseCase';
import type { IdentitySessionPort } from '@core/identity/application/ports/IdentitySessionPort';
import { SignupSponsorUseCase } from '@core/identity/application/use-cases/SignupSponsorUseCase';
import { SignupUseCase } from '@core/identity/application/use-cases/SignupUseCase';
import type { IMagicLinkNotificationPort } from '@core/identity/domain/ports/MagicLinkNotificationPort';
import type { IAuthRepository } from '@core/identity/domain/repositories/AuthRepository';
import type { ICompanyRepository } from '@core/identity/domain/repositories/CompanyRepository';
import type { IMagicLinkRepository } from '@core/identity/domain/repositories/MagicLinkRepository';
import type { IPasswordHashingService } from '@core/identity/domain/services/PasswordHashingService';
import type { IMagicLinkNotificationPort } from '@core/identity/domain/ports/MagicLinkNotificationPort';
import type { Logger } from '@core/shared/domain/Logger';
import {
AUTH_REPOSITORY_TOKEN,
PASSWORD_HASHING_SERVICE_TOKEN,
USER_REPOSITORY_TOKEN,
MAGIC_LINK_REPOSITORY_TOKEN,
COMPANY_REPOSITORY_TOKEN,
AUTH_REPOSITORY_TOKEN,
COMPANY_REPOSITORY_TOKEN,
MAGIC_LINK_REPOSITORY_TOKEN,
PASSWORD_HASHING_SERVICE_TOKEN,
USER_REPOSITORY_TOKEN,
} from '../../persistence/identity/IdentityPersistenceTokens';
import { ConsoleMagicLinkNotificationAdapter } from '@adapters/notifications/ports/ConsoleMagicLinkNotificationAdapter';
import { AuthSessionPresenter } from './presenters/AuthSessionPresenter';
import { CommandResultPresenter } from './presenters/CommandResultPresenter';
import { ForgotPasswordPresenter } from './presenters/ForgotPasswordPresenter';
import { ResetPasswordPresenter } from './presenters/ResetPasswordPresenter';
import { ConsoleMagicLinkNotificationAdapter } from '@adapters/notifications/ports/ConsoleMagicLinkNotificationAdapter';
// Define the tokens for dependency injection
export { AUTH_REPOSITORY_TOKEN, USER_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN };
export { AUTH_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, USER_REPOSITORY_TOKEN };
export const LOGGER_TOKEN = 'Logger';
export const IDENTITY_SESSION_PORT_TOKEN = 'IdentitySessionPort';
export const LOGIN_USE_CASE_TOKEN = 'LoginUseCase';

View File

@@ -1,49 +1,49 @@
import { Inject } from '@nestjs/common';
import type { Logger } from '@core/shared/application';
import type { Logger } from '@core/shared/domain/Logger';
import {
LoginUseCase,
type LoginApplicationError,
type LoginInput,
ForgotPasswordUseCase,
type ForgotPasswordApplicationError,
type ForgotPasswordInput,
} from '@core/identity/application/use-cases/ForgotPasswordUseCase';
import {
LoginUseCase,
type LoginApplicationError,
type LoginInput,
} from '@core/identity/application/use-cases/LoginUseCase';
import { LogoutUseCase, type LogoutApplicationError } from '@core/identity/application/use-cases/LogoutUseCase';
import {
SignupUseCase,
type SignupApplicationError,
type SignupInput,
} from '@core/identity/application/use-cases/SignupUseCase';
ResetPasswordUseCase,
type ResetPasswordApplicationError,
type ResetPasswordInput,
} from '@core/identity/application/use-cases/ResetPasswordUseCase';
import {
SignupSponsorUseCase,
type SignupSponsorApplicationError,
type SignupSponsorInput,
SignupSponsorUseCase,
type SignupSponsorApplicationError,
type SignupSponsorInput,
} from '@core/identity/application/use-cases/SignupSponsorUseCase';
import {
ForgotPasswordUseCase,
type ForgotPasswordApplicationError,
type ForgotPasswordInput,
} from '@core/identity/application/use-cases/ForgotPasswordUseCase';
import {
ResetPasswordUseCase,
type ResetPasswordApplicationError,
type ResetPasswordInput,
} from '@core/identity/application/use-cases/ResetPasswordUseCase';
SignupUseCase,
type SignupApplicationError,
type SignupInput,
} from '@core/identity/application/use-cases/SignupUseCase';
import type { IdentitySessionPort } from '@core/identity/application/ports/IdentitySessionPort';
import {
AUTH_SESSION_OUTPUT_PORT_TOKEN,
COMMAND_RESULT_OUTPUT_PORT_TOKEN,
FORGOT_PASSWORD_OUTPUT_PORT_TOKEN,
RESET_PASSWORD_OUTPUT_PORT_TOKEN,
IDENTITY_SESSION_PORT_TOKEN,
LOGGER_TOKEN,
LOGIN_USE_CASE_TOKEN,
LOGOUT_USE_CASE_TOKEN,
SIGNUP_USE_CASE_TOKEN,
SIGNUP_SPONSOR_USE_CASE_TOKEN,
FORGOT_PASSWORD_USE_CASE_TOKEN,
RESET_PASSWORD_USE_CASE_TOKEN,
AUTH_SESSION_OUTPUT_PORT_TOKEN,
COMMAND_RESULT_OUTPUT_PORT_TOKEN,
FORGOT_PASSWORD_OUTPUT_PORT_TOKEN,
FORGOT_PASSWORD_USE_CASE_TOKEN,
IDENTITY_SESSION_PORT_TOKEN,
LOGGER_TOKEN,
LOGIN_USE_CASE_TOKEN,
LOGOUT_USE_CASE_TOKEN,
RESET_PASSWORD_OUTPUT_PORT_TOKEN,
RESET_PASSWORD_USE_CASE_TOKEN,
SIGNUP_SPONSOR_USE_CASE_TOKEN,
SIGNUP_USE_CASE_TOKEN,
} from './AuthProviders';
import type { AuthSessionDTO } from './dtos/AuthDto';
import { LoginParamsDTO, SignupParamsDTO, SignupSponsorParamsDTO } from './dtos/AuthDto';