diff --git a/README.md b/README.md index 26cde05f5..56855aab4 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ All E2E tests run in isolated Docker containers to ensure consistent, reproducib ``` gridpilot/ ├── src/ -│ ├── packages/ # Shared packages +│ ├── core/ # Shared packages │ │ ├── domain/ # Core business logic (entities, value objects) │ │ ├── application/ # Use cases and orchestration │ │ ├── shared/ # Common utilities and types diff --git a/apps/api/Dockerfile.dev b/apps/api/Dockerfile.dev index 49f37db62..9dc2f85a9 100644 --- a/apps/api/Dockerfile.dev +++ b/apps/api/Dockerfile.dev @@ -12,7 +12,7 @@ RUN find ./node_modules -name "ts-node-dev" -print || true # Debugging line # Copy apps/api and packages for development COPY apps/api apps/api/ -COPY packages packages/ +COPY packages core/ COPY apps/api/tsconfig.json apps/api/ COPY tsconfig.base.json ./ diff --git a/apps/api/Dockerfile.prod b/apps/api/Dockerfile.prod index 222d2e92c..c04b04ec0 100644 --- a/apps/api/Dockerfile.prod +++ b/apps/api/Dockerfile.prod @@ -8,7 +8,7 @@ RUN npm ci # Copy apps/api and packages for building COPY apps/api apps/api/ -COPY packages packages/ +COPY packages core/ COPY apps/api/tsconfig.json apps/api/ COPY tsconfig.base.json ./ diff --git a/apps/api/jest.config.js b/apps/api/jest.config.js index 89fd719e2..a498d6175 100644 --- a/apps/api/jest.config.js +++ b/apps/api/jest.config.js @@ -12,6 +12,6 @@ module.exports = { coverageDirectory: '../coverage', testRegex: '.*\\.spec\\.ts$', moduleNameMapper: { - '^@gridpilot/(.*)$': '/../../packages/$1', // Corrected path + '^@gridpilot/(.*)$': '/../../core/$1', // Corrected path }, }; diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index f8d638a49..7e049c751 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -28,16 +28,16 @@ "strictPropertyInitialization": false, "paths": { "@gridpilot/shared/*": [ - "../../packages/shared/*" + "../../core/shared/*" ], "@gridpilot/analytics/*": [ - "../../packages/analytics/*" + "../../core/analytics/*" ], "@gridpilot/analytics/domain/repositories/*": [ - "../../packages/analytics/domain/repositories/*" + "../../core/analytics/domain/repositories/*" ], "@gridpilot/analytics/domain/entities/*": [ - "../../packages/analytics/domain/entities/*" + "../../core/analytics/domain/entities/*" ], "@nestjs/testing": [ "./node_modules/@nestjs/testing" diff --git a/apps/companion/electron.vite.config.ts b/apps/companion/electron.vite.config.ts index 8f48979aa..2d7bf6469 100644 --- a/apps/companion/electron.vite.config.ts +++ b/apps/companion/electron.vite.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ alias: { '@': resolve(__dirname, '../../'), 'packages': resolve(__dirname, '../../packages'), - 'packages/*': resolve(__dirname, '../../packages/*'), + 'core/*': resolve(__dirname, '../../core/*'), }, }, }, diff --git a/apps/companion/main/ipc-handlers.ts b/apps/companion/main/ipc-handlers.ts index c8f593dd8..fbc363e07 100644 --- a/apps/companion/main/ipc-handlers.ts +++ b/apps/companion/main/ipc-handlers.ts @@ -1,12 +1,12 @@ import { ipcMain } from 'electron'; import type { BrowserWindow, IpcMainInvokeEvent } from 'electron'; import { DIContainer } from './di-container'; -import type { HostedSessionConfig } from 'packages/automation/domain/types/HostedSessionConfig'; -import { StepId } from 'packages/automation/domain/value-objects/StepId'; -import { AuthenticationState } from 'packages/automation/domain/value-objects/AuthenticationState'; -import { ElectronCheckoutConfirmationAdapter } from 'packages/automation/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter'; -import type { OverlayAction } from 'packages/automation/application/ports/OverlaySyncPort'; -import type { IAutomationLifecycleEmitter } from 'packages/automation/infrastructure/adapters/IAutomationLifecycleEmitter'; +import type { HostedSessionConfig } from 'core/automation/domain/types/HostedSessionConfig'; +import { StepId } from 'core/automation/domain/value-objects/StepId'; +import { AuthenticationState } from 'core/automation/domain/value-objects/AuthenticationState'; +import { ElectronCheckoutConfirmationAdapter } from 'core/automation/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter'; +import type { OverlayAction } from 'core/automation/application/ports/OverlaySyncPort'; +import type { IAutomationLifecycleEmitter } from 'core/automation/infrastructure/adapters/IAutomationLifecycleEmitter'; let progressMonitorInterval: NodeJS.Timeout | null = null; let lifecycleSubscribed = false; diff --git a/apps/companion/main/preload.ts b/apps/companion/main/preload.ts index 78e16a9ce..696f4fa5d 100644 --- a/apps/companion/main/preload.ts +++ b/apps/companion/main/preload.ts @@ -1,6 +1,6 @@ import { contextBridge, ipcRenderer } from 'electron'; -import type { HostedSessionConfig } from '../../../packages/automation/domain/types/HostedSessionConfig'; -import type { AuthenticationState } from '../../../packages/automation/domain/value-objects/AuthenticationState'; +import type { HostedSessionConfig } from '../../../core/automation/domain/types/HostedSessionConfig'; +import type { AuthenticationState } from '../../../core/automation/domain/value-objects/AuthenticationState'; export interface AuthStatusEvent { state: AuthenticationState; diff --git a/apps/companion/renderer/App.tsx b/apps/companion/renderer/App.tsx index 253b045fb..4a7de8a6d 100644 --- a/apps/companion/renderer/App.tsx +++ b/apps/companion/renderer/App.tsx @@ -5,8 +5,8 @@ import { LoginPrompt } from './components/LoginPrompt'; import { BrowserModeToggle } from './components/BrowserModeToggle'; import { CheckoutConfirmationDialog } from './components/CheckoutConfirmationDialog'; import { RaceCreationSuccessScreen } from './components/RaceCreationSuccessScreen'; -import type { HostedSessionConfig } from '../../../packages/automation/domain/types/HostedSessionConfig'; -import type { AuthenticationState } from '../../../packages/automation/domain/value-objects/AuthenticationState'; +import type { HostedSessionConfig } from '../../../core/automation/domain/types/HostedSessionConfig'; +import type { AuthenticationState } from '../../../core/automation/domain/value-objects/AuthenticationState'; import type { StartAutomationResponse } from '../main/preload'; interface SessionProgress { diff --git a/apps/companion/renderer/components/SessionCreationForm.tsx b/apps/companion/renderer/components/SessionCreationForm.tsx index 8c6611d39..12caae99a 100644 --- a/apps/companion/renderer/components/SessionCreationForm.tsx +++ b/apps/companion/renderer/components/SessionCreationForm.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import type { HostedSessionConfig } from '../../../../packages/automation/domain/types/HostedSessionConfig'; +import type { HostedSessionConfig } from '../../../../core/automation/domain/types/HostedSessionConfig'; interface SessionCreationFormProps { onSubmit: (config: HostedSessionConfig) => void; diff --git a/apps/website/Dockerfile.dev b/apps/website/Dockerfile.dev index af1f6a654..112ddc9e7 100644 --- a/apps/website/Dockerfile.dev +++ b/apps/website/Dockerfile.dev @@ -12,7 +12,7 @@ RUN find ./node_modules -name "next" -print || true # Debugging line # Copy apps/website and packages for development COPY apps/website apps/website/ -COPY packages packages/ +COPY packages core/ COPY apps/website/tsconfig.json apps/website/ COPY scripts scripts/ COPY tsconfig.base.json ./ diff --git a/apps/website/Dockerfile.prod b/apps/website/Dockerfile.prod index 9cf9e8587..d287b7437 100644 --- a/apps/website/Dockerfile.prod +++ b/apps/website/Dockerfile.prod @@ -8,7 +8,7 @@ RUN npm ci # Copy apps/website, packages, and config for building COPY apps/website apps/website/ -COPY packages packages/ +COPY packages core/ COPY apps/website/tsconfig.json apps/website/ COPY scripts scripts/ COPY tsconfig.base.json ./ diff --git a/apps/website/package.json b/apps/website/package.json index bf6d30b5e..50a3eaaa5 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@faker-js/faker": "^9.2.0", - "@gridpilot/identity": "file:../../packages/identity", - "@gridpilot/notifications": "file:../../packages/notifications", - "@gridpilot/racing": "file:../../packages/racing", - "@gridpilot/social": "file:../../packages/social", - "@gridpilot/testing-support": "file:../../packages/testing-support", + "@gridpilot/identity": "file:../../core/identity", + "@gridpilot/notifications": "file:../../core/notifications", + "@gridpilot/racing": "file:../../core/racing", + "@gridpilot/social": "file:../../core/social", + "@gridpilot/testing-support": "file:../../core/testing-support", "@vercel/kv": "^3.0.0", "framer-motion": "^12.23.25", "lucide-react": "^0.555.0", diff --git a/apps/website/tsconfig.json b/apps/website/tsconfig.json index b80fc4e5f..c3ff5b843 100644 --- a/apps/website/tsconfig.json +++ b/apps/website/tsconfig.json @@ -18,23 +18,23 @@ "@/lib/*": ["./lib/*"], "@/components/*": ["./components/*"], "@/app/*": ["./app/*"], - "@gridpilot/identity": ["../../packages/identity/index.ts"], - "@gridpilot/identity/*": ["../../packages/identity/*"], - "@gridpilot/racing": ["../../packages/racing/index.ts"], - "@gridpilot/racing/*": ["../../packages/racing/*"], - "@gridpilot/social": ["../../packages/social/index.ts"], - "@gridpilot/social/*": ["../../packages/social/*"], - "@gridpilot/testing-support": ["../../packages/testing-support/index.ts"], - "@gridpilot/testing-support/*": ["../../packages/testing-support/*"], - "@gridpilot/media": ["../../packages/media/index.ts"], - "@gridpilot/media/*": ["../../packages/media/*"], - "@gridpilot/shared": ["../../packages/shared/index.ts"], - "@gridpilot/shared/application": ["../../packages/shared/application"], - "@gridpilot/shared/application/*": ["../../packages/shared/application/*"], - "@gridpilot/shared/presentation": ["../../packages/shared/presentation"], - "@gridpilot/shared/presentation/*": ["../../packages/shared/presentation/*"], - "@gridpilot/shared/domain": ["../../packages/shared/domain"], - "@gridpilot/shared/errors": ["../../packages/shared/errors"] + "@gridpilot/identity": ["../../core/identity/index.ts"], + "@gridpilot/identity/*": ["../../core/identity/*"], + "@gridpilot/racing": ["../../core/racing/index.ts"], + "@gridpilot/racing/*": ["../../core/racing/*"], + "@gridpilot/social": ["../../core/social/index.ts"], + "@gridpilot/social/*": ["../../core/social/*"], + "@gridpilot/testing-support": ["../../core/testing-support/index.ts"], + "@gridpilot/testing-support/*": ["../../core/testing-support/*"], + "@gridpilot/media": ["../../core/media/index.ts"], + "@gridpilot/media/*": ["../../core/media/*"], + "@gridpilot/shared": ["../../core/shared/index.ts"], + "@gridpilot/shared/application": ["../../core/shared/application"], + "@gridpilot/shared/application/*": ["../../core/shared/application/*"], + "@gridpilot/shared/presentation": ["../../core/shared/presentation"], + "@gridpilot/shared/presentation/*": ["../../core/shared/presentation/*"], + "@gridpilot/shared/domain": ["../../core/shared/domain"], + "@gridpilot/shared/errors": ["../../core/shared/errors"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], diff --git a/packages/analytics/application/use-cases/GetEntityAnalyticsQuery.ts b/core/analytics/application/use-cases/GetEntityAnalyticsQuery.ts similarity index 100% rename from packages/analytics/application/use-cases/GetEntityAnalyticsQuery.ts rename to core/analytics/application/use-cases/GetEntityAnalyticsQuery.ts diff --git a/packages/analytics/application/use-cases/RecordEngagementUseCase.ts b/core/analytics/application/use-cases/RecordEngagementUseCase.ts similarity index 100% rename from packages/analytics/application/use-cases/RecordEngagementUseCase.ts rename to core/analytics/application/use-cases/RecordEngagementUseCase.ts diff --git a/packages/analytics/application/use-cases/RecordPageViewUseCase.ts b/core/analytics/application/use-cases/RecordPageViewUseCase.ts similarity index 100% rename from packages/analytics/application/use-cases/RecordPageViewUseCase.ts rename to core/analytics/application/use-cases/RecordPageViewUseCase.ts diff --git a/packages/analytics/domain/entities/AnalyticsSnapshot.ts b/core/analytics/domain/entities/AnalyticsSnapshot.ts similarity index 100% rename from packages/analytics/domain/entities/AnalyticsSnapshot.ts rename to core/analytics/domain/entities/AnalyticsSnapshot.ts diff --git a/packages/analytics/domain/entities/EngagementEvent.ts b/core/analytics/domain/entities/EngagementEvent.ts similarity index 100% rename from packages/analytics/domain/entities/EngagementEvent.ts rename to core/analytics/domain/entities/EngagementEvent.ts diff --git a/packages/analytics/domain/entities/PageView.ts b/core/analytics/domain/entities/PageView.ts similarity index 100% rename from packages/analytics/domain/entities/PageView.ts rename to core/analytics/domain/entities/PageView.ts diff --git a/packages/analytics/domain/ports/ILogger.ts b/core/analytics/domain/ports/ILogger.ts similarity index 100% rename from packages/analytics/domain/ports/ILogger.ts rename to core/analytics/domain/ports/ILogger.ts diff --git a/packages/analytics/domain/repositories/IAnalyticsSnapshotRepository.ts b/core/analytics/domain/repositories/IAnalyticsSnapshotRepository.ts similarity index 100% rename from packages/analytics/domain/repositories/IAnalyticsSnapshotRepository.ts rename to core/analytics/domain/repositories/IAnalyticsSnapshotRepository.ts diff --git a/packages/analytics/domain/repositories/IEngagementRepository.ts b/core/analytics/domain/repositories/IEngagementRepository.ts similarity index 100% rename from packages/analytics/domain/repositories/IEngagementRepository.ts rename to core/analytics/domain/repositories/IEngagementRepository.ts diff --git a/packages/analytics/domain/repositories/IPageViewRepository.ts b/core/analytics/domain/repositories/IPageViewRepository.ts similarity index 100% rename from packages/analytics/domain/repositories/IPageViewRepository.ts rename to core/analytics/domain/repositories/IPageViewRepository.ts diff --git a/packages/analytics/domain/types/AnalyticsSnapshot.ts b/core/analytics/domain/types/AnalyticsSnapshot.ts similarity index 100% rename from packages/analytics/domain/types/AnalyticsSnapshot.ts rename to core/analytics/domain/types/AnalyticsSnapshot.ts diff --git a/packages/analytics/domain/types/EngagementEvent.ts b/core/analytics/domain/types/EngagementEvent.ts similarity index 100% rename from packages/analytics/domain/types/EngagementEvent.ts rename to core/analytics/domain/types/EngagementEvent.ts diff --git a/packages/analytics/domain/types/PageView.ts b/core/analytics/domain/types/PageView.ts similarity index 100% rename from packages/analytics/domain/types/PageView.ts rename to core/analytics/domain/types/PageView.ts diff --git a/packages/analytics/domain/value-objects/AnalyticsEntityId.ts b/core/analytics/domain/value-objects/AnalyticsEntityId.ts similarity index 100% rename from packages/analytics/domain/value-objects/AnalyticsEntityId.ts rename to core/analytics/domain/value-objects/AnalyticsEntityId.ts diff --git a/packages/analytics/domain/value-objects/AnalyticsSessionId.ts b/core/analytics/domain/value-objects/AnalyticsSessionId.ts similarity index 100% rename from packages/analytics/domain/value-objects/AnalyticsSessionId.ts rename to core/analytics/domain/value-objects/AnalyticsSessionId.ts diff --git a/packages/analytics/domain/value-objects/PageViewId.ts b/core/analytics/domain/value-objects/PageViewId.ts similarity index 100% rename from packages/analytics/domain/value-objects/PageViewId.ts rename to core/analytics/domain/value-objects/PageViewId.ts diff --git a/packages/analytics/index.ts b/core/analytics/index.ts similarity index 100% rename from packages/analytics/index.ts rename to core/analytics/index.ts diff --git a/packages/analytics/infrastructure/repositories/InMemoryAnalyticsSnapshotRepository.ts b/core/analytics/infrastructure/repositories/InMemoryAnalyticsSnapshotRepository.ts similarity index 100% rename from packages/analytics/infrastructure/repositories/InMemoryAnalyticsSnapshotRepository.ts rename to core/analytics/infrastructure/repositories/InMemoryAnalyticsSnapshotRepository.ts diff --git a/packages/analytics/infrastructure/repositories/InMemoryEngagementRepository.ts b/core/analytics/infrastructure/repositories/InMemoryEngagementRepository.ts similarity index 100% rename from packages/analytics/infrastructure/repositories/InMemoryEngagementRepository.ts rename to core/analytics/infrastructure/repositories/InMemoryEngagementRepository.ts diff --git a/packages/analytics/infrastructure/repositories/InMemoryPageViewRepository.ts b/core/analytics/infrastructure/repositories/InMemoryPageViewRepository.ts similarity index 100% rename from packages/analytics/infrastructure/repositories/InMemoryPageViewRepository.ts rename to core/analytics/infrastructure/repositories/InMemoryPageViewRepository.ts diff --git a/packages/analytics/package.json b/core/analytics/package.json similarity index 100% rename from packages/analytics/package.json rename to core/analytics/package.json diff --git a/packages/automation/application/dto/AutomationEngineValidationResultDTO.ts b/core/automation/application/dto/AutomationEngineValidationResultDTO.ts similarity index 100% rename from packages/automation/application/dto/AutomationEngineValidationResultDTO.ts rename to core/automation/application/dto/AutomationEngineValidationResultDTO.ts diff --git a/packages/automation/application/dto/AutomationResultDTO.ts b/core/automation/application/dto/AutomationResultDTO.ts similarity index 100% rename from packages/automation/application/dto/AutomationResultDTO.ts rename to core/automation/application/dto/AutomationResultDTO.ts diff --git a/packages/automation/application/dto/CheckoutConfirmationRequestDTO.ts b/core/automation/application/dto/CheckoutConfirmationRequestDTO.ts similarity index 100% rename from packages/automation/application/dto/CheckoutConfirmationRequestDTO.ts rename to core/automation/application/dto/CheckoutConfirmationRequestDTO.ts diff --git a/packages/automation/application/dto/CheckoutInfoDTO.ts b/core/automation/application/dto/CheckoutInfoDTO.ts similarity index 100% rename from packages/automation/application/dto/CheckoutInfoDTO.ts rename to core/automation/application/dto/CheckoutInfoDTO.ts diff --git a/packages/automation/application/dto/ClickResultDTO.ts b/core/automation/application/dto/ClickResultDTO.ts similarity index 100% rename from packages/automation/application/dto/ClickResultDTO.ts rename to core/automation/application/dto/ClickResultDTO.ts diff --git a/packages/automation/application/dto/FormFillResultDTO.ts b/core/automation/application/dto/FormFillResultDTO.ts similarity index 100% rename from packages/automation/application/dto/FormFillResultDTO.ts rename to core/automation/application/dto/FormFillResultDTO.ts diff --git a/packages/automation/application/dto/ModalResultDTO.ts b/core/automation/application/dto/ModalResultDTO.ts similarity index 100% rename from packages/automation/application/dto/ModalResultDTO.ts rename to core/automation/application/dto/ModalResultDTO.ts diff --git a/packages/automation/application/dto/NavigationResultDTO.ts b/core/automation/application/dto/NavigationResultDTO.ts similarity index 100% rename from packages/automation/application/dto/NavigationResultDTO.ts rename to core/automation/application/dto/NavigationResultDTO.ts diff --git a/packages/automation/application/dto/SessionDTO.ts b/core/automation/application/dto/SessionDTO.ts similarity index 100% rename from packages/automation/application/dto/SessionDTO.ts rename to core/automation/application/dto/SessionDTO.ts diff --git a/packages/automation/application/dto/WaitResultDTO.ts b/core/automation/application/dto/WaitResultDTO.ts similarity index 100% rename from packages/automation/application/dto/WaitResultDTO.ts rename to core/automation/application/dto/WaitResultDTO.ts diff --git a/packages/automation/application/ports/AuthenticationServicePort.ts b/core/automation/application/ports/AuthenticationServicePort.ts similarity index 100% rename from packages/automation/application/ports/AuthenticationServicePort.ts rename to core/automation/application/ports/AuthenticationServicePort.ts diff --git a/packages/automation/application/ports/AutomationEnginePort.ts b/core/automation/application/ports/AutomationEnginePort.ts similarity index 100% rename from packages/automation/application/ports/AutomationEnginePort.ts rename to core/automation/application/ports/AutomationEnginePort.ts diff --git a/packages/automation/application/ports/AutomationEventPublisherPort.ts b/core/automation/application/ports/AutomationEventPublisherPort.ts similarity index 100% rename from packages/automation/application/ports/AutomationEventPublisherPort.ts rename to core/automation/application/ports/AutomationEventPublisherPort.ts diff --git a/packages/automation/application/ports/AutomationResults.ts b/core/automation/application/ports/AutomationResults.ts similarity index 100% rename from packages/automation/application/ports/AutomationResults.ts rename to core/automation/application/ports/AutomationResults.ts diff --git a/packages/automation/application/ports/CheckoutConfirmationPort.ts b/core/automation/application/ports/CheckoutConfirmationPort.ts similarity index 100% rename from packages/automation/application/ports/CheckoutConfirmationPort.ts rename to core/automation/application/ports/CheckoutConfirmationPort.ts diff --git a/packages/automation/application/ports/CheckoutServicePort.ts b/core/automation/application/ports/CheckoutServicePort.ts similarity index 100% rename from packages/automation/application/ports/CheckoutServicePort.ts rename to core/automation/application/ports/CheckoutServicePort.ts diff --git a/packages/automation/application/ports/IAutomationEventPublisher.ts b/core/automation/application/ports/IAutomationEventPublisher.ts similarity index 100% rename from packages/automation/application/ports/IAutomationEventPublisher.ts rename to core/automation/application/ports/IAutomationEventPublisher.ts diff --git a/packages/automation/application/ports/ILogger.ts b/core/automation/application/ports/ILogger.ts similarity index 100% rename from packages/automation/application/ports/ILogger.ts rename to core/automation/application/ports/ILogger.ts diff --git a/packages/automation/application/ports/IOverlaySyncPort.ts b/core/automation/application/ports/IOverlaySyncPort.ts similarity index 100% rename from packages/automation/application/ports/IOverlaySyncPort.ts rename to core/automation/application/ports/IOverlaySyncPort.ts diff --git a/packages/automation/application/ports/LoggerContext.ts b/core/automation/application/ports/LoggerContext.ts similarity index 100% rename from packages/automation/application/ports/LoggerContext.ts rename to core/automation/application/ports/LoggerContext.ts diff --git a/packages/automation/application/ports/LoggerLogLevel.ts b/core/automation/application/ports/LoggerLogLevel.ts similarity index 100% rename from packages/automation/application/ports/LoggerLogLevel.ts rename to core/automation/application/ports/LoggerLogLevel.ts diff --git a/packages/automation/application/ports/LoggerPort.ts b/core/automation/application/ports/LoggerPort.ts similarity index 100% rename from packages/automation/application/ports/LoggerPort.ts rename to core/automation/application/ports/LoggerPort.ts diff --git a/packages/automation/application/ports/OverlaySyncPort.ts b/core/automation/application/ports/OverlaySyncPort.ts similarity index 100% rename from packages/automation/application/ports/OverlaySyncPort.ts rename to core/automation/application/ports/OverlaySyncPort.ts diff --git a/packages/automation/application/ports/ScreenAutomationPort.ts b/core/automation/application/ports/ScreenAutomationPort.ts similarity index 100% rename from packages/automation/application/ports/ScreenAutomationPort.ts rename to core/automation/application/ports/ScreenAutomationPort.ts diff --git a/packages/automation/application/ports/SessionRepositoryPort.ts b/core/automation/application/ports/SessionRepositoryPort.ts similarity index 100% rename from packages/automation/application/ports/SessionRepositoryPort.ts rename to core/automation/application/ports/SessionRepositoryPort.ts diff --git a/packages/automation/application/ports/SessionValidatorPort.ts b/core/automation/application/ports/SessionValidatorPort.ts similarity index 100% rename from packages/automation/application/ports/SessionValidatorPort.ts rename to core/automation/application/ports/SessionValidatorPort.ts diff --git a/packages/automation/application/ports/UserConfirmationPort.ts b/core/automation/application/ports/UserConfirmationPort.ts similarity index 100% rename from packages/automation/application/ports/UserConfirmationPort.ts rename to core/automation/application/ports/UserConfirmationPort.ts diff --git a/packages/automation/application/services/OverlaySyncService.ts b/core/automation/application/services/OverlaySyncService.ts similarity index 100% rename from packages/automation/application/services/OverlaySyncService.ts rename to core/automation/application/services/OverlaySyncService.ts diff --git a/packages/automation/application/use-cases/CheckAuthenticationUseCase.ts b/core/automation/application/use-cases/CheckAuthenticationUseCase.ts similarity index 100% rename from packages/automation/application/use-cases/CheckAuthenticationUseCase.ts rename to core/automation/application/use-cases/CheckAuthenticationUseCase.ts diff --git a/packages/automation/application/use-cases/ClearSessionUseCase.ts b/core/automation/application/use-cases/ClearSessionUseCase.ts similarity index 100% rename from packages/automation/application/use-cases/ClearSessionUseCase.ts rename to core/automation/application/use-cases/ClearSessionUseCase.ts diff --git a/packages/automation/application/use-cases/CompleteRaceCreationUseCase.ts b/core/automation/application/use-cases/CompleteRaceCreationUseCase.ts similarity index 100% rename from packages/automation/application/use-cases/CompleteRaceCreationUseCase.ts rename to core/automation/application/use-cases/CompleteRaceCreationUseCase.ts diff --git a/packages/automation/application/use-cases/ConfirmCheckoutUseCase.ts b/core/automation/application/use-cases/ConfirmCheckoutUseCase.ts similarity index 100% rename from packages/automation/application/use-cases/ConfirmCheckoutUseCase.ts rename to core/automation/application/use-cases/ConfirmCheckoutUseCase.ts diff --git a/packages/automation/application/use-cases/InitiateLoginUseCase.ts b/core/automation/application/use-cases/InitiateLoginUseCase.ts similarity index 100% rename from packages/automation/application/use-cases/InitiateLoginUseCase.ts rename to core/automation/application/use-cases/InitiateLoginUseCase.ts diff --git a/packages/automation/application/use-cases/StartAutomationSessionUseCase.ts b/core/automation/application/use-cases/StartAutomationSessionUseCase.ts similarity index 100% rename from packages/automation/application/use-cases/StartAutomationSessionUseCase.ts rename to core/automation/application/use-cases/StartAutomationSessionUseCase.ts diff --git a/packages/automation/application/use-cases/VerifyAuthenticatedPageUseCase.ts b/core/automation/application/use-cases/VerifyAuthenticatedPageUseCase.ts similarity index 100% rename from packages/automation/application/use-cases/VerifyAuthenticatedPageUseCase.ts rename to core/automation/application/use-cases/VerifyAuthenticatedPageUseCase.ts diff --git a/packages/automation/domain/entities/AutomationSession.ts b/core/automation/domain/entities/AutomationSession.ts similarity index 100% rename from packages/automation/domain/entities/AutomationSession.ts rename to core/automation/domain/entities/AutomationSession.ts diff --git a/packages/automation/domain/entities/StepExecution.ts b/core/automation/domain/entities/StepExecution.ts similarity index 100% rename from packages/automation/domain/entities/StepExecution.ts rename to core/automation/domain/entities/StepExecution.ts diff --git a/packages/automation/domain/errors/AutomationDomainError.ts b/core/automation/domain/errors/AutomationDomainError.ts similarity index 100% rename from packages/automation/domain/errors/AutomationDomainError.ts rename to core/automation/domain/errors/AutomationDomainError.ts diff --git a/packages/automation/domain/services/PageStateValidator.ts b/core/automation/domain/services/PageStateValidator.ts similarity index 100% rename from packages/automation/domain/services/PageStateValidator.ts rename to core/automation/domain/services/PageStateValidator.ts diff --git a/packages/automation/domain/services/StepTransitionValidator.ts b/core/automation/domain/services/StepTransitionValidator.ts similarity index 100% rename from packages/automation/domain/services/StepTransitionValidator.ts rename to core/automation/domain/services/StepTransitionValidator.ts diff --git a/packages/automation/domain/shared/Result.ts b/core/automation/domain/shared/Result.ts similarity index 100% rename from packages/automation/domain/shared/Result.ts rename to core/automation/domain/shared/Result.ts diff --git a/packages/automation/domain/types/HostedSessionConfig.ts b/core/automation/domain/types/HostedSessionConfig.ts similarity index 100% rename from packages/automation/domain/types/HostedSessionConfig.ts rename to core/automation/domain/types/HostedSessionConfig.ts diff --git a/packages/automation/domain/types/ScreenRegion.ts b/core/automation/domain/types/ScreenRegion.ts similarity index 100% rename from packages/automation/domain/types/ScreenRegion.ts rename to core/automation/domain/types/ScreenRegion.ts diff --git a/packages/automation/domain/value-objects/AuthenticationState.ts b/core/automation/domain/value-objects/AuthenticationState.ts similarity index 100% rename from packages/automation/domain/value-objects/AuthenticationState.ts rename to core/automation/domain/value-objects/AuthenticationState.ts diff --git a/packages/automation/domain/value-objects/BrowserAuthenticationState.ts b/core/automation/domain/value-objects/BrowserAuthenticationState.ts similarity index 100% rename from packages/automation/domain/value-objects/BrowserAuthenticationState.ts rename to core/automation/domain/value-objects/BrowserAuthenticationState.ts diff --git a/packages/automation/domain/value-objects/CheckoutConfirmation.ts b/core/automation/domain/value-objects/CheckoutConfirmation.ts similarity index 100% rename from packages/automation/domain/value-objects/CheckoutConfirmation.ts rename to core/automation/domain/value-objects/CheckoutConfirmation.ts diff --git a/packages/automation/domain/value-objects/CheckoutPrice.ts b/core/automation/domain/value-objects/CheckoutPrice.ts similarity index 100% rename from packages/automation/domain/value-objects/CheckoutPrice.ts rename to core/automation/domain/value-objects/CheckoutPrice.ts diff --git a/packages/automation/domain/value-objects/CheckoutState.ts b/core/automation/domain/value-objects/CheckoutState.ts similarity index 100% rename from packages/automation/domain/value-objects/CheckoutState.ts rename to core/automation/domain/value-objects/CheckoutState.ts diff --git a/packages/automation/domain/value-objects/CookieConfiguration.ts b/core/automation/domain/value-objects/CookieConfiguration.ts similarity index 100% rename from packages/automation/domain/value-objects/CookieConfiguration.ts rename to core/automation/domain/value-objects/CookieConfiguration.ts diff --git a/packages/automation/domain/value-objects/RaceCreationResult.ts b/core/automation/domain/value-objects/RaceCreationResult.ts similarity index 100% rename from packages/automation/domain/value-objects/RaceCreationResult.ts rename to core/automation/domain/value-objects/RaceCreationResult.ts diff --git a/packages/automation/domain/value-objects/ScreenRegion.ts b/core/automation/domain/value-objects/ScreenRegion.ts similarity index 100% rename from packages/automation/domain/value-objects/ScreenRegion.ts rename to core/automation/domain/value-objects/ScreenRegion.ts diff --git a/packages/automation/domain/value-objects/SessionLifetime.ts b/core/automation/domain/value-objects/SessionLifetime.ts similarity index 100% rename from packages/automation/domain/value-objects/SessionLifetime.ts rename to core/automation/domain/value-objects/SessionLifetime.ts diff --git a/packages/automation/domain/value-objects/SessionState.ts b/core/automation/domain/value-objects/SessionState.ts similarity index 100% rename from packages/automation/domain/value-objects/SessionState.ts rename to core/automation/domain/value-objects/SessionState.ts diff --git a/packages/automation/domain/value-objects/StepId.ts b/core/automation/domain/value-objects/StepId.ts similarity index 100% rename from packages/automation/domain/value-objects/StepId.ts rename to core/automation/domain/value-objects/StepId.ts diff --git a/packages/automation/index.ts b/core/automation/index.ts similarity index 100% rename from packages/automation/index.ts rename to core/automation/index.ts diff --git a/packages/automation/infrastructure/adapters/IAutomationLifecycleEmitter.ts b/core/automation/infrastructure/adapters/IAutomationLifecycleEmitter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/IAutomationLifecycleEmitter.ts rename to core/automation/infrastructure/adapters/IAutomationLifecycleEmitter.ts diff --git a/packages/automation/infrastructure/adapters/automation/CheckoutPriceExtractor.ts b/core/automation/infrastructure/adapters/automation/CheckoutPriceExtractor.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/CheckoutPriceExtractor.ts rename to core/automation/infrastructure/adapters/automation/CheckoutPriceExtractor.ts diff --git a/packages/automation/infrastructure/adapters/automation/auth/AuthenticationGuard.ts b/core/automation/infrastructure/adapters/automation/auth/AuthenticationGuard.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/auth/AuthenticationGuard.ts rename to core/automation/infrastructure/adapters/automation/auth/AuthenticationGuard.ts diff --git a/packages/automation/infrastructure/adapters/automation/auth/IRacingPlaywrightAuthFlow.ts b/core/automation/infrastructure/adapters/automation/auth/IRacingPlaywrightAuthFlow.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/auth/IRacingPlaywrightAuthFlow.ts rename to core/automation/infrastructure/adapters/automation/auth/IRacingPlaywrightAuthFlow.ts diff --git a/packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow.ts b/core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow.ts rename to core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow.ts diff --git a/packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService.ts b/core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService.ts rename to core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService.ts diff --git a/packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore.ts b/core/automation/infrastructure/adapters/automation/auth/SessionCookieStore.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore.ts rename to core/automation/infrastructure/adapters/automation/auth/SessionCookieStore.ts diff --git a/packages/automation/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts b/core/automation/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts rename to core/automation/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts diff --git a/packages/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession.ts b/core/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession.ts rename to core/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession.ts diff --git a/packages/automation/infrastructure/adapters/automation/core/WizardStepOrchestrator.ts b/core/automation/infrastructure/adapters/automation/core/WizardStepOrchestrator.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/core/WizardStepOrchestrator.ts rename to core/automation/infrastructure/adapters/automation/core/WizardStepOrchestrator.ts diff --git a/packages/automation/infrastructure/adapters/automation/dom/IRacingDomInteractor.ts b/core/automation/infrastructure/adapters/automation/dom/IRacingDomInteractor.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/dom/IRacingDomInteractor.ts rename to core/automation/infrastructure/adapters/automation/dom/IRacingDomInteractor.ts diff --git a/packages/automation/infrastructure/adapters/automation/dom/IRacingDomNavigator.ts b/core/automation/infrastructure/adapters/automation/dom/IRacingDomNavigator.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/dom/IRacingDomNavigator.ts rename to core/automation/infrastructure/adapters/automation/dom/IRacingDomNavigator.ts diff --git a/packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors.ts b/core/automation/infrastructure/adapters/automation/dom/IRacingSelectors.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors.ts rename to core/automation/infrastructure/adapters/automation/dom/IRacingSelectors.ts diff --git a/packages/automation/infrastructure/adapters/automation/dom/SafeClickService.ts b/core/automation/infrastructure/adapters/automation/dom/SafeClickService.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/dom/SafeClickService.ts rename to core/automation/infrastructure/adapters/automation/dom/SafeClickService.ts diff --git a/packages/automation/infrastructure/adapters/automation/engine/AutomationEngineAdapter.ts b/core/automation/infrastructure/adapters/automation/engine/AutomationEngineAdapter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/engine/AutomationEngineAdapter.ts rename to core/automation/infrastructure/adapters/automation/engine/AutomationEngineAdapter.ts diff --git a/packages/automation/infrastructure/adapters/automation/engine/FixtureServer.ts b/core/automation/infrastructure/adapters/automation/engine/FixtureServer.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/engine/FixtureServer.ts rename to core/automation/infrastructure/adapters/automation/engine/FixtureServer.ts diff --git a/packages/automation/infrastructure/adapters/automation/engine/MockAutomationEngineAdapter.ts b/core/automation/infrastructure/adapters/automation/engine/MockAutomationEngineAdapter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/engine/MockAutomationEngineAdapter.ts rename to core/automation/infrastructure/adapters/automation/engine/MockAutomationEngineAdapter.ts diff --git a/packages/automation/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts b/core/automation/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts rename to core/automation/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts diff --git a/packages/automation/infrastructure/adapters/automation/index.ts b/core/automation/infrastructure/adapters/automation/index.ts similarity index 100% rename from packages/automation/infrastructure/adapters/automation/index.ts rename to core/automation/infrastructure/adapters/automation/index.ts diff --git a/packages/automation/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts b/core/automation/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts rename to core/automation/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts diff --git a/packages/automation/infrastructure/adapters/logging/ConsoleLogAdapter.ts b/core/automation/infrastructure/adapters/logging/ConsoleLogAdapter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/logging/ConsoleLogAdapter.ts rename to core/automation/infrastructure/adapters/logging/ConsoleLogAdapter.ts diff --git a/packages/automation/infrastructure/adapters/logging/NoOpLogAdapter.ts b/core/automation/infrastructure/adapters/logging/NoOpLogAdapter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/logging/NoOpLogAdapter.ts rename to core/automation/infrastructure/adapters/logging/NoOpLogAdapter.ts diff --git a/packages/automation/infrastructure/adapters/logging/PinoLogAdapter.ts b/core/automation/infrastructure/adapters/logging/PinoLogAdapter.ts similarity index 100% rename from packages/automation/infrastructure/adapters/logging/PinoLogAdapter.ts rename to core/automation/infrastructure/adapters/logging/PinoLogAdapter.ts diff --git a/packages/automation/infrastructure/adapters/logging/index.ts b/core/automation/infrastructure/adapters/logging/index.ts similarity index 100% rename from packages/automation/infrastructure/adapters/logging/index.ts rename to core/automation/infrastructure/adapters/logging/index.ts diff --git a/packages/automation/infrastructure/config/AutomationConfig.ts b/core/automation/infrastructure/config/AutomationConfig.ts similarity index 100% rename from packages/automation/infrastructure/config/AutomationConfig.ts rename to core/automation/infrastructure/config/AutomationConfig.ts diff --git a/packages/automation/infrastructure/config/BrowserModeConfig.ts b/core/automation/infrastructure/config/BrowserModeConfig.ts similarity index 100% rename from packages/automation/infrastructure/config/BrowserModeConfig.ts rename to core/automation/infrastructure/config/BrowserModeConfig.ts diff --git a/packages/automation/infrastructure/config/LoggingConfig.ts b/core/automation/infrastructure/config/LoggingConfig.ts similarity index 100% rename from packages/automation/infrastructure/config/LoggingConfig.ts rename to core/automation/infrastructure/config/LoggingConfig.ts diff --git a/packages/automation/infrastructure/config/index.ts b/core/automation/infrastructure/config/index.ts similarity index 100% rename from packages/automation/infrastructure/config/index.ts rename to core/automation/infrastructure/config/index.ts diff --git a/packages/automation/infrastructure/repositories/InMemorySessionRepository.ts b/core/automation/infrastructure/repositories/InMemorySessionRepository.ts similarity index 100% rename from packages/automation/infrastructure/repositories/InMemorySessionRepository.ts rename to core/automation/infrastructure/repositories/InMemorySessionRepository.ts diff --git a/packages/automation/package.json b/core/automation/package.json similarity index 100% rename from packages/automation/package.json rename to core/automation/package.json diff --git a/packages/automation/tsconfig.json b/core/automation/tsconfig.json similarity index 100% rename from packages/automation/tsconfig.json rename to core/automation/tsconfig.json diff --git a/packages/identity/application/dto/AuthCallbackCommandDTO.ts b/core/identity/application/dto/AuthCallbackCommandDTO.ts similarity index 100% rename from packages/identity/application/dto/AuthCallbackCommandDTO.ts rename to core/identity/application/dto/AuthCallbackCommandDTO.ts diff --git a/packages/identity/application/dto/AuthProviderDTO.ts b/core/identity/application/dto/AuthProviderDTO.ts similarity index 100% rename from packages/identity/application/dto/AuthProviderDTO.ts rename to core/identity/application/dto/AuthProviderDTO.ts diff --git a/packages/identity/application/dto/AuthSessionDTO.ts b/core/identity/application/dto/AuthSessionDTO.ts similarity index 100% rename from packages/identity/application/dto/AuthSessionDTO.ts rename to core/identity/application/dto/AuthSessionDTO.ts diff --git a/packages/identity/application/dto/AuthenticatedUserDTO.ts b/core/identity/application/dto/AuthenticatedUserDTO.ts similarity index 100% rename from packages/identity/application/dto/AuthenticatedUserDTO.ts rename to core/identity/application/dto/AuthenticatedUserDTO.ts diff --git a/packages/identity/application/dto/IracingAuthStateDTO.ts b/core/identity/application/dto/IracingAuthStateDTO.ts similarity index 100% rename from packages/identity/application/dto/IracingAuthStateDTO.ts rename to core/identity/application/dto/IracingAuthStateDTO.ts diff --git a/packages/identity/application/dto/StartAuthCommandDTO.ts b/core/identity/application/dto/StartAuthCommandDTO.ts similarity index 100% rename from packages/identity/application/dto/StartAuthCommandDTO.ts rename to core/identity/application/dto/StartAuthCommandDTO.ts diff --git a/packages/identity/application/ports/IdentityProviderPort.ts b/core/identity/application/ports/IdentityProviderPort.ts similarity index 100% rename from packages/identity/application/ports/IdentityProviderPort.ts rename to core/identity/application/ports/IdentityProviderPort.ts diff --git a/packages/identity/application/ports/IdentitySessionPort.ts b/core/identity/application/ports/IdentitySessionPort.ts similarity index 100% rename from packages/identity/application/ports/IdentitySessionPort.ts rename to core/identity/application/ports/IdentitySessionPort.ts diff --git a/packages/identity/application/use-cases/GetCurrentUserSessionUseCase.ts b/core/identity/application/use-cases/GetCurrentUserSessionUseCase.ts similarity index 100% rename from packages/identity/application/use-cases/GetCurrentUserSessionUseCase.ts rename to core/identity/application/use-cases/GetCurrentUserSessionUseCase.ts diff --git a/packages/identity/application/use-cases/HandleAuthCallbackUseCase.ts b/core/identity/application/use-cases/HandleAuthCallbackUseCase.ts similarity index 100% rename from packages/identity/application/use-cases/HandleAuthCallbackUseCase.ts rename to core/identity/application/use-cases/HandleAuthCallbackUseCase.ts diff --git a/packages/identity/application/use-cases/LoginWithEmailUseCase.ts b/core/identity/application/use-cases/LoginWithEmailUseCase.ts similarity index 100% rename from packages/identity/application/use-cases/LoginWithEmailUseCase.ts rename to core/identity/application/use-cases/LoginWithEmailUseCase.ts diff --git a/packages/identity/application/use-cases/LogoutUseCase.ts b/core/identity/application/use-cases/LogoutUseCase.ts similarity index 100% rename from packages/identity/application/use-cases/LogoutUseCase.ts rename to core/identity/application/use-cases/LogoutUseCase.ts diff --git a/packages/identity/application/use-cases/SignupWithEmailUseCase.ts b/core/identity/application/use-cases/SignupWithEmailUseCase.ts similarity index 100% rename from packages/identity/application/use-cases/SignupWithEmailUseCase.ts rename to core/identity/application/use-cases/SignupWithEmailUseCase.ts diff --git a/packages/identity/application/use-cases/StartAuthUseCase.ts b/core/identity/application/use-cases/StartAuthUseCase.ts similarity index 100% rename from packages/identity/application/use-cases/StartAuthUseCase.ts rename to core/identity/application/use-cases/StartAuthUseCase.ts diff --git a/packages/identity/domain/entities/Achievement.ts b/core/identity/domain/entities/Achievement.ts similarity index 100% rename from packages/identity/domain/entities/Achievement.ts rename to core/identity/domain/entities/Achievement.ts diff --git a/packages/identity/domain/entities/SponsorAccount.ts b/core/identity/domain/entities/SponsorAccount.ts similarity index 100% rename from packages/identity/domain/entities/SponsorAccount.ts rename to core/identity/domain/entities/SponsorAccount.ts diff --git a/packages/identity/domain/entities/User.ts b/core/identity/domain/entities/User.ts similarity index 100% rename from packages/identity/domain/entities/User.ts rename to core/identity/domain/entities/User.ts diff --git a/packages/identity/domain/entities/UserAchievement.ts b/core/identity/domain/entities/UserAchievement.ts similarity index 100% rename from packages/identity/domain/entities/UserAchievement.ts rename to core/identity/domain/entities/UserAchievement.ts diff --git a/packages/identity/domain/repositories/IAchievementRepository.ts b/core/identity/domain/repositories/IAchievementRepository.ts similarity index 100% rename from packages/identity/domain/repositories/IAchievementRepository.ts rename to core/identity/domain/repositories/IAchievementRepository.ts diff --git a/packages/identity/domain/repositories/ISponsorAccountRepository.ts b/core/identity/domain/repositories/ISponsorAccountRepository.ts similarity index 100% rename from packages/identity/domain/repositories/ISponsorAccountRepository.ts rename to core/identity/domain/repositories/ISponsorAccountRepository.ts diff --git a/packages/identity/domain/repositories/IUserRatingRepository.ts b/core/identity/domain/repositories/IUserRatingRepository.ts similarity index 100% rename from packages/identity/domain/repositories/IUserRatingRepository.ts rename to core/identity/domain/repositories/IUserRatingRepository.ts diff --git a/packages/identity/domain/repositories/IUserRepository.ts b/core/identity/domain/repositories/IUserRepository.ts similarity index 100% rename from packages/identity/domain/repositories/IUserRepository.ts rename to core/identity/domain/repositories/IUserRepository.ts diff --git a/packages/identity/domain/services/RatingUpdateService.ts b/core/identity/domain/services/RatingUpdateService.ts similarity index 100% rename from packages/identity/domain/services/RatingUpdateService.ts rename to core/identity/domain/services/RatingUpdateService.ts diff --git a/packages/identity/domain/types/EmailAddress.ts b/core/identity/domain/types/EmailAddress.ts similarity index 100% rename from packages/identity/domain/types/EmailAddress.ts rename to core/identity/domain/types/EmailAddress.ts diff --git a/packages/identity/domain/value-objects/EmailAddress.ts b/core/identity/domain/value-objects/EmailAddress.ts similarity index 100% rename from packages/identity/domain/value-objects/EmailAddress.ts rename to core/identity/domain/value-objects/EmailAddress.ts diff --git a/packages/identity/domain/value-objects/UserId.ts b/core/identity/domain/value-objects/UserId.ts similarity index 100% rename from packages/identity/domain/value-objects/UserId.ts rename to core/identity/domain/value-objects/UserId.ts diff --git a/packages/identity/domain/value-objects/UserRating.ts b/core/identity/domain/value-objects/UserRating.ts similarity index 100% rename from packages/identity/domain/value-objects/UserRating.ts rename to core/identity/domain/value-objects/UserRating.ts diff --git a/packages/identity/index.ts b/core/identity/index.ts similarity index 100% rename from packages/identity/index.ts rename to core/identity/index.ts diff --git a/packages/identity/infrastructure/providers/IracingDemoIdentityProviderAdapter.ts b/core/identity/infrastructure/providers/IracingDemoIdentityProviderAdapter.ts similarity index 100% rename from packages/identity/infrastructure/providers/IracingDemoIdentityProviderAdapter.ts rename to core/identity/infrastructure/providers/IracingDemoIdentityProviderAdapter.ts diff --git a/packages/identity/infrastructure/repositories/InMemoryAchievementRepository.ts b/core/identity/infrastructure/repositories/InMemoryAchievementRepository.ts similarity index 100% rename from packages/identity/infrastructure/repositories/InMemoryAchievementRepository.ts rename to core/identity/infrastructure/repositories/InMemoryAchievementRepository.ts diff --git a/packages/identity/infrastructure/repositories/InMemorySponsorAccountRepository.ts b/core/identity/infrastructure/repositories/InMemorySponsorAccountRepository.ts similarity index 100% rename from packages/identity/infrastructure/repositories/InMemorySponsorAccountRepository.ts rename to core/identity/infrastructure/repositories/InMemorySponsorAccountRepository.ts diff --git a/packages/identity/infrastructure/repositories/InMemoryUserRatingRepository.ts b/core/identity/infrastructure/repositories/InMemoryUserRatingRepository.ts similarity index 100% rename from packages/identity/infrastructure/repositories/InMemoryUserRatingRepository.ts rename to core/identity/infrastructure/repositories/InMemoryUserRatingRepository.ts diff --git a/packages/identity/infrastructure/repositories/InMemoryUserRepository.ts b/core/identity/infrastructure/repositories/InMemoryUserRepository.ts similarity index 100% rename from packages/identity/infrastructure/repositories/InMemoryUserRepository.ts rename to core/identity/infrastructure/repositories/InMemoryUserRepository.ts diff --git a/packages/identity/infrastructure/session/CookieIdentitySessionAdapter.ts b/core/identity/infrastructure/session/CookieIdentitySessionAdapter.ts similarity index 100% rename from packages/identity/infrastructure/session/CookieIdentitySessionAdapter.ts rename to core/identity/infrastructure/session/CookieIdentitySessionAdapter.ts diff --git a/packages/identity/package.json b/core/identity/package.json similarity index 100% rename from packages/identity/package.json rename to core/identity/package.json diff --git a/packages/identity/tsconfig.json b/core/identity/tsconfig.json similarity index 100% rename from packages/identity/tsconfig.json rename to core/identity/tsconfig.json diff --git a/packages/media/application/ports/AvatarGenerationPort.ts b/core/media/application/ports/AvatarGenerationPort.ts similarity index 100% rename from packages/media/application/ports/AvatarGenerationPort.ts rename to core/media/application/ports/AvatarGenerationPort.ts diff --git a/packages/media/application/ports/FaceValidationPort.ts b/core/media/application/ports/FaceValidationPort.ts similarity index 100% rename from packages/media/application/ports/FaceValidationPort.ts rename to core/media/application/ports/FaceValidationPort.ts diff --git a/packages/media/application/ports/ImageServicePort.ts b/core/media/application/ports/ImageServicePort.ts similarity index 100% rename from packages/media/application/ports/ImageServicePort.ts rename to core/media/application/ports/ImageServicePort.ts diff --git a/packages/media/application/use-cases/RequestAvatarGenerationUseCase.ts b/core/media/application/use-cases/RequestAvatarGenerationUseCase.ts similarity index 100% rename from packages/media/application/use-cases/RequestAvatarGenerationUseCase.ts rename to core/media/application/use-cases/RequestAvatarGenerationUseCase.ts diff --git a/packages/media/application/use-cases/SelectAvatarUseCase.ts b/core/media/application/use-cases/SelectAvatarUseCase.ts similarity index 100% rename from packages/media/application/use-cases/SelectAvatarUseCase.ts rename to core/media/application/use-cases/SelectAvatarUseCase.ts diff --git a/packages/media/domain/entities/AvatarGenerationRequest.ts b/core/media/domain/entities/AvatarGenerationRequest.ts similarity index 100% rename from packages/media/domain/entities/AvatarGenerationRequest.ts rename to core/media/domain/entities/AvatarGenerationRequest.ts diff --git a/packages/media/domain/repositories/IAvatarGenerationRepository.ts b/core/media/domain/repositories/IAvatarGenerationRepository.ts similarity index 100% rename from packages/media/domain/repositories/IAvatarGenerationRepository.ts rename to core/media/domain/repositories/IAvatarGenerationRepository.ts diff --git a/packages/media/domain/types/AvatarGenerationRequest.ts b/core/media/domain/types/AvatarGenerationRequest.ts similarity index 100% rename from packages/media/domain/types/AvatarGenerationRequest.ts rename to core/media/domain/types/AvatarGenerationRequest.ts diff --git a/packages/media/domain/value-objects/MediaUrl.ts b/core/media/domain/value-objects/MediaUrl.ts similarity index 100% rename from packages/media/domain/value-objects/MediaUrl.ts rename to core/media/domain/value-objects/MediaUrl.ts diff --git a/packages/media/index.ts b/core/media/index.ts similarity index 100% rename from packages/media/index.ts rename to core/media/index.ts diff --git a/packages/media/package.json b/core/media/package.json similarity index 100% rename from packages/media/package.json rename to core/media/package.json diff --git a/packages/media/tsconfig.json b/core/media/tsconfig.json similarity index 100% rename from packages/media/tsconfig.json rename to core/media/tsconfig.json diff --git a/packages/notifications/application/index.ts b/core/notifications/application/index.ts similarity index 100% rename from packages/notifications/application/index.ts rename to core/notifications/application/index.ts diff --git a/packages/notifications/application/ports/INotificationGateway.ts b/core/notifications/application/ports/INotificationGateway.ts similarity index 100% rename from packages/notifications/application/ports/INotificationGateway.ts rename to core/notifications/application/ports/INotificationGateway.ts diff --git a/packages/notifications/application/ports/INotificationService.ts b/core/notifications/application/ports/INotificationService.ts similarity index 100% rename from packages/notifications/application/ports/INotificationService.ts rename to core/notifications/application/ports/INotificationService.ts diff --git a/packages/notifications/application/use-cases/GetUnreadNotificationsUseCase.ts b/core/notifications/application/use-cases/GetUnreadNotificationsUseCase.ts similarity index 100% rename from packages/notifications/application/use-cases/GetUnreadNotificationsUseCase.ts rename to core/notifications/application/use-cases/GetUnreadNotificationsUseCase.ts diff --git a/packages/notifications/application/use-cases/MarkNotificationReadUseCase.ts b/core/notifications/application/use-cases/MarkNotificationReadUseCase.ts similarity index 100% rename from packages/notifications/application/use-cases/MarkNotificationReadUseCase.ts rename to core/notifications/application/use-cases/MarkNotificationReadUseCase.ts diff --git a/packages/notifications/application/use-cases/NotificationPreferencesUseCases.ts b/core/notifications/application/use-cases/NotificationPreferencesUseCases.ts similarity index 100% rename from packages/notifications/application/use-cases/NotificationPreferencesUseCases.ts rename to core/notifications/application/use-cases/NotificationPreferencesUseCases.ts diff --git a/packages/notifications/application/use-cases/SendNotificationUseCase.ts b/core/notifications/application/use-cases/SendNotificationUseCase.ts similarity index 100% rename from packages/notifications/application/use-cases/SendNotificationUseCase.ts rename to core/notifications/application/use-cases/SendNotificationUseCase.ts diff --git a/packages/notifications/domain/entities/Notification.ts b/core/notifications/domain/entities/Notification.ts similarity index 100% rename from packages/notifications/domain/entities/Notification.ts rename to core/notifications/domain/entities/Notification.ts diff --git a/packages/notifications/domain/entities/NotificationPreference.ts b/core/notifications/domain/entities/NotificationPreference.ts similarity index 100% rename from packages/notifications/domain/entities/NotificationPreference.ts rename to core/notifications/domain/entities/NotificationPreference.ts diff --git a/packages/notifications/domain/errors/NotificationDomainError.ts b/core/notifications/domain/errors/NotificationDomainError.ts similarity index 100% rename from packages/notifications/domain/errors/NotificationDomainError.ts rename to core/notifications/domain/errors/NotificationDomainError.ts diff --git a/packages/notifications/domain/repositories/INotificationPreferenceRepository.ts b/core/notifications/domain/repositories/INotificationPreferenceRepository.ts similarity index 100% rename from packages/notifications/domain/repositories/INotificationPreferenceRepository.ts rename to core/notifications/domain/repositories/INotificationPreferenceRepository.ts diff --git a/packages/notifications/domain/repositories/INotificationRepository.ts b/core/notifications/domain/repositories/INotificationRepository.ts similarity index 100% rename from packages/notifications/domain/repositories/INotificationRepository.ts rename to core/notifications/domain/repositories/INotificationRepository.ts diff --git a/packages/notifications/domain/types/NotificationTypes.ts b/core/notifications/domain/types/NotificationTypes.ts similarity index 100% rename from packages/notifications/domain/types/NotificationTypes.ts rename to core/notifications/domain/types/NotificationTypes.ts diff --git a/packages/notifications/domain/value-objects/NotificationId.ts b/core/notifications/domain/value-objects/NotificationId.ts similarity index 100% rename from packages/notifications/domain/value-objects/NotificationId.ts rename to core/notifications/domain/value-objects/NotificationId.ts diff --git a/packages/notifications/domain/value-objects/QuietHours.ts b/core/notifications/domain/value-objects/QuietHours.ts similarity index 100% rename from packages/notifications/domain/value-objects/QuietHours.ts rename to core/notifications/domain/value-objects/QuietHours.ts diff --git a/packages/notifications/infrastructure/adapters/DiscordNotificationAdapter.ts b/core/notifications/infrastructure/adapters/DiscordNotificationAdapter.ts similarity index 100% rename from packages/notifications/infrastructure/adapters/DiscordNotificationAdapter.ts rename to core/notifications/infrastructure/adapters/DiscordNotificationAdapter.ts diff --git a/packages/notifications/infrastructure/adapters/EmailNotificationAdapter.ts b/core/notifications/infrastructure/adapters/EmailNotificationAdapter.ts similarity index 100% rename from packages/notifications/infrastructure/adapters/EmailNotificationAdapter.ts rename to core/notifications/infrastructure/adapters/EmailNotificationAdapter.ts diff --git a/packages/notifications/infrastructure/adapters/InAppNotificationAdapter.ts b/core/notifications/infrastructure/adapters/InAppNotificationAdapter.ts similarity index 100% rename from packages/notifications/infrastructure/adapters/InAppNotificationAdapter.ts rename to core/notifications/infrastructure/adapters/InAppNotificationAdapter.ts diff --git a/packages/notifications/infrastructure/adapters/NotificationGatewayRegistry.ts b/core/notifications/infrastructure/adapters/NotificationGatewayRegistry.ts similarity index 100% rename from packages/notifications/infrastructure/adapters/NotificationGatewayRegistry.ts rename to core/notifications/infrastructure/adapters/NotificationGatewayRegistry.ts diff --git a/packages/notifications/infrastructure/index.ts b/core/notifications/infrastructure/index.ts similarity index 100% rename from packages/notifications/infrastructure/index.ts rename to core/notifications/infrastructure/index.ts diff --git a/packages/notifications/infrastructure/repositories/InMemoryNotificationPreferenceRepository.ts b/core/notifications/infrastructure/repositories/InMemoryNotificationPreferenceRepository.ts similarity index 100% rename from packages/notifications/infrastructure/repositories/InMemoryNotificationPreferenceRepository.ts rename to core/notifications/infrastructure/repositories/InMemoryNotificationPreferenceRepository.ts diff --git a/packages/notifications/infrastructure/repositories/InMemoryNotificationRepository.ts b/core/notifications/infrastructure/repositories/InMemoryNotificationRepository.ts similarity index 100% rename from packages/notifications/infrastructure/repositories/InMemoryNotificationRepository.ts rename to core/notifications/infrastructure/repositories/InMemoryNotificationRepository.ts diff --git a/packages/notifications/package.json b/core/notifications/package.json similarity index 100% rename from packages/notifications/package.json rename to core/notifications/package.json diff --git a/packages/racing/application/dto/ChampionshipStandingsDTO.ts b/core/racing/application/dto/ChampionshipStandingsDTO.ts similarity index 100% rename from packages/racing/application/dto/ChampionshipStandingsDTO.ts rename to core/racing/application/dto/ChampionshipStandingsDTO.ts diff --git a/packages/racing/application/dto/CreateTeamCommandDTO.ts b/core/racing/application/dto/CreateTeamCommandDTO.ts similarity index 100% rename from packages/racing/application/dto/CreateTeamCommandDTO.ts rename to core/racing/application/dto/CreateTeamCommandDTO.ts diff --git a/packages/racing/application/dto/DriverDTO.ts b/core/racing/application/dto/DriverDTO.ts similarity index 100% rename from packages/racing/application/dto/DriverDTO.ts rename to core/racing/application/dto/DriverDTO.ts diff --git a/packages/racing/application/dto/JoinLeagueCommandDTO.ts b/core/racing/application/dto/JoinLeagueCommandDTO.ts similarity index 100% rename from packages/racing/application/dto/JoinLeagueCommandDTO.ts rename to core/racing/application/dto/JoinLeagueCommandDTO.ts diff --git a/packages/racing/application/dto/LeagueConfigFormDTO.ts b/core/racing/application/dto/LeagueConfigFormDTO.ts similarity index 100% rename from packages/racing/application/dto/LeagueConfigFormDTO.ts rename to core/racing/application/dto/LeagueConfigFormDTO.ts diff --git a/packages/racing/application/dto/LeagueDTO.ts b/core/racing/application/dto/LeagueDTO.ts similarity index 100% rename from packages/racing/application/dto/LeagueDTO.ts rename to core/racing/application/dto/LeagueDTO.ts diff --git a/packages/racing/application/dto/LeagueDriverSeasonStatsDTO.ts b/core/racing/application/dto/LeagueDriverSeasonStatsDTO.ts similarity index 100% rename from packages/racing/application/dto/LeagueDriverSeasonStatsDTO.ts rename to core/racing/application/dto/LeagueDriverSeasonStatsDTO.ts diff --git a/packages/racing/application/dto/LeagueScheduleDTO.ts b/core/racing/application/dto/LeagueScheduleDTO.ts similarity index 100% rename from packages/racing/application/dto/LeagueScheduleDTO.ts rename to core/racing/application/dto/LeagueScheduleDTO.ts diff --git a/packages/racing/application/dto/LeagueScoringConfigDTO.ts b/core/racing/application/dto/LeagueScoringConfigDTO.ts similarity index 100% rename from packages/racing/application/dto/LeagueScoringConfigDTO.ts rename to core/racing/application/dto/LeagueScoringConfigDTO.ts diff --git a/packages/racing/application/dto/LeagueSummaryDTO.ts b/core/racing/application/dto/LeagueSummaryDTO.ts similarity index 100% rename from packages/racing/application/dto/LeagueSummaryDTO.ts rename to core/racing/application/dto/LeagueSummaryDTO.ts diff --git a/packages/racing/application/dto/RaceDTO.ts b/core/racing/application/dto/RaceDTO.ts similarity index 100% rename from packages/racing/application/dto/RaceDTO.ts rename to core/racing/application/dto/RaceDTO.ts diff --git a/packages/racing/application/dto/RaceRegistrationQueryDTO.ts b/core/racing/application/dto/RaceRegistrationQueryDTO.ts similarity index 100% rename from packages/racing/application/dto/RaceRegistrationQueryDTO.ts rename to core/racing/application/dto/RaceRegistrationQueryDTO.ts diff --git a/packages/racing/application/dto/RegisterForRaceCommandDTO.ts b/core/racing/application/dto/RegisterForRaceCommandDTO.ts similarity index 100% rename from packages/racing/application/dto/RegisterForRaceCommandDTO.ts rename to core/racing/application/dto/RegisterForRaceCommandDTO.ts diff --git a/packages/racing/application/dto/ResultDTO.ts b/core/racing/application/dto/ResultDTO.ts similarity index 100% rename from packages/racing/application/dto/ResultDTO.ts rename to core/racing/application/dto/ResultDTO.ts diff --git a/packages/racing/application/dto/StandingDTO.ts b/core/racing/application/dto/StandingDTO.ts similarity index 100% rename from packages/racing/application/dto/StandingDTO.ts rename to core/racing/application/dto/StandingDTO.ts diff --git a/packages/racing/application/dto/TeamCommandAndQueryDTO.ts b/core/racing/application/dto/TeamCommandAndQueryDTO.ts similarity index 100% rename from packages/racing/application/dto/TeamCommandAndQueryDTO.ts rename to core/racing/application/dto/TeamCommandAndQueryDTO.ts diff --git a/packages/racing/application/dto/WithdrawFromRaceCommandDTO.ts b/core/racing/application/dto/WithdrawFromRaceCommandDTO.ts similarity index 100% rename from packages/racing/application/dto/WithdrawFromRaceCommandDTO.ts rename to core/racing/application/dto/WithdrawFromRaceCommandDTO.ts diff --git a/packages/racing/application/errors/RacingApplicationError.ts b/core/racing/application/errors/RacingApplicationError.ts similarity index 100% rename from packages/racing/application/errors/RacingApplicationError.ts rename to core/racing/application/errors/RacingApplicationError.ts diff --git a/packages/racing/application/index.ts b/core/racing/application/index.ts similarity index 100% rename from packages/racing/application/index.ts rename to core/racing/application/index.ts diff --git a/packages/racing/application/mappers/EntityMappers.ts b/core/racing/application/mappers/EntityMappers.ts similarity index 100% rename from packages/racing/application/mappers/EntityMappers.ts rename to core/racing/application/mappers/EntityMappers.ts diff --git a/packages/racing/application/mappers/index.ts b/core/racing/application/mappers/index.ts similarity index 100% rename from packages/racing/application/mappers/index.ts rename to core/racing/application/mappers/index.ts diff --git a/packages/racing/application/ports/DriverRatingProvider.ts b/core/racing/application/ports/DriverRatingProvider.ts similarity index 100% rename from packages/racing/application/ports/DriverRatingProvider.ts rename to core/racing/application/ports/DriverRatingProvider.ts diff --git a/packages/racing/application/ports/IImageServicePort.ts b/core/racing/application/ports/IImageServicePort.ts similarity index 100% rename from packages/racing/application/ports/IImageServicePort.ts rename to core/racing/application/ports/IImageServicePort.ts diff --git a/packages/racing/application/ports/ILiveryCompositor.ts b/core/racing/application/ports/ILiveryCompositor.ts similarity index 100% rename from packages/racing/application/ports/ILiveryCompositor.ts rename to core/racing/application/ports/ILiveryCompositor.ts diff --git a/packages/racing/application/ports/ILiveryStorage.ts b/core/racing/application/ports/ILiveryStorage.ts similarity index 100% rename from packages/racing/application/ports/ILiveryStorage.ts rename to core/racing/application/ports/ILiveryStorage.ts diff --git a/packages/racing/application/ports/IPaymentGateway.ts b/core/racing/application/ports/IPaymentGateway.ts similarity index 100% rename from packages/racing/application/ports/IPaymentGateway.ts rename to core/racing/application/ports/IPaymentGateway.ts diff --git a/packages/racing/application/ports/LeagueScoringPresetProvider.ts b/core/racing/application/ports/LeagueScoringPresetProvider.ts similarity index 100% rename from packages/racing/application/ports/LeagueScoringPresetProvider.ts rename to core/racing/application/ports/LeagueScoringPresetProvider.ts diff --git a/packages/racing/application/presenters/IAllLeaguesWithCapacityAndScoringPresenter.ts b/core/racing/application/presenters/IAllLeaguesWithCapacityAndScoringPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IAllLeaguesWithCapacityAndScoringPresenter.ts rename to core/racing/application/presenters/IAllLeaguesWithCapacityAndScoringPresenter.ts diff --git a/packages/racing/application/presenters/IAllLeaguesWithCapacityPresenter.ts b/core/racing/application/presenters/IAllLeaguesWithCapacityPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IAllLeaguesWithCapacityPresenter.ts rename to core/racing/application/presenters/IAllLeaguesWithCapacityPresenter.ts diff --git a/packages/racing/application/presenters/IAllRacesPagePresenter.ts b/core/racing/application/presenters/IAllRacesPagePresenter.ts similarity index 100% rename from packages/racing/application/presenters/IAllRacesPagePresenter.ts rename to core/racing/application/presenters/IAllRacesPagePresenter.ts diff --git a/packages/racing/application/presenters/IAllTeamsPresenter.ts b/core/racing/application/presenters/IAllTeamsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IAllTeamsPresenter.ts rename to core/racing/application/presenters/IAllTeamsPresenter.ts diff --git a/packages/racing/application/presenters/IDashboardOverviewPresenter.ts b/core/racing/application/presenters/IDashboardOverviewPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IDashboardOverviewPresenter.ts rename to core/racing/application/presenters/IDashboardOverviewPresenter.ts diff --git a/packages/racing/application/presenters/IDriverRegistrationStatusPresenter.ts b/core/racing/application/presenters/IDriverRegistrationStatusPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IDriverRegistrationStatusPresenter.ts rename to core/racing/application/presenters/IDriverRegistrationStatusPresenter.ts diff --git a/packages/racing/application/presenters/IDriverTeamPresenter.ts b/core/racing/application/presenters/IDriverTeamPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IDriverTeamPresenter.ts rename to core/racing/application/presenters/IDriverTeamPresenter.ts diff --git a/packages/racing/application/presenters/IDriversLeaderboardPresenter.ts b/core/racing/application/presenters/IDriversLeaderboardPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IDriversLeaderboardPresenter.ts rename to core/racing/application/presenters/IDriversLeaderboardPresenter.ts diff --git a/packages/racing/application/presenters/IEntitySponsorshipPricingPresenter.ts b/core/racing/application/presenters/IEntitySponsorshipPricingPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IEntitySponsorshipPricingPresenter.ts rename to core/racing/application/presenters/IEntitySponsorshipPricingPresenter.ts diff --git a/packages/racing/application/presenters/IImportRaceResultsPresenter.ts b/core/racing/application/presenters/IImportRaceResultsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IImportRaceResultsPresenter.ts rename to core/racing/application/presenters/IImportRaceResultsPresenter.ts diff --git a/packages/racing/application/presenters/ILeagueDriverSeasonStatsPresenter.ts b/core/racing/application/presenters/ILeagueDriverSeasonStatsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ILeagueDriverSeasonStatsPresenter.ts rename to core/racing/application/presenters/ILeagueDriverSeasonStatsPresenter.ts diff --git a/packages/racing/application/presenters/ILeagueFullConfigPresenter.ts b/core/racing/application/presenters/ILeagueFullConfigPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ILeagueFullConfigPresenter.ts rename to core/racing/application/presenters/ILeagueFullConfigPresenter.ts diff --git a/packages/racing/application/presenters/ILeagueSchedulePreviewPresenter.ts b/core/racing/application/presenters/ILeagueSchedulePreviewPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ILeagueSchedulePreviewPresenter.ts rename to core/racing/application/presenters/ILeagueSchedulePreviewPresenter.ts diff --git a/packages/racing/application/presenters/ILeagueScoringConfigPresenter.ts b/core/racing/application/presenters/ILeagueScoringConfigPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ILeagueScoringConfigPresenter.ts rename to core/racing/application/presenters/ILeagueScoringConfigPresenter.ts diff --git a/packages/racing/application/presenters/ILeagueScoringPresetsPresenter.ts b/core/racing/application/presenters/ILeagueScoringPresetsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ILeagueScoringPresetsPresenter.ts rename to core/racing/application/presenters/ILeagueScoringPresetsPresenter.ts diff --git a/packages/racing/application/presenters/ILeagueStandingsPresenter.ts b/core/racing/application/presenters/ILeagueStandingsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ILeagueStandingsPresenter.ts rename to core/racing/application/presenters/ILeagueStandingsPresenter.ts diff --git a/packages/racing/application/presenters/ILeagueStatsPresenter.ts b/core/racing/application/presenters/ILeagueStatsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ILeagueStatsPresenter.ts rename to core/racing/application/presenters/ILeagueStatsPresenter.ts diff --git a/packages/racing/application/presenters/IPendingSponsorshipRequestsPresenter.ts b/core/racing/application/presenters/IPendingSponsorshipRequestsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IPendingSponsorshipRequestsPresenter.ts rename to core/racing/application/presenters/IPendingSponsorshipRequestsPresenter.ts diff --git a/packages/racing/application/presenters/IProfileOverviewPresenter.ts b/core/racing/application/presenters/IProfileOverviewPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IProfileOverviewPresenter.ts rename to core/racing/application/presenters/IProfileOverviewPresenter.ts diff --git a/packages/racing/application/presenters/IRaceDetailPresenter.ts b/core/racing/application/presenters/IRaceDetailPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IRaceDetailPresenter.ts rename to core/racing/application/presenters/IRaceDetailPresenter.ts diff --git a/packages/racing/application/presenters/IRacePenaltiesPresenter.ts b/core/racing/application/presenters/IRacePenaltiesPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IRacePenaltiesPresenter.ts rename to core/racing/application/presenters/IRacePenaltiesPresenter.ts diff --git a/packages/racing/application/presenters/IRaceProtestsPresenter.ts b/core/racing/application/presenters/IRaceProtestsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IRaceProtestsPresenter.ts rename to core/racing/application/presenters/IRaceProtestsPresenter.ts diff --git a/packages/racing/application/presenters/IRaceRegistrationsPresenter.ts b/core/racing/application/presenters/IRaceRegistrationsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IRaceRegistrationsPresenter.ts rename to core/racing/application/presenters/IRaceRegistrationsPresenter.ts diff --git a/packages/racing/application/presenters/IRaceResultsDetailPresenter.ts b/core/racing/application/presenters/IRaceResultsDetailPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IRaceResultsDetailPresenter.ts rename to core/racing/application/presenters/IRaceResultsDetailPresenter.ts diff --git a/packages/racing/application/presenters/IRaceWithSOFPresenter.ts b/core/racing/application/presenters/IRaceWithSOFPresenter.ts similarity index 100% rename from packages/racing/application/presenters/IRaceWithSOFPresenter.ts rename to core/racing/application/presenters/IRaceWithSOFPresenter.ts diff --git a/packages/racing/application/presenters/IRacesPagePresenter.ts b/core/racing/application/presenters/IRacesPagePresenter.ts similarity index 100% rename from packages/racing/application/presenters/IRacesPagePresenter.ts rename to core/racing/application/presenters/IRacesPagePresenter.ts diff --git a/packages/racing/application/presenters/ISponsorDashboardPresenter.ts b/core/racing/application/presenters/ISponsorDashboardPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ISponsorDashboardPresenter.ts rename to core/racing/application/presenters/ISponsorDashboardPresenter.ts diff --git a/packages/racing/application/presenters/ISponsorSponsorshipsPresenter.ts b/core/racing/application/presenters/ISponsorSponsorshipsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ISponsorSponsorshipsPresenter.ts rename to core/racing/application/presenters/ISponsorSponsorshipsPresenter.ts diff --git a/packages/racing/application/presenters/ITeamDetailsPresenter.ts b/core/racing/application/presenters/ITeamDetailsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ITeamDetailsPresenter.ts rename to core/racing/application/presenters/ITeamDetailsPresenter.ts diff --git a/packages/racing/application/presenters/ITeamJoinRequestsPresenter.ts b/core/racing/application/presenters/ITeamJoinRequestsPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ITeamJoinRequestsPresenter.ts rename to core/racing/application/presenters/ITeamJoinRequestsPresenter.ts diff --git a/packages/racing/application/presenters/ITeamMembersPresenter.ts b/core/racing/application/presenters/ITeamMembersPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ITeamMembersPresenter.ts rename to core/racing/application/presenters/ITeamMembersPresenter.ts diff --git a/packages/racing/application/presenters/ITeamsLeaderboardPresenter.ts b/core/racing/application/presenters/ITeamsLeaderboardPresenter.ts similarity index 100% rename from packages/racing/application/presenters/ITeamsLeaderboardPresenter.ts rename to core/racing/application/presenters/ITeamsLeaderboardPresenter.ts diff --git a/packages/racing/application/use-cases/AcceptSponsorshipRequestUseCase.ts b/core/racing/application/use-cases/AcceptSponsorshipRequestUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/AcceptSponsorshipRequestUseCase.ts rename to core/racing/application/use-cases/AcceptSponsorshipRequestUseCase.ts diff --git a/packages/racing/application/use-cases/ApplyForSponsorshipUseCase.ts b/core/racing/application/use-cases/ApplyForSponsorshipUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/ApplyForSponsorshipUseCase.ts rename to core/racing/application/use-cases/ApplyForSponsorshipUseCase.ts diff --git a/packages/racing/application/use-cases/ApplyPenaltyUseCase.ts b/core/racing/application/use-cases/ApplyPenaltyUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/ApplyPenaltyUseCase.ts rename to core/racing/application/use-cases/ApplyPenaltyUseCase.ts diff --git a/packages/racing/application/use-cases/ApproveTeamJoinRequestUseCase.ts b/core/racing/application/use-cases/ApproveTeamJoinRequestUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/ApproveTeamJoinRequestUseCase.ts rename to core/racing/application/use-cases/ApproveTeamJoinRequestUseCase.ts diff --git a/packages/racing/application/use-cases/CancelRaceUseCase.ts b/core/racing/application/use-cases/CancelRaceUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/CancelRaceUseCase.ts rename to core/racing/application/use-cases/CancelRaceUseCase.ts diff --git a/packages/racing/application/use-cases/CloseRaceEventStewardingUseCase.ts b/core/racing/application/use-cases/CloseRaceEventStewardingUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/CloseRaceEventStewardingUseCase.ts rename to core/racing/application/use-cases/CloseRaceEventStewardingUseCase.ts diff --git a/packages/racing/application/use-cases/CompleteRaceUseCase.ts b/core/racing/application/use-cases/CompleteRaceUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/CompleteRaceUseCase.ts rename to core/racing/application/use-cases/CompleteRaceUseCase.ts diff --git a/packages/racing/application/use-cases/CompleteRaceUseCaseWithRatings.ts b/core/racing/application/use-cases/CompleteRaceUseCaseWithRatings.ts similarity index 100% rename from packages/racing/application/use-cases/CompleteRaceUseCaseWithRatings.ts rename to core/racing/application/use-cases/CompleteRaceUseCaseWithRatings.ts diff --git a/packages/racing/application/use-cases/CreateLeagueWithSeasonAndScoringUseCase.ts b/core/racing/application/use-cases/CreateLeagueWithSeasonAndScoringUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/CreateLeagueWithSeasonAndScoringUseCase.ts rename to core/racing/application/use-cases/CreateLeagueWithSeasonAndScoringUseCase.ts diff --git a/packages/racing/application/use-cases/CreateTeamUseCase.ts b/core/racing/application/use-cases/CreateTeamUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/CreateTeamUseCase.ts rename to core/racing/application/use-cases/CreateTeamUseCase.ts diff --git a/packages/racing/application/use-cases/FileProtestUseCase.ts b/core/racing/application/use-cases/FileProtestUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/FileProtestUseCase.ts rename to core/racing/application/use-cases/FileProtestUseCase.ts diff --git a/packages/racing/application/use-cases/GetAllLeaguesWithCapacityAndScoringUseCase.ts b/core/racing/application/use-cases/GetAllLeaguesWithCapacityAndScoringUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetAllLeaguesWithCapacityAndScoringUseCase.ts rename to core/racing/application/use-cases/GetAllLeaguesWithCapacityAndScoringUseCase.ts diff --git a/packages/racing/application/use-cases/GetAllLeaguesWithCapacityUseCase.ts b/core/racing/application/use-cases/GetAllLeaguesWithCapacityUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetAllLeaguesWithCapacityUseCase.ts rename to core/racing/application/use-cases/GetAllLeaguesWithCapacityUseCase.ts diff --git a/packages/racing/application/use-cases/GetAllRacesPageDataUseCase.ts b/core/racing/application/use-cases/GetAllRacesPageDataUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetAllRacesPageDataUseCase.ts rename to core/racing/application/use-cases/GetAllRacesPageDataUseCase.ts diff --git a/packages/racing/application/use-cases/GetAllTeamsUseCase.ts b/core/racing/application/use-cases/GetAllTeamsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetAllTeamsUseCase.ts rename to core/racing/application/use-cases/GetAllTeamsUseCase.ts diff --git a/packages/racing/application/use-cases/GetDashboardOverviewUseCase.ts b/core/racing/application/use-cases/GetDashboardOverviewUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetDashboardOverviewUseCase.ts rename to core/racing/application/use-cases/GetDashboardOverviewUseCase.ts diff --git a/packages/racing/application/use-cases/GetDriverTeamUseCase.ts b/core/racing/application/use-cases/GetDriverTeamUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetDriverTeamUseCase.ts rename to core/racing/application/use-cases/GetDriverTeamUseCase.ts diff --git a/packages/racing/application/use-cases/GetDriversLeaderboardUseCase.ts b/core/racing/application/use-cases/GetDriversLeaderboardUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetDriversLeaderboardUseCase.ts rename to core/racing/application/use-cases/GetDriversLeaderboardUseCase.ts diff --git a/packages/racing/application/use-cases/GetEntitySponsorshipPricingUseCase.ts b/core/racing/application/use-cases/GetEntitySponsorshipPricingUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetEntitySponsorshipPricingUseCase.ts rename to core/racing/application/use-cases/GetEntitySponsorshipPricingUseCase.ts diff --git a/packages/racing/application/use-cases/GetLeagueDriverSeasonStatsUseCase.ts b/core/racing/application/use-cases/GetLeagueDriverSeasonStatsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetLeagueDriverSeasonStatsUseCase.ts rename to core/racing/application/use-cases/GetLeagueDriverSeasonStatsUseCase.ts diff --git a/packages/racing/application/use-cases/GetLeagueFullConfigUseCase.ts b/core/racing/application/use-cases/GetLeagueFullConfigUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetLeagueFullConfigUseCase.ts rename to core/racing/application/use-cases/GetLeagueFullConfigUseCase.ts diff --git a/packages/racing/application/use-cases/GetLeagueScoringConfigUseCase.ts b/core/racing/application/use-cases/GetLeagueScoringConfigUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetLeagueScoringConfigUseCase.ts rename to core/racing/application/use-cases/GetLeagueScoringConfigUseCase.ts diff --git a/packages/racing/application/use-cases/GetLeagueStandingsUseCase.ts b/core/racing/application/use-cases/GetLeagueStandingsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetLeagueStandingsUseCase.ts rename to core/racing/application/use-cases/GetLeagueStandingsUseCase.ts diff --git a/packages/racing/application/use-cases/GetLeagueStatsUseCase.ts b/core/racing/application/use-cases/GetLeagueStatsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetLeagueStatsUseCase.ts rename to core/racing/application/use-cases/GetLeagueStatsUseCase.ts diff --git a/packages/racing/application/use-cases/GetPendingSponsorshipRequestsUseCase.ts b/core/racing/application/use-cases/GetPendingSponsorshipRequestsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetPendingSponsorshipRequestsUseCase.ts rename to core/racing/application/use-cases/GetPendingSponsorshipRequestsUseCase.ts diff --git a/packages/racing/application/use-cases/GetProfileOverviewUseCase.ts b/core/racing/application/use-cases/GetProfileOverviewUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetProfileOverviewUseCase.ts rename to core/racing/application/use-cases/GetProfileOverviewUseCase.ts diff --git a/packages/racing/application/use-cases/GetRaceDetailUseCase.ts b/core/racing/application/use-cases/GetRaceDetailUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetRaceDetailUseCase.ts rename to core/racing/application/use-cases/GetRaceDetailUseCase.ts diff --git a/packages/racing/application/use-cases/GetRacePenaltiesUseCase.ts b/core/racing/application/use-cases/GetRacePenaltiesUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetRacePenaltiesUseCase.ts rename to core/racing/application/use-cases/GetRacePenaltiesUseCase.ts diff --git a/packages/racing/application/use-cases/GetRaceProtestsUseCase.ts b/core/racing/application/use-cases/GetRaceProtestsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetRaceProtestsUseCase.ts rename to core/racing/application/use-cases/GetRaceProtestsUseCase.ts diff --git a/packages/racing/application/use-cases/GetRaceRegistrationsUseCase.ts b/core/racing/application/use-cases/GetRaceRegistrationsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetRaceRegistrationsUseCase.ts rename to core/racing/application/use-cases/GetRaceRegistrationsUseCase.ts diff --git a/packages/racing/application/use-cases/GetRaceResultsDetailUseCase.ts b/core/racing/application/use-cases/GetRaceResultsDetailUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetRaceResultsDetailUseCase.ts rename to core/racing/application/use-cases/GetRaceResultsDetailUseCase.ts diff --git a/packages/racing/application/use-cases/GetRaceWithSOFUseCase.ts b/core/racing/application/use-cases/GetRaceWithSOFUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetRaceWithSOFUseCase.ts rename to core/racing/application/use-cases/GetRaceWithSOFUseCase.ts diff --git a/packages/racing/application/use-cases/GetRacesPageDataUseCase.ts b/core/racing/application/use-cases/GetRacesPageDataUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetRacesPageDataUseCase.ts rename to core/racing/application/use-cases/GetRacesPageDataUseCase.ts diff --git a/packages/racing/application/use-cases/GetSponsorDashboardUseCase.ts b/core/racing/application/use-cases/GetSponsorDashboardUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetSponsorDashboardUseCase.ts rename to core/racing/application/use-cases/GetSponsorDashboardUseCase.ts diff --git a/packages/racing/application/use-cases/GetSponsorSponsorshipsUseCase.ts b/core/racing/application/use-cases/GetSponsorSponsorshipsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetSponsorSponsorshipsUseCase.ts rename to core/racing/application/use-cases/GetSponsorSponsorshipsUseCase.ts diff --git a/packages/racing/application/use-cases/GetTeamDetailsUseCase.ts b/core/racing/application/use-cases/GetTeamDetailsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetTeamDetailsUseCase.ts rename to core/racing/application/use-cases/GetTeamDetailsUseCase.ts diff --git a/packages/racing/application/use-cases/GetTeamJoinRequestsUseCase.ts b/core/racing/application/use-cases/GetTeamJoinRequestsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetTeamJoinRequestsUseCase.ts rename to core/racing/application/use-cases/GetTeamJoinRequestsUseCase.ts diff --git a/packages/racing/application/use-cases/GetTeamMembersUseCase.ts b/core/racing/application/use-cases/GetTeamMembersUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetTeamMembersUseCase.ts rename to core/racing/application/use-cases/GetTeamMembersUseCase.ts diff --git a/packages/racing/application/use-cases/GetTeamsLeaderboardUseCase.ts b/core/racing/application/use-cases/GetTeamsLeaderboardUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/GetTeamsLeaderboardUseCase.ts rename to core/racing/application/use-cases/GetTeamsLeaderboardUseCase.ts diff --git a/packages/racing/application/use-cases/ImportRaceResultsUseCase.ts b/core/racing/application/use-cases/ImportRaceResultsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/ImportRaceResultsUseCase.ts rename to core/racing/application/use-cases/ImportRaceResultsUseCase.ts diff --git a/packages/racing/application/use-cases/IsDriverRegisteredForRaceUseCase.ts b/core/racing/application/use-cases/IsDriverRegisteredForRaceUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/IsDriverRegisteredForRaceUseCase.ts rename to core/racing/application/use-cases/IsDriverRegisteredForRaceUseCase.ts diff --git a/packages/racing/application/use-cases/JoinLeagueUseCase.ts b/core/racing/application/use-cases/JoinLeagueUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/JoinLeagueUseCase.ts rename to core/racing/application/use-cases/JoinLeagueUseCase.ts diff --git a/packages/racing/application/use-cases/JoinTeamUseCase.ts b/core/racing/application/use-cases/JoinTeamUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/JoinTeamUseCase.ts rename to core/racing/application/use-cases/JoinTeamUseCase.ts diff --git a/packages/racing/application/use-cases/LeaveTeamUseCase.ts b/core/racing/application/use-cases/LeaveTeamUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/LeaveTeamUseCase.ts rename to core/racing/application/use-cases/LeaveTeamUseCase.ts diff --git a/packages/racing/application/use-cases/ListLeagueScoringPresetsUseCase.ts b/core/racing/application/use-cases/ListLeagueScoringPresetsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/ListLeagueScoringPresetsUseCase.ts rename to core/racing/application/use-cases/ListLeagueScoringPresetsUseCase.ts diff --git a/packages/racing/application/use-cases/PreviewLeagueScheduleUseCase.ts b/core/racing/application/use-cases/PreviewLeagueScheduleUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/PreviewLeagueScheduleUseCase.ts rename to core/racing/application/use-cases/PreviewLeagueScheduleUseCase.ts diff --git a/packages/racing/application/use-cases/QuickPenaltyUseCase.ts b/core/racing/application/use-cases/QuickPenaltyUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/QuickPenaltyUseCase.ts rename to core/racing/application/use-cases/QuickPenaltyUseCase.ts diff --git a/packages/racing/application/use-cases/RecalculateChampionshipStandingsUseCase.ts b/core/racing/application/use-cases/RecalculateChampionshipStandingsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/RecalculateChampionshipStandingsUseCase.ts rename to core/racing/application/use-cases/RecalculateChampionshipStandingsUseCase.ts diff --git a/packages/racing/application/use-cases/RegisterForRaceUseCase.ts b/core/racing/application/use-cases/RegisterForRaceUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/RegisterForRaceUseCase.ts rename to core/racing/application/use-cases/RegisterForRaceUseCase.ts diff --git a/packages/racing/application/use-cases/RejectSponsorshipRequestUseCase.ts b/core/racing/application/use-cases/RejectSponsorshipRequestUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/RejectSponsorshipRequestUseCase.ts rename to core/racing/application/use-cases/RejectSponsorshipRequestUseCase.ts diff --git a/packages/racing/application/use-cases/RejectTeamJoinRequestUseCase.ts b/core/racing/application/use-cases/RejectTeamJoinRequestUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/RejectTeamJoinRequestUseCase.ts rename to core/racing/application/use-cases/RejectTeamJoinRequestUseCase.ts diff --git a/packages/racing/application/use-cases/RequestProtestDefenseUseCase.ts b/core/racing/application/use-cases/RequestProtestDefenseUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/RequestProtestDefenseUseCase.ts rename to core/racing/application/use-cases/RequestProtestDefenseUseCase.ts diff --git a/packages/racing/application/use-cases/ReviewProtestUseCase.ts b/core/racing/application/use-cases/ReviewProtestUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/ReviewProtestUseCase.ts rename to core/racing/application/use-cases/ReviewProtestUseCase.ts diff --git a/packages/racing/application/use-cases/SeasonUseCases.ts b/core/racing/application/use-cases/SeasonUseCases.ts similarity index 100% rename from packages/racing/application/use-cases/SeasonUseCases.ts rename to core/racing/application/use-cases/SeasonUseCases.ts diff --git a/packages/racing/application/use-cases/SendFinalResultsUseCase.ts b/core/racing/application/use-cases/SendFinalResultsUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/SendFinalResultsUseCase.ts rename to core/racing/application/use-cases/SendFinalResultsUseCase.ts diff --git a/packages/racing/application/use-cases/SendPerformanceSummaryUseCase.ts b/core/racing/application/use-cases/SendPerformanceSummaryUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/SendPerformanceSummaryUseCase.ts rename to core/racing/application/use-cases/SendPerformanceSummaryUseCase.ts diff --git a/packages/racing/application/use-cases/SubmitProtestDefenseUseCase.ts b/core/racing/application/use-cases/SubmitProtestDefenseUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/SubmitProtestDefenseUseCase.ts rename to core/racing/application/use-cases/SubmitProtestDefenseUseCase.ts diff --git a/packages/racing/application/use-cases/TransferLeagueOwnershipUseCase.ts b/core/racing/application/use-cases/TransferLeagueOwnershipUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/TransferLeagueOwnershipUseCase.ts rename to core/racing/application/use-cases/TransferLeagueOwnershipUseCase.ts diff --git a/packages/racing/application/use-cases/UpdateDriverProfileUseCase.ts b/core/racing/application/use-cases/UpdateDriverProfileUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/UpdateDriverProfileUseCase.ts rename to core/racing/application/use-cases/UpdateDriverProfileUseCase.ts diff --git a/packages/racing/application/use-cases/UpdateTeamUseCase.ts b/core/racing/application/use-cases/UpdateTeamUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/UpdateTeamUseCase.ts rename to core/racing/application/use-cases/UpdateTeamUseCase.ts diff --git a/packages/racing/application/use-cases/WithdrawFromRaceUseCase.ts b/core/racing/application/use-cases/WithdrawFromRaceUseCase.ts similarity index 100% rename from packages/racing/application/use-cases/WithdrawFromRaceUseCase.ts rename to core/racing/application/use-cases/WithdrawFromRaceUseCase.ts diff --git a/packages/racing/application/use-cases/index.ts b/core/racing/application/use-cases/index.ts similarity index 100% rename from packages/racing/application/use-cases/index.ts rename to core/racing/application/use-cases/index.ts diff --git a/packages/racing/application/utils/RaceResultGenerator.ts b/core/racing/application/utils/RaceResultGenerator.ts similarity index 100% rename from packages/racing/application/utils/RaceResultGenerator.ts rename to core/racing/application/utils/RaceResultGenerator.ts diff --git a/packages/racing/application/utils/RaceResultGeneratorWithIncidents.ts b/core/racing/application/utils/RaceResultGeneratorWithIncidents.ts similarity index 100% rename from packages/racing/application/utils/RaceResultGeneratorWithIncidents.ts rename to core/racing/application/utils/RaceResultGeneratorWithIncidents.ts diff --git a/packages/racing/domain/entities/Car.ts b/core/racing/domain/entities/Car.ts similarity index 100% rename from packages/racing/domain/entities/Car.ts rename to core/racing/domain/entities/Car.ts diff --git a/packages/racing/domain/entities/ChampionshipStanding.ts b/core/racing/domain/entities/ChampionshipStanding.ts similarity index 100% rename from packages/racing/domain/entities/ChampionshipStanding.ts rename to core/racing/domain/entities/ChampionshipStanding.ts diff --git a/packages/racing/domain/entities/Driver.ts b/core/racing/domain/entities/Driver.ts similarity index 100% rename from packages/racing/domain/entities/Driver.ts rename to core/racing/domain/entities/Driver.ts diff --git a/packages/racing/domain/entities/DriverLivery.ts b/core/racing/domain/entities/DriverLivery.ts similarity index 100% rename from packages/racing/domain/entities/DriverLivery.ts rename to core/racing/domain/entities/DriverLivery.ts diff --git a/packages/racing/domain/entities/Game.ts b/core/racing/domain/entities/Game.ts similarity index 100% rename from packages/racing/domain/entities/Game.ts rename to core/racing/domain/entities/Game.ts diff --git a/packages/racing/domain/entities/League.ts b/core/racing/domain/entities/League.ts similarity index 100% rename from packages/racing/domain/entities/League.ts rename to core/racing/domain/entities/League.ts diff --git a/packages/racing/domain/entities/LeagueMembership.ts b/core/racing/domain/entities/LeagueMembership.ts similarity index 100% rename from packages/racing/domain/entities/LeagueMembership.ts rename to core/racing/domain/entities/LeagueMembership.ts diff --git a/packages/racing/domain/entities/LeagueScoringConfig.ts b/core/racing/domain/entities/LeagueScoringConfig.ts similarity index 100% rename from packages/racing/domain/entities/LeagueScoringConfig.ts rename to core/racing/domain/entities/LeagueScoringConfig.ts diff --git a/packages/racing/domain/entities/LeagueWallet.ts b/core/racing/domain/entities/LeagueWallet.ts similarity index 100% rename from packages/racing/domain/entities/LeagueWallet.ts rename to core/racing/domain/entities/LeagueWallet.ts diff --git a/packages/racing/domain/entities/LiveryTemplate.ts b/core/racing/domain/entities/LiveryTemplate.ts similarity index 100% rename from packages/racing/domain/entities/LiveryTemplate.ts rename to core/racing/domain/entities/LiveryTemplate.ts diff --git a/packages/racing/domain/entities/Penalty.ts b/core/racing/domain/entities/Penalty.ts similarity index 100% rename from packages/racing/domain/entities/Penalty.ts rename to core/racing/domain/entities/Penalty.ts diff --git a/packages/racing/domain/entities/Prize.ts b/core/racing/domain/entities/Prize.ts similarity index 100% rename from packages/racing/domain/entities/Prize.ts rename to core/racing/domain/entities/Prize.ts diff --git a/packages/racing/domain/entities/Protest.ts b/core/racing/domain/entities/Protest.ts similarity index 100% rename from packages/racing/domain/entities/Protest.ts rename to core/racing/domain/entities/Protest.ts diff --git a/packages/racing/domain/entities/Race.ts b/core/racing/domain/entities/Race.ts similarity index 100% rename from packages/racing/domain/entities/Race.ts rename to core/racing/domain/entities/Race.ts diff --git a/packages/racing/domain/entities/RaceEvent.ts b/core/racing/domain/entities/RaceEvent.ts similarity index 100% rename from packages/racing/domain/entities/RaceEvent.ts rename to core/racing/domain/entities/RaceEvent.ts diff --git a/packages/racing/domain/entities/RaceRegistration.ts b/core/racing/domain/entities/RaceRegistration.ts similarity index 100% rename from packages/racing/domain/entities/RaceRegistration.ts rename to core/racing/domain/entities/RaceRegistration.ts diff --git a/packages/racing/domain/entities/Result.ts b/core/racing/domain/entities/Result.ts similarity index 100% rename from packages/racing/domain/entities/Result.ts rename to core/racing/domain/entities/Result.ts diff --git a/packages/racing/domain/entities/ResultWithIncidents.ts b/core/racing/domain/entities/ResultWithIncidents.ts similarity index 100% rename from packages/racing/domain/entities/ResultWithIncidents.ts rename to core/racing/domain/entities/ResultWithIncidents.ts diff --git a/packages/racing/domain/entities/Season.ts b/core/racing/domain/entities/Season.ts similarity index 100% rename from packages/racing/domain/entities/Season.ts rename to core/racing/domain/entities/Season.ts diff --git a/packages/racing/domain/entities/SeasonSponsorship.ts b/core/racing/domain/entities/SeasonSponsorship.ts similarity index 100% rename from packages/racing/domain/entities/SeasonSponsorship.ts rename to core/racing/domain/entities/SeasonSponsorship.ts diff --git a/packages/racing/domain/entities/Session.ts b/core/racing/domain/entities/Session.ts similarity index 100% rename from packages/racing/domain/entities/Session.ts rename to core/racing/domain/entities/Session.ts diff --git a/packages/racing/domain/entities/Sponsor.ts b/core/racing/domain/entities/Sponsor.ts similarity index 100% rename from packages/racing/domain/entities/Sponsor.ts rename to core/racing/domain/entities/Sponsor.ts diff --git a/packages/racing/domain/entities/SponsorshipRequest.ts b/core/racing/domain/entities/SponsorshipRequest.ts similarity index 100% rename from packages/racing/domain/entities/SponsorshipRequest.ts rename to core/racing/domain/entities/SponsorshipRequest.ts diff --git a/packages/racing/domain/entities/Standing.ts b/core/racing/domain/entities/Standing.ts similarity index 100% rename from packages/racing/domain/entities/Standing.ts rename to core/racing/domain/entities/Standing.ts diff --git a/packages/racing/domain/entities/Team.ts b/core/racing/domain/entities/Team.ts similarity index 100% rename from packages/racing/domain/entities/Team.ts rename to core/racing/domain/entities/Team.ts diff --git a/packages/racing/domain/entities/Track.ts b/core/racing/domain/entities/Track.ts similarity index 100% rename from packages/racing/domain/entities/Track.ts rename to core/racing/domain/entities/Track.ts diff --git a/packages/racing/domain/entities/Transaction.ts b/core/racing/domain/entities/Transaction.ts similarity index 100% rename from packages/racing/domain/entities/Transaction.ts rename to core/racing/domain/entities/Transaction.ts diff --git a/packages/racing/domain/errors/RacingDomainError.ts b/core/racing/domain/errors/RacingDomainError.ts similarity index 100% rename from packages/racing/domain/errors/RacingDomainError.ts rename to core/racing/domain/errors/RacingDomainError.ts diff --git a/packages/racing/domain/events/MainRaceCompleted.ts b/core/racing/domain/events/MainRaceCompleted.ts similarity index 100% rename from packages/racing/domain/events/MainRaceCompleted.ts rename to core/racing/domain/events/MainRaceCompleted.ts diff --git a/packages/racing/domain/events/RaceEventStewardingClosed.ts b/core/racing/domain/events/RaceEventStewardingClosed.ts similarity index 100% rename from packages/racing/domain/events/RaceEventStewardingClosed.ts rename to core/racing/domain/events/RaceEventStewardingClosed.ts diff --git a/packages/racing/domain/repositories/ICarRepository.ts b/core/racing/domain/repositories/ICarRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ICarRepository.ts rename to core/racing/domain/repositories/ICarRepository.ts diff --git a/packages/racing/domain/repositories/IChampionshipStandingRepository.ts b/core/racing/domain/repositories/IChampionshipStandingRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IChampionshipStandingRepository.ts rename to core/racing/domain/repositories/IChampionshipStandingRepository.ts diff --git a/packages/racing/domain/repositories/IDriverRepository.ts b/core/racing/domain/repositories/IDriverRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IDriverRepository.ts rename to core/racing/domain/repositories/IDriverRepository.ts diff --git a/packages/racing/domain/repositories/IGameRepository.ts b/core/racing/domain/repositories/IGameRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IGameRepository.ts rename to core/racing/domain/repositories/IGameRepository.ts diff --git a/packages/racing/domain/repositories/ILeagueMembershipRepository.ts b/core/racing/domain/repositories/ILeagueMembershipRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ILeagueMembershipRepository.ts rename to core/racing/domain/repositories/ILeagueMembershipRepository.ts diff --git a/packages/racing/domain/repositories/ILeagueRepository.ts b/core/racing/domain/repositories/ILeagueRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ILeagueRepository.ts rename to core/racing/domain/repositories/ILeagueRepository.ts diff --git a/packages/racing/domain/repositories/ILeagueScoringConfigRepository.ts b/core/racing/domain/repositories/ILeagueScoringConfigRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ILeagueScoringConfigRepository.ts rename to core/racing/domain/repositories/ILeagueScoringConfigRepository.ts diff --git a/packages/racing/domain/repositories/ILeagueWalletRepository.ts b/core/racing/domain/repositories/ILeagueWalletRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ILeagueWalletRepository.ts rename to core/racing/domain/repositories/ILeagueWalletRepository.ts diff --git a/packages/racing/domain/repositories/ILiveryRepository.ts b/core/racing/domain/repositories/ILiveryRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ILiveryRepository.ts rename to core/racing/domain/repositories/ILiveryRepository.ts diff --git a/packages/racing/domain/repositories/IPenaltyRepository.ts b/core/racing/domain/repositories/IPenaltyRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IPenaltyRepository.ts rename to core/racing/domain/repositories/IPenaltyRepository.ts diff --git a/packages/racing/domain/repositories/IPrizeRepository.ts b/core/racing/domain/repositories/IPrizeRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IPrizeRepository.ts rename to core/racing/domain/repositories/IPrizeRepository.ts diff --git a/packages/racing/domain/repositories/IProtestRepository.ts b/core/racing/domain/repositories/IProtestRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IProtestRepository.ts rename to core/racing/domain/repositories/IProtestRepository.ts diff --git a/packages/racing/domain/repositories/IRaceEventRepository.ts b/core/racing/domain/repositories/IRaceEventRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IRaceEventRepository.ts rename to core/racing/domain/repositories/IRaceEventRepository.ts diff --git a/packages/racing/domain/repositories/IRaceRegistrationRepository.ts b/core/racing/domain/repositories/IRaceRegistrationRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IRaceRegistrationRepository.ts rename to core/racing/domain/repositories/IRaceRegistrationRepository.ts diff --git a/packages/racing/domain/repositories/IRaceRepository.ts b/core/racing/domain/repositories/IRaceRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IRaceRepository.ts rename to core/racing/domain/repositories/IRaceRepository.ts diff --git a/packages/racing/domain/repositories/IResultRepository.ts b/core/racing/domain/repositories/IResultRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IResultRepository.ts rename to core/racing/domain/repositories/IResultRepository.ts diff --git a/packages/racing/domain/repositories/ISeasonRepository.ts b/core/racing/domain/repositories/ISeasonRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ISeasonRepository.ts rename to core/racing/domain/repositories/ISeasonRepository.ts diff --git a/packages/racing/domain/repositories/ISeasonSponsorshipRepository.ts b/core/racing/domain/repositories/ISeasonSponsorshipRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ISeasonSponsorshipRepository.ts rename to core/racing/domain/repositories/ISeasonSponsorshipRepository.ts diff --git a/packages/racing/domain/repositories/ISessionRepository.ts b/core/racing/domain/repositories/ISessionRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ISessionRepository.ts rename to core/racing/domain/repositories/ISessionRepository.ts diff --git a/packages/racing/domain/repositories/ISponsorRepository.ts b/core/racing/domain/repositories/ISponsorRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ISponsorRepository.ts rename to core/racing/domain/repositories/ISponsorRepository.ts diff --git a/packages/racing/domain/repositories/ISponsorshipPricingRepository.ts b/core/racing/domain/repositories/ISponsorshipPricingRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ISponsorshipPricingRepository.ts rename to core/racing/domain/repositories/ISponsorshipPricingRepository.ts diff --git a/packages/racing/domain/repositories/ISponsorshipRequestRepository.ts b/core/racing/domain/repositories/ISponsorshipRequestRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ISponsorshipRequestRepository.ts rename to core/racing/domain/repositories/ISponsorshipRequestRepository.ts diff --git a/packages/racing/domain/repositories/IStandingRepository.ts b/core/racing/domain/repositories/IStandingRepository.ts similarity index 100% rename from packages/racing/domain/repositories/IStandingRepository.ts rename to core/racing/domain/repositories/IStandingRepository.ts diff --git a/packages/racing/domain/repositories/ITeamMembershipRepository.ts b/core/racing/domain/repositories/ITeamMembershipRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ITeamMembershipRepository.ts rename to core/racing/domain/repositories/ITeamMembershipRepository.ts diff --git a/packages/racing/domain/repositories/ITeamRepository.ts b/core/racing/domain/repositories/ITeamRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ITeamRepository.ts rename to core/racing/domain/repositories/ITeamRepository.ts diff --git a/packages/racing/domain/repositories/ITrackRepository.ts b/core/racing/domain/repositories/ITrackRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ITrackRepository.ts rename to core/racing/domain/repositories/ITrackRepository.ts diff --git a/packages/racing/domain/repositories/ITransactionRepository.ts b/core/racing/domain/repositories/ITransactionRepository.ts similarity index 100% rename from packages/racing/domain/repositories/ITransactionRepository.ts rename to core/racing/domain/repositories/ITransactionRepository.ts diff --git a/packages/racing/domain/services/ChampionshipAggregator.ts b/core/racing/domain/services/ChampionshipAggregator.ts similarity index 100% rename from packages/racing/domain/services/ChampionshipAggregator.ts rename to core/racing/domain/services/ChampionshipAggregator.ts diff --git a/packages/racing/domain/services/DropScoreApplier.ts b/core/racing/domain/services/DropScoreApplier.ts similarity index 100% rename from packages/racing/domain/services/DropScoreApplier.ts rename to core/racing/domain/services/DropScoreApplier.ts diff --git a/packages/racing/domain/services/EventScoringService.ts b/core/racing/domain/services/EventScoringService.ts similarity index 100% rename from packages/racing/domain/services/EventScoringService.ts rename to core/racing/domain/services/EventScoringService.ts diff --git a/packages/racing/domain/services/IDriverStatsService.ts b/core/racing/domain/services/IDriverStatsService.ts similarity index 100% rename from packages/racing/domain/services/IDriverStatsService.ts rename to core/racing/domain/services/IDriverStatsService.ts diff --git a/packages/racing/domain/services/IRankingService.ts b/core/racing/domain/services/IRankingService.ts similarity index 100% rename from packages/racing/domain/services/IRankingService.ts rename to core/racing/domain/services/IRankingService.ts diff --git a/packages/racing/domain/services/ScheduleCalculator.ts b/core/racing/domain/services/ScheduleCalculator.ts similarity index 100% rename from packages/racing/domain/services/ScheduleCalculator.ts rename to core/racing/domain/services/ScheduleCalculator.ts diff --git a/packages/racing/domain/services/SeasonScheduleGenerator.ts b/core/racing/domain/services/SeasonScheduleGenerator.ts similarity index 100% rename from packages/racing/domain/services/SeasonScheduleGenerator.ts rename to core/racing/domain/services/SeasonScheduleGenerator.ts diff --git a/packages/racing/domain/services/SkillLevelService.ts b/core/racing/domain/services/SkillLevelService.ts similarity index 100% rename from packages/racing/domain/services/SkillLevelService.ts rename to core/racing/domain/services/SkillLevelService.ts diff --git a/packages/racing/domain/services/StrengthOfFieldCalculator.ts b/core/racing/domain/services/StrengthOfFieldCalculator.ts similarity index 100% rename from packages/racing/domain/services/StrengthOfFieldCalculator.ts rename to core/racing/domain/services/StrengthOfFieldCalculator.ts diff --git a/packages/racing/domain/types/BonusRule.ts b/core/racing/domain/types/BonusRule.ts similarity index 100% rename from packages/racing/domain/types/BonusRule.ts rename to core/racing/domain/types/BonusRule.ts diff --git a/packages/racing/domain/types/ChampionshipConfig.ts b/core/racing/domain/types/ChampionshipConfig.ts similarity index 100% rename from packages/racing/domain/types/ChampionshipConfig.ts rename to core/racing/domain/types/ChampionshipConfig.ts diff --git a/packages/racing/domain/types/ChampionshipType.ts b/core/racing/domain/types/ChampionshipType.ts similarity index 100% rename from packages/racing/domain/types/ChampionshipType.ts rename to core/racing/domain/types/ChampionshipType.ts diff --git a/packages/racing/domain/types/DropScorePolicy.ts b/core/racing/domain/types/DropScorePolicy.ts similarity index 100% rename from packages/racing/domain/types/DropScorePolicy.ts rename to core/racing/domain/types/DropScorePolicy.ts diff --git a/packages/racing/domain/types/LeagueRoles.ts b/core/racing/domain/types/LeagueRoles.ts similarity index 100% rename from packages/racing/domain/types/LeagueRoles.ts rename to core/racing/domain/types/LeagueRoles.ts diff --git a/packages/racing/domain/types/ParticipantRef.ts b/core/racing/domain/types/ParticipantRef.ts similarity index 100% rename from packages/racing/domain/types/ParticipantRef.ts rename to core/racing/domain/types/ParticipantRef.ts diff --git a/packages/racing/domain/types/SessionType.ts b/core/racing/domain/types/SessionType.ts similarity index 100% rename from packages/racing/domain/types/SessionType.ts rename to core/racing/domain/types/SessionType.ts diff --git a/packages/racing/domain/types/TeamMembership.ts b/core/racing/domain/types/TeamMembership.ts similarity index 100% rename from packages/racing/domain/types/TeamMembership.ts rename to core/racing/domain/types/TeamMembership.ts diff --git a/packages/racing/domain/types/Weekday.ts b/core/racing/domain/types/Weekday.ts similarity index 100% rename from packages/racing/domain/types/Weekday.ts rename to core/racing/domain/types/Weekday.ts diff --git a/packages/racing/domain/value-objects/GameConstraints.ts b/core/racing/domain/value-objects/GameConstraints.ts similarity index 100% rename from packages/racing/domain/value-objects/GameConstraints.ts rename to core/racing/domain/value-objects/GameConstraints.ts diff --git a/packages/racing/domain/value-objects/LeagueDescription.ts b/core/racing/domain/value-objects/LeagueDescription.ts similarity index 100% rename from packages/racing/domain/value-objects/LeagueDescription.ts rename to core/racing/domain/value-objects/LeagueDescription.ts diff --git a/packages/racing/domain/value-objects/LeagueName.ts b/core/racing/domain/value-objects/LeagueName.ts similarity index 100% rename from packages/racing/domain/value-objects/LeagueName.ts rename to core/racing/domain/value-objects/LeagueName.ts diff --git a/packages/racing/domain/value-objects/LeagueTimezone.ts b/core/racing/domain/value-objects/LeagueTimezone.ts similarity index 100% rename from packages/racing/domain/value-objects/LeagueTimezone.ts rename to core/racing/domain/value-objects/LeagueTimezone.ts diff --git a/packages/racing/domain/value-objects/LeagueVisibility.ts b/core/racing/domain/value-objects/LeagueVisibility.ts similarity index 100% rename from packages/racing/domain/value-objects/LeagueVisibility.ts rename to core/racing/domain/value-objects/LeagueVisibility.ts diff --git a/packages/racing/domain/value-objects/LiveryDecal.ts b/core/racing/domain/value-objects/LiveryDecal.ts similarity index 100% rename from packages/racing/domain/value-objects/LiveryDecal.ts rename to core/racing/domain/value-objects/LiveryDecal.ts diff --git a/packages/racing/domain/value-objects/MembershipFee.ts b/core/racing/domain/value-objects/MembershipFee.ts similarity index 100% rename from packages/racing/domain/value-objects/MembershipFee.ts rename to core/racing/domain/value-objects/MembershipFee.ts diff --git a/packages/racing/domain/value-objects/Money.ts b/core/racing/domain/value-objects/Money.ts similarity index 100% rename from packages/racing/domain/value-objects/Money.ts rename to core/racing/domain/value-objects/Money.ts diff --git a/packages/racing/domain/value-objects/MonthlyRecurrencePattern.ts b/core/racing/domain/value-objects/MonthlyRecurrencePattern.ts similarity index 100% rename from packages/racing/domain/value-objects/MonthlyRecurrencePattern.ts rename to core/racing/domain/value-objects/MonthlyRecurrencePattern.ts diff --git a/packages/racing/domain/value-objects/PointsTable.ts b/core/racing/domain/value-objects/PointsTable.ts similarity index 100% rename from packages/racing/domain/value-objects/PointsTable.ts rename to core/racing/domain/value-objects/PointsTable.ts diff --git a/packages/racing/domain/value-objects/RaceIncidents.ts b/core/racing/domain/value-objects/RaceIncidents.ts similarity index 100% rename from packages/racing/domain/value-objects/RaceIncidents.ts rename to core/racing/domain/value-objects/RaceIncidents.ts diff --git a/packages/racing/domain/value-objects/RaceTimeOfDay.ts b/core/racing/domain/value-objects/RaceTimeOfDay.ts similarity index 100% rename from packages/racing/domain/value-objects/RaceTimeOfDay.ts rename to core/racing/domain/value-objects/RaceTimeOfDay.ts diff --git a/packages/racing/domain/value-objects/RecurrenceStrategy.ts b/core/racing/domain/value-objects/RecurrenceStrategy.ts similarity index 100% rename from packages/racing/domain/value-objects/RecurrenceStrategy.ts rename to core/racing/domain/value-objects/RecurrenceStrategy.ts diff --git a/packages/racing/domain/value-objects/ScheduledRaceSlot.ts b/core/racing/domain/value-objects/ScheduledRaceSlot.ts similarity index 100% rename from packages/racing/domain/value-objects/ScheduledRaceSlot.ts rename to core/racing/domain/value-objects/ScheduledRaceSlot.ts diff --git a/packages/racing/domain/value-objects/SeasonDropPolicy.ts b/core/racing/domain/value-objects/SeasonDropPolicy.ts similarity index 100% rename from packages/racing/domain/value-objects/SeasonDropPolicy.ts rename to core/racing/domain/value-objects/SeasonDropPolicy.ts diff --git a/packages/racing/domain/value-objects/SeasonSchedule.ts b/core/racing/domain/value-objects/SeasonSchedule.ts similarity index 100% rename from packages/racing/domain/value-objects/SeasonSchedule.ts rename to core/racing/domain/value-objects/SeasonSchedule.ts diff --git a/packages/racing/domain/value-objects/SeasonScoringConfig.ts b/core/racing/domain/value-objects/SeasonScoringConfig.ts similarity index 100% rename from packages/racing/domain/value-objects/SeasonScoringConfig.ts rename to core/racing/domain/value-objects/SeasonScoringConfig.ts diff --git a/packages/racing/domain/value-objects/SeasonStewardingConfig.ts b/core/racing/domain/value-objects/SeasonStewardingConfig.ts similarity index 100% rename from packages/racing/domain/value-objects/SeasonStewardingConfig.ts rename to core/racing/domain/value-objects/SeasonStewardingConfig.ts diff --git a/packages/racing/domain/value-objects/SessionType.ts b/core/racing/domain/value-objects/SessionType.ts similarity index 100% rename from packages/racing/domain/value-objects/SessionType.ts rename to core/racing/domain/value-objects/SessionType.ts diff --git a/packages/racing/domain/value-objects/SponsorshipPricing.ts b/core/racing/domain/value-objects/SponsorshipPricing.ts similarity index 100% rename from packages/racing/domain/value-objects/SponsorshipPricing.ts rename to core/racing/domain/value-objects/SponsorshipPricing.ts diff --git a/packages/racing/domain/value-objects/WeekdaySet.ts b/core/racing/domain/value-objects/WeekdaySet.ts similarity index 100% rename from packages/racing/domain/value-objects/WeekdaySet.ts rename to core/racing/domain/value-objects/WeekdaySet.ts diff --git a/packages/racing/index.ts b/core/racing/index.ts similarity index 100% rename from packages/racing/index.ts rename to core/racing/index.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryCarRepository.ts b/core/racing/infrastructure/repositories/InMemoryCarRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryCarRepository.ts rename to core/racing/infrastructure/repositories/InMemoryCarRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryDriverRepository.ts b/core/racing/infrastructure/repositories/InMemoryDriverRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryDriverRepository.ts rename to core/racing/infrastructure/repositories/InMemoryDriverRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryGameRepository.ts b/core/racing/infrastructure/repositories/InMemoryGameRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryGameRepository.ts rename to core/racing/infrastructure/repositories/InMemoryGameRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryLeagueMembershipRepository.ts b/core/racing/infrastructure/repositories/InMemoryLeagueMembershipRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryLeagueMembershipRepository.ts rename to core/racing/infrastructure/repositories/InMemoryLeagueMembershipRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryLeagueRepository.ts b/core/racing/infrastructure/repositories/InMemoryLeagueRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryLeagueRepository.ts rename to core/racing/infrastructure/repositories/InMemoryLeagueRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryLeagueScoringPresetProvider.ts b/core/racing/infrastructure/repositories/InMemoryLeagueScoringPresetProvider.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryLeagueScoringPresetProvider.ts rename to core/racing/infrastructure/repositories/InMemoryLeagueScoringPresetProvider.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryLeagueWalletRepository.ts b/core/racing/infrastructure/repositories/InMemoryLeagueWalletRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryLeagueWalletRepository.ts rename to core/racing/infrastructure/repositories/InMemoryLeagueWalletRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryLiveryRepository.ts b/core/racing/infrastructure/repositories/InMemoryLiveryRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryLiveryRepository.ts rename to core/racing/infrastructure/repositories/InMemoryLiveryRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryPenaltyRepository.ts b/core/racing/infrastructure/repositories/InMemoryPenaltyRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryPenaltyRepository.ts rename to core/racing/infrastructure/repositories/InMemoryPenaltyRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryProtestRepository.ts b/core/racing/infrastructure/repositories/InMemoryProtestRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryProtestRepository.ts rename to core/racing/infrastructure/repositories/InMemoryProtestRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryRaceEventRepository.ts b/core/racing/infrastructure/repositories/InMemoryRaceEventRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryRaceEventRepository.ts rename to core/racing/infrastructure/repositories/InMemoryRaceEventRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryRaceRegistrationRepository.ts b/core/racing/infrastructure/repositories/InMemoryRaceRegistrationRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryRaceRegistrationRepository.ts rename to core/racing/infrastructure/repositories/InMemoryRaceRegistrationRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryRaceRepository.ts b/core/racing/infrastructure/repositories/InMemoryRaceRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryRaceRepository.ts rename to core/racing/infrastructure/repositories/InMemoryRaceRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryResultRepository.ts b/core/racing/infrastructure/repositories/InMemoryResultRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryResultRepository.ts rename to core/racing/infrastructure/repositories/InMemoryResultRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryScoringRepositories.ts b/core/racing/infrastructure/repositories/InMemoryScoringRepositories.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryScoringRepositories.ts rename to core/racing/infrastructure/repositories/InMemoryScoringRepositories.ts diff --git a/packages/racing/infrastructure/repositories/InMemorySeasonSponsorshipRepository.ts b/core/racing/infrastructure/repositories/InMemorySeasonSponsorshipRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemorySeasonSponsorshipRepository.ts rename to core/racing/infrastructure/repositories/InMemorySeasonSponsorshipRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemorySessionRepository.ts b/core/racing/infrastructure/repositories/InMemorySessionRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemorySessionRepository.ts rename to core/racing/infrastructure/repositories/InMemorySessionRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemorySponsorRepository.ts b/core/racing/infrastructure/repositories/InMemorySponsorRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemorySponsorRepository.ts rename to core/racing/infrastructure/repositories/InMemorySponsorRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemorySponsorshipPricingRepository.ts b/core/racing/infrastructure/repositories/InMemorySponsorshipPricingRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemorySponsorshipPricingRepository.ts rename to core/racing/infrastructure/repositories/InMemorySponsorshipPricingRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemorySponsorshipRequestRepository.ts b/core/racing/infrastructure/repositories/InMemorySponsorshipRequestRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemorySponsorshipRequestRepository.ts rename to core/racing/infrastructure/repositories/InMemorySponsorshipRequestRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryStandingRepository.ts b/core/racing/infrastructure/repositories/InMemoryStandingRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryStandingRepository.ts rename to core/racing/infrastructure/repositories/InMemoryStandingRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryTeamMembershipRepository.ts b/core/racing/infrastructure/repositories/InMemoryTeamMembershipRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryTeamMembershipRepository.ts rename to core/racing/infrastructure/repositories/InMemoryTeamMembershipRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryTeamRepository.ts b/core/racing/infrastructure/repositories/InMemoryTeamRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryTeamRepository.ts rename to core/racing/infrastructure/repositories/InMemoryTeamRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryTrackRepository.ts b/core/racing/infrastructure/repositories/InMemoryTrackRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryTrackRepository.ts rename to core/racing/infrastructure/repositories/InMemoryTrackRepository.ts diff --git a/packages/racing/infrastructure/repositories/InMemoryTransactionRepository.ts b/core/racing/infrastructure/repositories/InMemoryTransactionRepository.ts similarity index 100% rename from packages/racing/infrastructure/repositories/InMemoryTransactionRepository.ts rename to core/racing/infrastructure/repositories/InMemoryTransactionRepository.ts diff --git a/packages/racing/package.json b/core/racing/package.json similarity index 100% rename from packages/racing/package.json rename to core/racing/package.json diff --git a/packages/racing/tsconfig.json b/core/racing/tsconfig.json similarity index 100% rename from packages/racing/tsconfig.json rename to core/racing/tsconfig.json diff --git a/packages/shared/application/AsyncUseCase.ts b/core/shared/application/AsyncUseCase.ts similarity index 100% rename from packages/shared/application/AsyncUseCase.ts rename to core/shared/application/AsyncUseCase.ts diff --git a/packages/shared/application/Service.ts b/core/shared/application/Service.ts similarity index 100% rename from packages/shared/application/Service.ts rename to core/shared/application/Service.ts diff --git a/packages/shared/application/UseCase.ts b/core/shared/application/UseCase.ts similarity index 100% rename from packages/shared/application/UseCase.ts rename to core/shared/application/UseCase.ts diff --git a/packages/shared/application/index.ts b/core/shared/application/index.ts similarity index 100% rename from packages/shared/application/index.ts rename to core/shared/application/index.ts diff --git a/packages/shared/domain/Entity.ts b/core/shared/domain/Entity.ts similarity index 100% rename from packages/shared/domain/Entity.ts rename to core/shared/domain/Entity.ts diff --git a/packages/shared/domain/IDomainEvent.ts b/core/shared/domain/IDomainEvent.ts similarity index 100% rename from packages/shared/domain/IDomainEvent.ts rename to core/shared/domain/IDomainEvent.ts diff --git a/packages/shared/domain/Option.ts b/core/shared/domain/Option.ts similarity index 100% rename from packages/shared/domain/Option.ts rename to core/shared/domain/Option.ts diff --git a/packages/shared/domain/Service.ts b/core/shared/domain/Service.ts similarity index 100% rename from packages/shared/domain/Service.ts rename to core/shared/domain/Service.ts diff --git a/packages/shared/domain/ValueObject.ts b/core/shared/domain/ValueObject.ts similarity index 100% rename from packages/shared/domain/ValueObject.ts rename to core/shared/domain/ValueObject.ts diff --git a/packages/shared/domain/index.ts b/core/shared/domain/index.ts similarity index 100% rename from packages/shared/domain/index.ts rename to core/shared/domain/index.ts diff --git a/packages/shared/errors/ApplicationError.ts b/core/shared/errors/ApplicationError.ts similarity index 100% rename from packages/shared/errors/ApplicationError.ts rename to core/shared/errors/ApplicationError.ts diff --git a/packages/shared/errors/DomainError.ts b/core/shared/errors/DomainError.ts similarity index 100% rename from packages/shared/errors/DomainError.ts rename to core/shared/errors/DomainError.ts diff --git a/packages/shared/errors/index.ts b/core/shared/errors/index.ts similarity index 100% rename from packages/shared/errors/index.ts rename to core/shared/errors/index.ts diff --git a/packages/shared/index.ts b/core/shared/index.ts similarity index 100% rename from packages/shared/index.ts rename to core/shared/index.ts diff --git a/packages/shared/logger/ILogger.ts b/core/shared/logger/ILogger.ts similarity index 100% rename from packages/shared/logger/ILogger.ts rename to core/shared/logger/ILogger.ts diff --git a/packages/shared/logging/ConsoleLogger.ts b/core/shared/logging/ConsoleLogger.ts similarity index 100% rename from packages/shared/logging/ConsoleLogger.ts rename to core/shared/logging/ConsoleLogger.ts diff --git a/packages/shared/logging/ILogger.ts b/core/shared/logging/ILogger.ts similarity index 100% rename from packages/shared/logging/ILogger.ts rename to core/shared/logging/ILogger.ts diff --git a/packages/shared/presentation/Presenter.ts b/core/shared/presentation/Presenter.ts similarity index 100% rename from packages/shared/presentation/Presenter.ts rename to core/shared/presentation/Presenter.ts diff --git a/packages/shared/presentation/index.ts b/core/shared/presentation/index.ts similarity index 100% rename from packages/shared/presentation/index.ts rename to core/shared/presentation/index.ts diff --git a/packages/shared/result/Result.ts b/core/shared/result/Result.ts similarity index 100% rename from packages/shared/result/Result.ts rename to core/shared/result/Result.ts diff --git a/packages/shared/tests/unit/logging/ConsoleLogger.test.ts b/core/shared/tests/unit/logging/ConsoleLogger.test.ts similarity index 100% rename from packages/shared/tests/unit/logging/ConsoleLogger.test.ts rename to core/shared/tests/unit/logging/ConsoleLogger.test.ts diff --git a/packages/social/application/dto/CurrentUserSocialDTO.ts b/core/social/application/dto/CurrentUserSocialDTO.ts similarity index 100% rename from packages/social/application/dto/CurrentUserSocialDTO.ts rename to core/social/application/dto/CurrentUserSocialDTO.ts diff --git a/packages/social/application/dto/FeedItemDTO.ts b/core/social/application/dto/FeedItemDTO.ts similarity index 100% rename from packages/social/application/dto/FeedItemDTO.ts rename to core/social/application/dto/FeedItemDTO.ts diff --git a/packages/social/application/dto/FriendDTO.ts b/core/social/application/dto/FriendDTO.ts similarity index 100% rename from packages/social/application/dto/FriendDTO.ts rename to core/social/application/dto/FriendDTO.ts diff --git a/packages/social/application/index.ts b/core/social/application/index.ts similarity index 100% rename from packages/social/application/index.ts rename to core/social/application/index.ts diff --git a/packages/social/application/presenters/ISocialPresenters.ts b/core/social/application/presenters/ISocialPresenters.ts similarity index 100% rename from packages/social/application/presenters/ISocialPresenters.ts rename to core/social/application/presenters/ISocialPresenters.ts diff --git a/packages/social/application/use-cases/GetCurrentUserSocialUseCase.ts b/core/social/application/use-cases/GetCurrentUserSocialUseCase.ts similarity index 100% rename from packages/social/application/use-cases/GetCurrentUserSocialUseCase.ts rename to core/social/application/use-cases/GetCurrentUserSocialUseCase.ts diff --git a/packages/social/application/use-cases/GetUserFeedUseCase.ts b/core/social/application/use-cases/GetUserFeedUseCase.ts similarity index 100% rename from packages/social/application/use-cases/GetUserFeedUseCase.ts rename to core/social/application/use-cases/GetUserFeedUseCase.ts diff --git a/packages/social/domain/errors/SocialDomainError.ts b/core/social/domain/errors/SocialDomainError.ts similarity index 100% rename from packages/social/domain/errors/SocialDomainError.ts rename to core/social/domain/errors/SocialDomainError.ts diff --git a/packages/social/domain/repositories/IFeedRepository.ts b/core/social/domain/repositories/IFeedRepository.ts similarity index 100% rename from packages/social/domain/repositories/IFeedRepository.ts rename to core/social/domain/repositories/IFeedRepository.ts diff --git a/packages/social/domain/repositories/ISocialGraphRepository.ts b/core/social/domain/repositories/ISocialGraphRepository.ts similarity index 100% rename from packages/social/domain/repositories/ISocialGraphRepository.ts rename to core/social/domain/repositories/ISocialGraphRepository.ts diff --git a/packages/social/domain/types/FeedItem.ts b/core/social/domain/types/FeedItem.ts similarity index 100% rename from packages/social/domain/types/FeedItem.ts rename to core/social/domain/types/FeedItem.ts diff --git a/packages/social/domain/types/FeedItemType.ts b/core/social/domain/types/FeedItemType.ts similarity index 100% rename from packages/social/domain/types/FeedItemType.ts rename to core/social/domain/types/FeedItemType.ts diff --git a/packages/social/infrastructure/inmemory/InMemorySocialAndFeed.ts b/core/social/infrastructure/inmemory/InMemorySocialAndFeed.ts similarity index 100% rename from packages/social/infrastructure/inmemory/InMemorySocialAndFeed.ts rename to core/social/infrastructure/inmemory/InMemorySocialAndFeed.ts diff --git a/packages/social/package.json b/core/social/package.json similarity index 100% rename from packages/social/package.json rename to core/social/package.json diff --git a/packages/social/tsconfig.json b/core/social/tsconfig.json similarity index 100% rename from packages/social/tsconfig.json rename to core/social/tsconfig.json diff --git a/packages/testing-support/index.ts b/core/testing-support/index.ts similarity index 100% rename from packages/testing-support/index.ts rename to core/testing-support/index.ts diff --git a/packages/testing-support/package.json b/core/testing-support/package.json similarity index 100% rename from packages/testing-support/package.json rename to core/testing-support/package.json diff --git a/packages/testing-support/src/faker/faker.ts b/core/testing-support/src/faker/faker.ts similarity index 100% rename from packages/testing-support/src/faker/faker.ts rename to core/testing-support/src/faker/faker.ts diff --git a/packages/testing-support/src/images/images.ts b/core/testing-support/src/images/images.ts similarity index 100% rename from packages/testing-support/src/images/images.ts rename to core/testing-support/src/images/images.ts diff --git a/packages/testing-support/src/media/DemoAvatarGenerationAdapter.ts b/core/testing-support/src/media/DemoAvatarGenerationAdapter.ts similarity index 100% rename from packages/testing-support/src/media/DemoAvatarGenerationAdapter.ts rename to core/testing-support/src/media/DemoAvatarGenerationAdapter.ts diff --git a/packages/testing-support/src/media/DemoFaceValidationAdapter.ts b/core/testing-support/src/media/DemoFaceValidationAdapter.ts similarity index 100% rename from packages/testing-support/src/media/DemoFaceValidationAdapter.ts rename to core/testing-support/src/media/DemoFaceValidationAdapter.ts diff --git a/packages/testing-support/src/media/DemoImageServiceAdapter.ts b/core/testing-support/src/media/DemoImageServiceAdapter.ts similarity index 100% rename from packages/testing-support/src/media/DemoImageServiceAdapter.ts rename to core/testing-support/src/media/DemoImageServiceAdapter.ts diff --git a/packages/testing-support/src/media/InMemoryAvatarGenerationRepository.ts b/core/testing-support/src/media/InMemoryAvatarGenerationRepository.ts similarity index 100% rename from packages/testing-support/src/media/InMemoryAvatarGenerationRepository.ts rename to core/testing-support/src/media/InMemoryAvatarGenerationRepository.ts diff --git a/packages/testing-support/src/racing/DemoCars.ts b/core/testing-support/src/racing/DemoCars.ts similarity index 100% rename from packages/testing-support/src/racing/DemoCars.ts rename to core/testing-support/src/racing/DemoCars.ts diff --git a/packages/testing-support/src/racing/DemoDriverStats.ts b/core/testing-support/src/racing/DemoDriverStats.ts similarity index 100% rename from packages/testing-support/src/racing/DemoDriverStats.ts rename to core/testing-support/src/racing/DemoDriverStats.ts diff --git a/packages/testing-support/src/racing/DemoTracks.ts b/core/testing-support/src/racing/DemoTracks.ts similarity index 100% rename from packages/testing-support/src/racing/DemoTracks.ts rename to core/testing-support/src/racing/DemoTracks.ts diff --git a/packages/testing-support/src/racing/RacingFeedSeed.ts b/core/testing-support/src/racing/RacingFeedSeed.ts similarity index 100% rename from packages/testing-support/src/racing/RacingFeedSeed.ts rename to core/testing-support/src/racing/RacingFeedSeed.ts diff --git a/packages/testing-support/src/racing/RacingSeedCore.ts b/core/testing-support/src/racing/RacingSeedCore.ts similarity index 100% rename from packages/testing-support/src/racing/RacingSeedCore.ts rename to core/testing-support/src/racing/RacingSeedCore.ts diff --git a/packages/testing-support/src/racing/RacingSponsorshipSeed.ts b/core/testing-support/src/racing/RacingSponsorshipSeed.ts similarity index 100% rename from packages/testing-support/src/racing/RacingSponsorshipSeed.ts rename to core/testing-support/src/racing/RacingSponsorshipSeed.ts diff --git a/packages/testing-support/src/racing/RacingStaticSeed.ts b/core/testing-support/src/racing/RacingStaticSeed.ts similarity index 100% rename from packages/testing-support/src/racing/RacingStaticSeed.ts rename to core/testing-support/src/racing/RacingStaticSeed.ts diff --git a/packages/testing-support/tsconfig.json b/core/testing-support/tsconfig.json similarity index 100% rename from packages/testing-support/tsconfig.json rename to core/testing-support/tsconfig.json diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 6983fb4e3..61f1e8e87 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -38,10 +38,10 @@ Everything else from the concept docs (league/season management, result aggregat - React renderer: [`App`](apps/companion/renderer/App.tsx), UI components under [`components`](apps/companion/renderer/components). - Automation & browser integration: - - Domain models around hosted sessions and steps, e.g. [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1), [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1). - - Application layer ports and use-cases, e.g. [`IAutomationEngine`](packages/application/ports/IAutomationEngine.ts:1), [`ISessionRepository`](packages/application/ports/ISessionRepository.ts:1), [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1). - - Playwright-based automation adapter and helpers, e.g. [`PlaywrightAutomationAdapter`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1), [`CheckoutPriceExtractor`](packages/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1). - - Logging, config and in-memory repository implementations, e.g. [`InMemorySessionRepository`](packages/infrastructure/repositories/InMemorySessionRepository.ts:1), [`AutomationConfig`](packages/infrastructure/config/AutomationConfig.ts:1), [`LoggingConfig`](packages/infrastructure/config/LoggingConfig.ts:1), [`PinoLogAdapter`](packages/infrastructure/adapters/logging/PinoLogAdapter.ts:1). + - Domain models around hosted sessions and steps, e.g. [`AutomationSession`](core/domain/entities/AutomationSession.ts:1), [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1). + - Application layer ports and use-cases, e.g. [`IAutomationEngine`](core/application/ports/IAutomationEngine.ts:1), [`ISessionRepository`](core/application/ports/ISessionRepository.ts:1), [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1). + - Playwright-based automation adapter and helpers, e.g. [`PlaywrightAutomationAdapter`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1), [`CheckoutPriceExtractor`](core/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1). + - Logging, config and in-memory repository implementations, e.g. [`InMemorySessionRepository`](core/infrastructure/repositories/InMemorySessionRepository.ts:1), [`AutomationConfig`](core/infrastructure/config/AutomationConfig.ts:1), [`LoggingConfig`](core/infrastructure/config/LoggingConfig.ts:1), [`PinoLogAdapter`](core/infrastructure/adapters/logging/PinoLogAdapter.ts:1). - Testing: - Unit tests for domain, application and infrastructure. @@ -162,14 +162,14 @@ The website under [`apps/website`](apps/website:1) is the primary presentation s - Read standings, stats snapshots and rating values. - Submit registrations, complaints and admin actions. - Trigger or schedule result imports and (where allowed) automation runs. - - These APIs are implemented by the platform application layer and are conceptually separate from the automation-specific ports in `packages/application`. + - These APIs are implemented by the platform application layer and are conceptually separate from the automation-specific ports in `core/application`. ### 2.4 Platform Integration with Automation The web platform uses the automation & companion subsystem as a hosted-session engine, without coupling to Playwright or Electron details: - **From league/season data to automation intent** - - The platform aggregates league configuration (series settings, car/track choices, schedule, server settings) and derives a hosted-session configuration structure conceptually equivalent to [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1). + - The platform aggregates league configuration (series settings, car/track choices, schedule, server settings) and derives a hosted-session configuration structure conceptually equivalent to [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1). - This configuration captures the intent of a single hosted session (or a batch of sessions across a season) in a platform-neutral format. - **Hand-off to automation** @@ -207,9 +207,9 @@ This section describes how the automation engine and companion in this repo sit - **Automation Engine & Domain (this repo)** - Clean Architecture core for iRacing hosted-session automation: - - Domain and value objects under [`packages/domain`](packages/domain/entities/AutomationSession.ts:1). - - Application use-cases and ports under [`packages/application`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1). - - Infrastructure adapters under [`packages/infrastructure`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1). + - Domain and value objects under [`core/domain`](core/domain/entities/AutomationSession.ts:1). + - Application use-cases and ports under [`core/application`](core/application/use-cases/StartAutomationSessionUseCase.ts:1). + - Infrastructure adapters under [`core/infrastructure`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1). - Exposes automation capabilities via application ports that can be used both by the companion and by external orchestrators. - **iRacing Web (members.iracing.com)** @@ -228,7 +228,7 @@ This section describes how the automation engine and companion in this repo sit - Shared concept space: - Both surfaces operate on the competition concepts described in [`CONCEPT.md`](docs/concept/CONCEPT.md), [`ADMINS.md`](docs/concept/ADMINS.md), [`DRIVERS.md`](docs/concept/DRIVERS.md), [`COMPETITION.md`](docs/concept/COMPETITION.md), [`RACING.md`](docs/concept/RACING.md), [`SOCIAL.md`](docs/concept/SOCIAL.md), [`TEAMS.md`](docs/concept/TEAMS.md). - - The automation engine uses [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) as the canonical representation of a hosted-session setup derived from those higher-level concepts. + - The automation engine uses [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) as the canonical representation of a hosted-session setup derived from those higher-level concepts. - Division of responsibilities: - The **website** is the primary UI for league management, discovery, stats and rating (core platform concerns). @@ -245,7 +245,7 @@ At a high level, communication flows are designed around the automation engine a - Companion App → Application Use-cases → Automation Engine → Playwright Adapter → iRacing Web. - Hand-off of automation intent: - - Core platform services or the web app can derive a [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) from league data and store it server-side. + - Core platform services or the web app can derive a [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) from league data and store it server-side. - The companion app or a headless orchestrator retrieves these configs via platform APIs and invokes the automation engine using the same application ports used in this repo. ### 2.4 System context diagram @@ -300,7 +300,7 @@ The automation strategy is shaped by iRacing’s platform boundaries and Terms o - Hooking the sim process or game memory. - Running any automation that is not clearly aligned with “browser automation of a public web UI”. -The [`PlaywrightAutomationAdapter`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) contains additional safeguards, such as: +The [`PlaywrightAutomationAdapter`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) contains additional safeguards, such as: - Guardrails around checkout/payment-like buttons using iRacing-specific selector maps. - Explicit “blocked selector” detection before clicks. @@ -336,7 +336,7 @@ Inner layers: **Layer responsibilities** - **Domain** - - Competition-neutral automation concepts such as [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1), [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1), session and step invariants and validators. + - Competition-neutral automation concepts such as [`AutomationSession`](core/domain/entities/AutomationSession.ts:1), [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1), session and step invariants and validators. - Independent of Electron, Playwright, HTTP or persistence. - **Application** @@ -354,9 +354,9 @@ Inner layers: **Key rules in this repo** -- `packages/domain/*` has no dependencies on application, infrastructure, or Electron. -- `packages/application/*` depends only on `packages/domain/*` (plus shared types). -- `packages/infrastructure/*` depends on domain and application ports, and on external libraries (Playwright, Pino, etc.). +- `core/domain/*` has no dependencies on application, infrastructure, or Electron. +- `core/application/*` depends only on `core/domain/*` (plus shared types). +- `core/infrastructure/*` depends on domain and application ports, and on external libraries (Playwright, Pino, etc.). - `apps/companion/*` depends on inner layers and glues application use-cases to Electron UI and IPC. This keeps the **automation engine** stable and reusable across presentation surfaces (companion today, web or backend orchestrators later), while allowing infrastructure and UI details to evolve without rewriting business logic. @@ -365,19 +365,19 @@ This keeps the **automation engine** stable and reusable across presentation sur ## 4. Layer-by-Layer Mapping -### 4.1 Domain Layer (`packages/domain/*`) +### 4.1 Domain Layer (`core/domain/*`) The domain models what an “automation session” is, how it progresses, and which invariants must hold regardless of UI or tooling. **Core entities** -- [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1) +- [`AutomationSession`](core/domain/entities/AutomationSession.ts:1) - Represents a single hosted-session automation run. - Tracks: - `id` - - `currentStep` (wizard step, via [`StepId`](packages/domain/value-objects/StepId.ts:1)) - - `state` (via [`SessionState`](packages/domain/value-objects/SessionState.ts:1)) - - immutable [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) + - `currentStep` (wizard step, via [`StepId`](core/domain/value-objects/StepId.ts:1)) + - `state` (via [`SessionState`](core/domain/value-objects/SessionState.ts:1)) + - immutable [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) - timestamps (`startedAt`, `completedAt`) - failure information (`errorMessage`). - Enforces invariants: @@ -385,44 +385,44 @@ The domain models what an “automation session” is, how it progresses, and wh - Steps can only move forward and must progress sequentially (`n → n+1`, no skipping or going backwards). - Terminal states (e.g. `STOPPED_AT_STEP_18`, `FAILED`) cannot be mutated further. -- [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) +- [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) - Describes the admin’s intended hosted session: - Required: `sessionName`, `trackId`, `carIds`. - Optional QoL fields: `serverName`, `password`, `adminPassword`, `maxDrivers`, weather/time-of-day, lengths, damage model, track state, etc. - Acts as the **canonical session description** that higher layers use to map into iRacing’s wizard fields. -- [`StepExecution`](packages/domain/entities/StepExecution.ts:1) +- [`StepExecution`](core/domain/entities/StepExecution.ts:1) - Encapsulates the result of executing a single wizard step, including timing and error data. **Value objects** - Session lifecycle and step identity: - - [`SessionState`](packages/domain/value-objects/SessionState.ts:1) - - [`SessionLifetime`](packages/domain/value-objects/SessionLifetime.ts:1) - - [`StepId`](packages/domain/value-objects/StepId.ts:1) + - [`SessionState`](core/domain/value-objects/SessionState.ts:1) + - [`SessionLifetime`](core/domain/value-objects/SessionLifetime.ts:1) + - [`StepId`](core/domain/value-objects/StepId.ts:1) - Authentication and browser state: - - [`AuthenticationState`](packages/domain/value-objects/AuthenticationState.ts:1) - - [`BrowserAuthenticationState`](packages/domain/value-objects/BrowserAuthenticationState.ts:1) - - [`CookieConfiguration`](packages/domain/value-objects/CookieConfiguration.ts:1) + - [`AuthenticationState`](core/domain/value-objects/AuthenticationState.ts:1) + - [`BrowserAuthenticationState`](core/domain/value-objects/BrowserAuthenticationState.ts:1) + - [`CookieConfiguration`](core/domain/value-objects/CookieConfiguration.ts:1) - Checkout and pricing safety: - - [`CheckoutPrice`](packages/domain/value-objects/CheckoutPrice.ts:1) - - [`CheckoutState`](packages/domain/value-objects/CheckoutState.ts:1) - - [`CheckoutConfirmation`](packages/domain/value-objects/CheckoutConfirmation.ts:1) + - [`CheckoutPrice`](core/domain/value-objects/CheckoutPrice.ts:1) + - [`CheckoutState`](core/domain/value-objects/CheckoutState.ts:1) + - [`CheckoutConfirmation`](core/domain/value-objects/CheckoutConfirmation.ts:1) - Overlay/visual integration: - - [`ScreenRegion`](packages/domain/value-objects/ScreenRegion.ts:1) - - [`RaceCreationResult`](packages/domain/value-objects/RaceCreationResult.ts:1) + - [`ScreenRegion`](core/domain/value-objects/ScreenRegion.ts:1) + - [`RaceCreationResult`](core/domain/value-objects/RaceCreationResult.ts:1) **Domain services** -- [`PageStateValidator`](packages/domain/services/PageStateValidator.ts:1) +- [`PageStateValidator`](core/domain/services/PageStateValidator.ts:1) - Declaratively describes what it means for the automation to be “on the right wizard page”. - Evaluates combinations of required/forbidden selectors into a structured result. - - Used by [`PlaywrightAutomationAdapter`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) to avoid driving the wrong UI state. + - Used by [`PlaywrightAutomationAdapter`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) to avoid driving the wrong UI state. -- [`StepTransitionValidator`](packages/domain/services/StepTransitionValidator.ts:1) +- [`StepTransitionValidator`](core/domain/services/StepTransitionValidator.ts:1) - Enforces legal transitions between wizard steps and session states. - Centralizes the rules for when it is safe to move to the next step or finalize. @@ -433,133 +433,133 @@ The domain models what an “automation session” is, how it progresses, and wh --- -### 4.2 Application Layer (`packages/application/*`) +### 4.2 Application Layer (`core/application/*`) The application layer orchestrates use-cases by coordinating domain entities and calling ports that are implemented in infrastructure. **Key ports** -- [`IAutomationEngine`](packages/application/ports/IAutomationEngine.ts:1) +- [`IAutomationEngine`](core/application/ports/IAutomationEngine.ts:1) - `validateConfiguration(config)` → checks whether the intended hosted session is structurally valid and automatable. - `executeStep(stepId, config)` → drives a single wizard step using the underlying browser automation. - `stopAutomation()` → halts the current run. -- [`ISessionRepository`](packages/application/ports/ISessionRepository.ts:1) - - Persists [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1) instances for tracking and later inspection. +- [`ISessionRepository`](core/application/ports/ISessionRepository.ts:1) + - Persists [`AutomationSession`](core/domain/entities/AutomationSession.ts:1) instances for tracking and later inspection. - Screen & browser integration: - - [`IScreenAutomation`](packages/application/ports/IScreenAutomation.ts:1) (implemented by [`PlaywrightAutomationAdapter`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1)). - - [`IAuthenticationService`](packages/application/ports/IAuthenticationService.ts:1) for login/session management. - - [`ICheckoutService`](packages/application/ports/ICheckoutService.ts:1) and [`ICheckoutConfirmationPort`](packages/application/ports/ICheckoutConfirmationPort.ts:1) for safe credits/checkout flows. + - [`IScreenAutomation`](core/application/ports/IScreenAutomation.ts:1) (implemented by [`PlaywrightAutomationAdapter`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1)). + - [`IAuthenticationService`](core/application/ports/IAuthenticationService.ts:1) for login/session management. + - [`ICheckoutService`](core/application/ports/ICheckoutService.ts:1) and [`ICheckoutConfirmationPort`](core/application/ports/ICheckoutConfirmationPort.ts:1) for safe credits/checkout flows. - Cross-cutting: - - [`ILogger`](packages/application/ports/ILogger.ts:1) - - [`IOverlaySyncPort`](packages/application/ports/IOverlaySyncPort.ts:1) - - [`IAutomationEventPublisher`](packages/application/ports/IAutomationEventPublisher.ts:1) - - [`IUserConfirmationPort`](packages/application/ports/IUserConfirmationPort.ts:1) + - [`ILogger`](core/application/ports/ILogger.ts:1) + - [`IOverlaySyncPort`](core/application/ports/IOverlaySyncPort.ts:1) + - [`IAutomationEventPublisher`](core/application/ports/IAutomationEventPublisher.ts:1) + - [`IUserConfirmationPort`](core/application/ports/IUserConfirmationPort.ts:1) **Key services** -- [`OverlaySyncService`](packages/application/services/OverlaySyncService.ts:1) +- [`OverlaySyncService`](core/application/services/OverlaySyncService.ts:1) - Bridges the automation lifecycle (from infrastructure) to overlay/presentation consumers (companion renderer). - - Consumes an [`IAutomationLifecycleEmitter`](packages/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) (implemented by the Playwright adapter) and publishes state to an overlay sync port. + - Consumes an [`IAutomationLifecycleEmitter`](core/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) (implemented by the Playwright adapter) and publishes state to an overlay sync port. **Key use-cases** -- [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1) - - Creates a new [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1) from a [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1). - - Calls [`IAutomationEngine`](packages/application/ports/IAutomationEngine.ts:1) to perform validation before any browser work starts. - - Persists the session via [`ISessionRepository`](packages/application/ports/ISessionRepository.ts:1). +- [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1) + - Creates a new [`AutomationSession`](core/domain/entities/AutomationSession.ts:1) from a [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1). + - Calls [`IAutomationEngine`](core/application/ports/IAutomationEngine.ts:1) to perform validation before any browser work starts. + - Persists the session via [`ISessionRepository`](core/application/ports/ISessionRepository.ts:1). - Returns a DTO that the companion app tracks as progress state. - Authentication: - - [`CheckAuthenticationUseCase`](packages/application/use-cases/CheckAuthenticationUseCase.ts:1) - - [`InitiateLoginUseCase`](packages/application/use-cases/InitiateLoginUseCase.ts:1) - - [`ClearSessionUseCase`](packages/application/use-cases/ClearSessionUseCase.ts:1) + - [`CheckAuthenticationUseCase`](core/application/use-cases/CheckAuthenticationUseCase.ts:1) + - [`InitiateLoginUseCase`](core/application/use-cases/InitiateLoginUseCase.ts:1) + - [`ClearSessionUseCase`](core/application/use-cases/ClearSessionUseCase.ts:1) - These map the ToS-compliant login flow described in [`CONCEPT.md`](docs/concept/CONCEPT.md) and [`ADMINS.md`](docs/concept/ADMINS.md) into explicit use-cases (no password handling by GridPilot). - Automation completion & checkout: - - [`CompleteRaceCreationUseCase`](packages/application/use-cases/CompleteRaceCreationUseCase.ts:1) - - [`ConfirmCheckoutUseCase`](packages/application/use-cases/ConfirmCheckoutUseCase.ts:1) - - Uses [`ICheckoutService`](packages/application/ports/ICheckoutService.ts:1) from the Playwright layer to inspect price/state and defers to a UI-side confirmation port to comply with “never surprise-charge the admin”. + - [`CompleteRaceCreationUseCase`](core/application/use-cases/CompleteRaceCreationUseCase.ts:1) + - [`ConfirmCheckoutUseCase`](core/application/use-cases/ConfirmCheckoutUseCase.ts:1) + - Uses [`ICheckoutService`](core/application/ports/ICheckoutService.ts:1) from the Playwright layer to inspect price/state and defers to a UI-side confirmation port to comply with “never surprise-charge the admin”. - Guarding against stale auth: - - [`VerifyAuthenticatedPageUseCase`](packages/application/use-cases/VerifyAuthenticatedPageUseCase.ts:1) ensures the current page is still authenticated before continuing automation. + - [`VerifyAuthenticatedPageUseCase`](core/application/use-cases/VerifyAuthenticatedPageUseCase.ts:1) ensures the current page is still authenticated before continuing automation. The application layer is where “admin intent” (start automation, confirm checkout, verify login) is encoded and exposed to the companion, without exposing Playwright or DOM specifics. --- -### 4.3 Infrastructure Layer (`packages/infrastructure/*`) +### 4.3 Infrastructure Layer (`core/infrastructure/*`) The infrastructure layer implements the ports using concrete tools and services. **Automation adapters** -- [`PlaywrightAutomationAdapter`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) +- [`PlaywrightAutomationAdapter`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) - Implements: - - [`IScreenAutomation`](packages/application/ports/IScreenAutomation.ts:1) - - [`IAuthenticationService`](packages/application/ports/IAuthenticationService.ts:1) - - [`IAutomationLifecycleEmitter`](packages/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) used by [`OverlaySyncService`](packages/application/services/OverlaySyncService.ts:1). + - [`IScreenAutomation`](core/application/ports/IScreenAutomation.ts:1) + - [`IAuthenticationService`](core/application/ports/IAuthenticationService.ts:1) + - [`IAutomationLifecycleEmitter`](core/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) used by [`OverlaySyncService`](core/application/services/OverlaySyncService.ts:1). - Responsibilities: - Managing Playwright browser, context, and page lifecycle (headed/headless, fixture vs real mode). - Navigating to the iRacing hosted-session wizard, login pages and fixtures. - - Driving wizard steps through an internal [`WizardStepOrchestrator`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1). + - Driving wizard steps through an internal [`WizardStepOrchestrator`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1). - Injecting and updating the on-page automation overlay. - Enforcing click safety (blocked selectors, checkout detection). - - Handling authentication flows, cookies and persistent sessions via [`SessionCookieStore`](packages/infrastructure/adapters/automation/auth/SessionCookieStore.ts:1) and [`PlaywrightAuthSessionService`](packages/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService.ts:1). - - Validating page state using [`PageStateValidator`](packages/domain/services/PageStateValidator.ts:1). + - Handling authentication flows, cookies and persistent sessions via [`SessionCookieStore`](core/infrastructure/adapters/automation/auth/SessionCookieStore.ts:1) and [`PlaywrightAuthSessionService`](core/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService.ts:1). + - Validating page state using [`PageStateValidator`](core/domain/services/PageStateValidator.ts:1). -- [`MockBrowserAutomationAdapter`](packages/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts:1) +- [`MockBrowserAutomationAdapter`](core/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts:1) - Lightweight adapter used in tests to simulate automation without real browser interactions. -- [`FixtureServer`](packages/infrastructure/adapters/automation/engine/FixtureServer.ts:1) +- [`FixtureServer`](core/infrastructure/adapters/automation/engine/FixtureServer.ts:1) - Serves static HTML fixtures from `html-dumps-optimized/` to exercise the automation logic deterministically in tests and local development. **DOM helpers** -- [`IRacingDomNavigator`](packages/infrastructure/adapters/automation/dom/IRacingDomNavigator.ts:1) +- [`IRacingDomNavigator`](core/infrastructure/adapters/automation/dom/IRacingDomNavigator.ts:1) - High-level navigation and waiting logic for wizard steps and key UI elements. -- [`IRacingDomInteractor`](packages/infrastructure/adapters/automation/dom/IRacingDomInteractor.ts:1) +- [`IRacingDomInteractor`](core/infrastructure/adapters/automation/dom/IRacingDomInteractor.ts:1) - Encapsulates filling fields, clicking elements, handling modals. -- [`SafeClickService`](packages/infrastructure/adapters/automation/dom/SafeClickService.ts:1) +- [`SafeClickService`](core/infrastructure/adapters/automation/dom/SafeClickService.ts:1) - A safer click abstraction that combines timeouts, modal-dismiss logic and safety checks. - Selectors and constants: - - [`IRACING_SELECTORS`](packages/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1) - - Additional helper types under `packages/infrastructure/adapters/automation/dom/*`. + - [`IRACING_SELECTORS`](core/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1) + - Additional helper types under `core/infrastructure/adapters/automation/dom/*`. **Checkout & pricing** -- [`CheckoutPriceExtractor`](packages/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1) +- [`CheckoutPriceExtractor`](core/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1) - Reads DOM labels and buttons in the iRacing wizard to produce: - - [`CheckoutPrice`](packages/domain/value-objects/CheckoutPrice.ts:1) (if parsable). - - [`CheckoutState`](packages/domain/value-objects/CheckoutState.ts:1) (derived from button classes). + - [`CheckoutPrice`](core/domain/value-objects/CheckoutPrice.ts:1) (if parsable). + - [`CheckoutState`](core/domain/value-objects/CheckoutState.ts:1) (derived from button classes). - Raw `buttonHtml` for debugging. - - Returns results wrapped in [`Result`](packages/shared/result/Result.ts:1) to avoid throwing during automation. + - Returns results wrapped in [`Result`](core/shared/result/Result.ts:1) to avoid throwing during automation. **Repositories & configuration** -- [`InMemorySessionRepository`](packages/infrastructure/repositories/InMemorySessionRepository.ts:1) - - Simple in-process implementation of [`ISessionRepository`](packages/application/ports/ISessionRepository.ts:1), used in the companion app and tests. +- [`InMemorySessionRepository`](core/infrastructure/repositories/InMemorySessionRepository.ts:1) + - Simple in-process implementation of [`ISessionRepository`](core/application/ports/ISessionRepository.ts:1), used in the companion app and tests. - Config: - - [`AutomationConfig`](packages/infrastructure/config/AutomationConfig.ts:1) + - [`AutomationConfig`](core/infrastructure/config/AutomationConfig.ts:1) - Mode selection: `production`, `development`, `test`. - Default timeouts and base URLs for fixtures vs live. - - [`BrowserModeConfig`](packages/infrastructure/config/BrowserModeConfig.ts:1) - - Controls headed/headless behavior, with [`BrowserModeConfigLoader`](packages/infrastructure/config/BrowserModeConfig.ts:1) used heavily in [`di-container`](apps/companion/main/di-container.ts:1). - - [`LoggingConfig`](packages/infrastructure/config/LoggingConfig.ts:1) + - [`BrowserModeConfig`](core/infrastructure/config/BrowserModeConfig.ts:1) + - Controls headed/headless behavior, with [`BrowserModeConfigLoader`](core/infrastructure/config/BrowserModeConfig.ts:1) used heavily in [`di-container`](apps/companion/main/di-container.ts:1). + - [`LoggingConfig`](core/infrastructure/config/LoggingConfig.ts:1) - Logging: - - [`PinoLogAdapter`](packages/infrastructure/adapters/logging/PinoLogAdapter.ts:1) - - [`NoOpLogAdapter`](packages/infrastructure/adapters/logging/NoOpLogAdapter.ts:1) (used in tests to keep noise low). + - [`PinoLogAdapter`](core/infrastructure/adapters/logging/PinoLogAdapter.ts:1) + - [`NoOpLogAdapter`](core/infrastructure/adapters/logging/NoOpLogAdapter.ts:1) (used in tests to keep noise low). **IPC / UI integration** -- [`ElectronCheckoutConfirmationAdapter`](packages/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts:1) +- [`ElectronCheckoutConfirmationAdapter`](core/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts:1) - Bridges application-level checkout confirmation flows to the companion renderer via IPC. This layer is where the “messy reality” of Playwright, Electron, file paths and selectors is implemented, while honoring the constraints defined at the domain/application layers. @@ -579,22 +579,22 @@ The presentation layer in this repo is currently a **single Electron app** that - [`di-container`](apps/companion/main/di-container.ts) - Central wiring for: - - Logger ([`ILogger`](packages/application/ports/ILogger.ts:1)) via `createLogger()` and [`LoggingConfig`](packages/infrastructure/config/LoggingConfig.ts:1). - - Session repository ([`ISessionRepository`](packages/application/ports/ISessionRepository.ts:1)) via [`InMemorySessionRepository`](packages/infrastructure/repositories/InMemorySessionRepository.ts:1). - - Browser automation adapter via `createBrowserAutomationAdapter()` using [`PlaywrightAutomationAdapter`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) or [`MockBrowserAutomationAdapter`](packages/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts:1) depending on mode. - - [`IAutomationEngine`](packages/application/ports/IAutomationEngine.ts:1) via [`AutomationEngineAdapter`](packages/infrastructure/adapters/automation/engine/AutomationEngineAdapter.ts:1) / [`MockAutomationEngineAdapter`](packages/infrastructure/adapters/automation/engine/MockAutomationEngineAdapter.ts:1). + - Logger ([`ILogger`](core/application/ports/ILogger.ts:1)) via `createLogger()` and [`LoggingConfig`](core/infrastructure/config/LoggingConfig.ts:1). + - Session repository ([`ISessionRepository`](core/application/ports/ISessionRepository.ts:1)) via [`InMemorySessionRepository`](core/infrastructure/repositories/InMemorySessionRepository.ts:1). + - Browser automation adapter via `createBrowserAutomationAdapter()` using [`PlaywrightAutomationAdapter`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) or [`MockBrowserAutomationAdapter`](core/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts:1) depending on mode. + - [`IAutomationEngine`](core/application/ports/IAutomationEngine.ts:1) via [`AutomationEngineAdapter`](core/infrastructure/adapters/automation/engine/AutomationEngineAdapter.ts:1) / [`MockAutomationEngineAdapter`](core/infrastructure/adapters/automation/engine/MockAutomationEngineAdapter.ts:1). - Application use-cases: - - [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1) - - [`CheckAuthenticationUseCase`](packages/application/use-cases/CheckAuthenticationUseCase.ts:1) - - [`InitiateLoginUseCase`](packages/application/use-cases/InitiateLoginUseCase.ts:1) - - [`ClearSessionUseCase`](packages/application/use-cases/ClearSessionUseCase.ts:1) - - [`ConfirmCheckoutUseCase`](packages/application/use-cases/ConfirmCheckoutUseCase.ts:1) - - Overlay sync orchestration via [`OverlaySyncService`](packages/application/services/OverlaySyncService.ts:1) and [`IAutomationLifecycleEmitter`](packages/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1). + - [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1) + - [`CheckAuthenticationUseCase`](core/application/use-cases/CheckAuthenticationUseCase.ts:1) + - [`InitiateLoginUseCase`](core/application/use-cases/InitiateLoginUseCase.ts:1) + - [`ClearSessionUseCase`](core/application/use-cases/ClearSessionUseCase.ts:1) + - [`ConfirmCheckoutUseCase`](core/application/use-cases/ConfirmCheckoutUseCase.ts:1) + - Overlay sync orchestration via [`OverlaySyncService`](core/application/services/OverlaySyncService.ts:1) and [`IAutomationLifecycleEmitter`](core/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1). - Exposes methods like `getStartAutomationUseCase()`, `initializeBrowserConnection()`, `getBrowserModeConfigLoader()`, and `refreshBrowserAutomation()` that are used by IPC handlers and tests. - [`ipc-handlers`](apps/companion/main/ipc-handlers.ts) - Translates renderer IPC calls into use-case invocations: - - `startAutomation` → [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1). + - `startAutomation` → [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1). - `checkAuth` / `initiateLogin` / `clearSession` → authentication use-cases. - Browser connection initialization and overlay sync wiring. @@ -607,7 +607,7 @@ The presentation layer in this repo is currently a **single Electron app** that - [`App`](apps/companion/renderer/App.tsx) - Controls high-level UI state: - Authentication state (`AuthState`) and login flow. - - Current [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) passed from the session creation form. + - Current [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) passed from the session creation form. - Session progress tracking (step, state, errors). - Checkout confirmation dialog and race creation success views. - Talks to Electron via `window.electronAPI`: @@ -618,17 +618,17 @@ The presentation layer in this repo is currently a **single Electron app** that - Components (selection): - [`SessionCreationForm`](apps/companion/renderer/components/SessionCreationForm.tsx) - - Collects the data that becomes [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1). + - Collects the data that becomes [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1). - [`SessionProgressMonitor`](apps/companion/renderer/components/SessionProgressMonitor.tsx) - - Visualizes the current step, completed steps, and error state of the [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1). + - Visualizes the current step, completed steps, and error state of the [`AutomationSession`](core/domain/entities/AutomationSession.ts:1). - [`LoginPrompt`](apps/companion/renderer/components/LoginPrompt.tsx) - Renders different messages for `AUTHENTICATED`, `EXPIRED`, `LOGGED_OUT`, `UNKNOWN` states and wires `onLogin`/`onRetry`. - [`BrowserModeToggle`](apps/companion/renderer/components/BrowserModeToggle.tsx) - - Allows switching between headed/headless behavior in development, talking to the [`BrowserModeConfigLoader`](packages/infrastructure/config/BrowserModeConfig.ts:1) through IPC. + - Allows switching between headed/headless behavior in development, talking to the [`BrowserModeConfigLoader`](core/infrastructure/config/BrowserModeConfig.ts:1) through IPC. - [`CheckoutConfirmationDialog`](apps/companion/renderer/components/CheckoutConfirmationDialog.tsx) - Presents a clear, time-bounded dialog where the admin must confirm or cancel a credit purchase-like action. - [`RaceCreationSuccessScreen`](apps/companion/renderer/components/RaceCreationSuccessScreen.tsx) - - Displays the final result of a successful race creation as modeled by [`RaceCreationResult`](packages/domain/value-objects/RaceCreationResult.ts:1). + - Displays the final result of a successful race creation as modeled by [`RaceCreationResult`](core/domain/value-objects/RaceCreationResult.ts:1). The companion app is intentionally a **single presentation layer implemented in this repo**, but the application and domain layers are structured so that other presentation layers (web client, backend orchestration service) can reuse the same automation engine via the same ports. @@ -644,7 +644,7 @@ This subsection summarizes how the GridPilot Web App / Website and the companion - League and season management, scheduling and calendars. - Driver and team views, stats, rating, discovery and social features as described in the concept docs. - Runs in browsers, talking to core platform services over HTTP or GraphQL. -- Produces configuration artifacts such as hosted-session definitions that can be mapped into [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) on the platform side. +- Produces configuration artifacts such as hosted-session definitions that can be mapped into [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) on the platform side. **GridPilot Companion App (desktop presentation, this repo)** @@ -657,9 +657,9 @@ This subsection summarizes how the GridPilot Web App / Website and the companion **Communication pattern between website, platform and companion** - A typical flow for a scheduled league race: - - The web app and core platform services use competition data (league, calendar, formats) to derive a [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) or equivalent structure server-side. + - The web app and core platform services use competition data (league, calendar, formats) to derive a [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) or equivalent structure server-side. - The core platform stores and schedules these configs and can expose them via APIs. - - The companion app fetches or receives the relevant configs, calls into the application layer (for example [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1)) and executes them against iRacing through Playwright. + - The companion app fetches or receives the relevant configs, calls into the application layer (for example [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1)) and executes them against iRacing through Playwright. - Status and results flow back through overlays and events, and can be consumed both by the companion UI and by platform-side stats and rating services. - This repo provides: @@ -679,66 +679,66 @@ This section describes how a typical hosted-session automation run flows through 1. **Admin configures a session** - In the companion UI, the admin fills out [`SessionCreationForm`](apps/companion/renderer/components/SessionCreationForm.tsx). - - The form builds a [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1)-compatible object and calls `window.electronAPI.startAutomation(config)`. + - The form builds a [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1)-compatible object and calls `window.electronAPI.startAutomation(config)`. 2. **IPC → main process** - The preload script forwards this call to an IPC handler in [`ipc-handlers`](apps/companion/main/ipc-handlers.ts). - The handler resolves the singleton [`DIContainer`](apps/companion/main/di-container.ts:1) and obtains: - - [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1). - - [`IAutomationEngine`](packages/application/ports/IAutomationEngine.ts:1) and [`ISessionRepository`](packages/application/ports/ISessionRepository.ts:1) behind the scenes. + - [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1). + - [`IAutomationEngine`](core/application/ports/IAutomationEngine.ts:1) and [`ISessionRepository`](core/application/ports/ISessionRepository.ts:1) behind the scenes. 3. **Use-case and domain** - - [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1): - - Creates a new [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1) by calling `AutomationSession.create(config)`, which validates the core invariants (non-empty session name, track, cars). + - [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1): + - Creates a new [`AutomationSession`](core/domain/entities/AutomationSession.ts:1) by calling `AutomationSession.create(config)`, which validates the core invariants (non-empty session name, track, cars). - Calls `automationEngine.validateConfiguration(config)` to perform more detailed checks (e.g. compatibility with supported wizard flows). - - Persists the new session via [`ISessionRepository`](packages/application/ports/ISessionRepository.ts:1) (implemented by [`InMemorySessionRepository`](packages/infrastructure/repositories/InMemorySessionRepository.ts:1)). + - Persists the new session via [`ISessionRepository`](core/application/ports/ISessionRepository.ts:1) (implemented by [`InMemorySessionRepository`](core/infrastructure/repositories/InMemorySessionRepository.ts:1)). - Returns a DTO to the IPC handler which is forwarded to the renderer. 4. **Browser and Playwright setup** - - The [`DIContainer`](apps/companion/main/di-container.ts:1) uses [`AutomationConfig`](packages/infrastructure/config/AutomationConfig.ts:1) and [`BrowserModeConfig`](packages/infrastructure/config/BrowserModeConfig.ts:1) to: + - The [`DIContainer`](apps/companion/main/di-container.ts:1) uses [`AutomationConfig`](core/infrastructure/config/AutomationConfig.ts:1) and [`BrowserModeConfig`](core/infrastructure/config/BrowserModeConfig.ts:1) to: - Decide between `production`, `development`, `test` modes. - Decide headed vs headless rendering. - - Potentially start a [`FixtureServer`](packages/infrastructure/adapters/automation/engine/FixtureServer.ts:1) in test/fixture modes. - - [`PlaywrightAutomationAdapter`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) connects to a browser and ensures the context is ready via `connect()` / `ensureBrowserContext()`. + - Potentially start a [`FixtureServer`](core/infrastructure/adapters/automation/engine/FixtureServer.ts:1) in test/fixture modes. + - [`PlaywrightAutomationAdapter`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) connects to a browser and ensures the context is ready via `connect()` / `ensureBrowserContext()`. 5. **Authentication and login** - For real iRacing usage: - - [`CheckAuthenticationUseCase`](packages/application/use-cases/CheckAuthenticationUseCase.ts:1) and [`VerifyAuthenticatedPageUseCase`](packages/application/use-cases/VerifyAuthenticatedPageUseCase.ts:1) verify whether the session is still valid. - - If not, the renderer triggers [`InitiateLoginUseCase`](packages/application/use-cases/InitiateLoginUseCase.ts:1) via IPC. + - [`CheckAuthenticationUseCase`](core/application/use-cases/CheckAuthenticationUseCase.ts:1) and [`VerifyAuthenticatedPageUseCase`](core/application/use-cases/VerifyAuthenticatedPageUseCase.ts:1) verify whether the session is still valid. + - If not, the renderer triggers [`InitiateLoginUseCase`](core/application/use-cases/InitiateLoginUseCase.ts:1) via IPC. - The Playwright adapter opens a headed browser window, navigates to the login page, and lets the admin log in manually. - - Once login is complete, [`PlaywrightAuthSessionService`](packages/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService.ts:1) stores cookies in [`SessionCookieStore`](packages/infrastructure/adapters/automation/auth/SessionCookieStore.ts:1), and future runs reuse them. + - Once login is complete, [`PlaywrightAuthSessionService`](core/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService.ts:1) stores cookies in [`SessionCookieStore`](core/infrastructure/adapters/automation/auth/SessionCookieStore.ts:1), and future runs reuse them. 6. **Step-by-step wizard automation** - - The automation engine (implemented by [`AutomationEngineAdapter`](packages/infrastructure/adapters/automation/engine/AutomationEngineAdapter.ts:1) and backed by [`PlaywrightAutomationAdapter`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1)) proceeds through steps: + - The automation engine (implemented by [`AutomationEngineAdapter`](core/infrastructure/adapters/automation/engine/AutomationEngineAdapter.ts:1) and backed by [`PlaywrightAutomationAdapter`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1)) proceeds through steps: - Navigate to hosted sessions. - Open “Create a Race” and the hosted-session wizard. - For each step (race information, server details, admins, cars, tracks, weather, race options, conditions): - - Ensure the correct page is active using [`PageStateValidator`](packages/domain/services/PageStateValidator.ts:1) and selectors from [`IRACING_SELECTORS`](packages/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1). - - Fill fields and toggles using [`IRacingDomInteractor`](packages/infrastructure/adapters/automation/dom/IRacingDomInteractor.ts:1). - - Click the correct “Next” / “Create Race” / “New Race” buttons, guarded by [`SafeClickService`](packages/infrastructure/adapters/automation/dom/SafeClickService.ts:1) and blocked-selector logic. + - Ensure the correct page is active using [`PageStateValidator`](core/domain/services/PageStateValidator.ts:1) and selectors from [`IRACING_SELECTORS`](core/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1). + - Fill fields and toggles using [`IRacingDomInteractor`](core/infrastructure/adapters/automation/dom/IRacingDomInteractor.ts:1). + - Click the correct “Next” / “Create Race” / “New Race” buttons, guarded by [`SafeClickService`](core/infrastructure/adapters/automation/dom/SafeClickService.ts:1) and blocked-selector logic. - At each step, the Playwright adapter: - Updates the overlay via `updateOverlay(step, message)`. - - Emits lifecycle events consumed by [`OverlaySyncService`](packages/application/services/OverlaySyncService.ts:1), which the companion uses to update [`SessionProgressMonitor`](apps/companion/renderer/components/SessionProgressMonitor.tsx). + - Emits lifecycle events consumed by [`OverlaySyncService`](core/application/services/OverlaySyncService.ts:1), which the companion uses to update [`SessionProgressMonitor`](apps/companion/renderer/components/SessionProgressMonitor.tsx). 7. **Checkout and confirmation** - For flows that involve iRacing credits or non-zero prices: - - [`CheckoutPriceExtractor`](packages/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1) is used by the Playwright adapter to parse price and state from the wizard UI. - - [`ConfirmCheckoutUseCase`](packages/application/use-cases/ConfirmCheckoutUseCase.ts:1) sends a confirmation request to the renderer via [`ElectronCheckoutConfirmationAdapter`](packages/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts:1). + - [`CheckoutPriceExtractor`](core/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1) is used by the Playwright adapter to parse price and state from the wizard UI. + - [`ConfirmCheckoutUseCase`](core/application/use-cases/ConfirmCheckoutUseCase.ts:1) sends a confirmation request to the renderer via [`ElectronCheckoutConfirmationAdapter`](core/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts:1). - [`CheckoutConfirmationDialog`](apps/companion/renderer/components/CheckoutConfirmationDialog.tsx) shows the admin the price and state, with an explicit timeout and cancel path. - Only after explicit confirmation does the adapter simulate the checkout sequence (and in real mode, additional safeguards ensure no ToS-violating clicks occur). 8. **Completion and result** - - Once the final step is reached, [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1) transitions into a terminal state (`STOPPED_AT_STEP_18`, `FAILED`, etc.). - - The companion renderer may present a [`RaceCreationResult`](packages/domain/value-objects/RaceCreationResult.ts:1) via [`RaceCreationSuccessScreen`](apps/companion/renderer/components/RaceCreationSuccessScreen.tsx). + - Once the final step is reached, [`AutomationSession`](core/domain/entities/AutomationSession.ts:1) transitions into a terminal state (`STOPPED_AT_STEP_18`, `FAILED`, etc.). + - The companion renderer may present a [`RaceCreationResult`](core/domain/value-objects/RaceCreationResult.ts:1) via [`RaceCreationSuccessScreen`](apps/companion/renderer/components/RaceCreationSuccessScreen.tsx). - The browser context is closed or re-used based on mode and configuration; debug artifacts may be written by the Playwright adapter for failed runs. --- @@ -763,7 +763,7 @@ Although this repo focuses on automation and companion, it is deliberately shape - The automation engine is designed so that a future league platform can: - - Generate [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) from league and calendar data (cars, tracks, formats) defined in the core competition services. + - Generate [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) from league and calendar data (cars, tracks, formats) defined in the core competition services. - Trigger automation runs at scheduled times, with the admin supervising in the companion app. - Use consistent, error-free sessions as the basis for reliable result capture and stats, supporting the narratives in [`DRIVERS.md`](docs/concept/DRIVERS.md), [`TEAMS.md`](docs/concept/TEAMS.md), [`RACING.md`](docs/concept/RACING.md) and [`STATS.md`](docs/concept/STATS.md). @@ -831,7 +831,7 @@ In a future GridPilot platform: - The **automation engine** in this repo would be used as a **hosted-session execution backend**: - - The platform would derive [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) objects from league/season metadata (cars, tracks, formats) defined in the platform. + - The platform would derive [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) objects from league/season metadata (cars, tracks, formats) defined in the platform. - It would call into the automation layer via explicit use-cases or IPC/API, using the same ports used by the companion app today. - The Electron companion may remain the primary operator UI, or an additional headless orchestration mode could be added (still respecting ToS and admin control). @@ -846,13 +846,13 @@ In a future GridPilot platform: The automation domain (sessions, steps, validation) is free of Electron/Playwright details, making it straightforward to embed into other hosts. - **Ports for automation & auth**: - Using [`IAutomationEngine`](packages/application/ports/IAutomationEngine.ts:1), [`IScreenAutomation`](packages/application/ports/IScreenAutomation.ts:1), [`IAuthenticationService`](packages/application/ports/IAuthenticationService.ts:1) means new drivers (or alternative browser runtimes) can be introduced without changing the use-cases. + Using [`IAutomationEngine`](core/application/ports/IAutomationEngine.ts:1), [`IScreenAutomation`](core/application/ports/IScreenAutomation.ts:1), [`IAuthenticationService`](core/application/ports/IAuthenticationService.ts:1) means new drivers (or alternative browser runtimes) can be introduced without changing the use-cases. - **Explicit checkout/confirmation path**: - The combination of [`CheckoutPrice`](packages/domain/value-objects/CheckoutPrice.ts:1), [`CheckoutState`](packages/domain/value-objects/CheckoutState.ts:1), [`CheckoutConfirmation`](packages/domain/value-objects/CheckoutConfirmation.ts:1) and the UI-side confirmation port aligns with the transparency and fairness requirements in [`ADMINS.md`](docs/concept/ADMINS.md) and [`RACING.md`](docs/concept/RACING.md). + The combination of [`CheckoutPrice`](core/domain/value-objects/CheckoutPrice.ts:1), [`CheckoutState`](core/domain/value-objects/CheckoutState.ts:1), [`CheckoutConfirmation`](core/domain/value-objects/CheckoutConfirmation.ts:1) and the UI-side confirmation port aligns with the transparency and fairness requirements in [`ADMINS.md`](docs/concept/ADMINS.md) and [`RACING.md`](docs/concept/RACING.md). - **Overlay and lifecycle emitter**: - The overlay and [`IAutomationLifecycleEmitter`](packages/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) abstraction make it easy to: + The overlay and [`IAutomationLifecycleEmitter`](core/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) abstraction make it easy to: - Drive visual overlays (like those described in admin QoL features) across different frontends. - Feed telemetry into a central stats/ops UI for debugging, while keeping the engine itself small. diff --git a/docs/COMPANION_POC.md b/docs/COMPANION_POC.md index 0d1db10ef..40e3a9f75 100644 --- a/docs/COMPANION_POC.md +++ b/docs/COMPANION_POC.md @@ -120,8 +120,8 @@ src/apps/companion/ ``` **Reused Layers** (100% unchanged): -- **Domain**: [`AutomationSession`](../src/packages/domain/entities/AutomationSession.ts:1), [`SessionState`](../src/packages/domain/value-objects/SessionState.ts:1), [`StepId`](../src/packages/domain/value-objects/StepId.ts:1) -- **Application**: [`StartAutomationSessionUseCase`](../src/packages/application/use-cases/StartAutomationSessionUseCase.ts:1) +- **Domain**: [`AutomationSession`](../src/core/domain/entities/AutomationSession.ts:1), [`SessionState`](../src/core/domain/value-objects/SessionState.ts:1), [`StepId`](../src/core/domain/value-objects/StepId.ts:1) +- **Application**: [`StartAutomationSessionUseCase`](../src/core/application/use-cases/StartAutomationSessionUseCase.ts:1) - **Infrastructure**: [`MockBrowserAutomationAdapter`](../src/infrastructure/adapters/automation/MockBrowserAutomationAdapter.ts:1), [`MockAutomationEngineAdapter`](../src/infrastructure/adapters/automation/MockAutomationEngineAdapter.ts:1), [`InMemorySessionRepository`](../src/infrastructure/repositories/InMemorySessionRepository.ts:1) ### IPC Communication Flow diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 7ca4a5628..183400859 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -57,8 +57,8 @@ This track is grounded in the existing code and architecture: - Hosted wizard flow and step orchestration (see `tests/e2e/steps/*` and `tests/e2e/workflows/*`). - Auth and cookie/session management. -- Overlay lifecycle via [`IAutomationLifecycleEmitter`](packages/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) and [`OverlaySyncService`](packages/application/services/OverlaySyncService.ts:1). -- Checkout safety via [`CheckoutPriceExtractor`](packages/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1), [`ConfirmCheckoutUseCase`](packages/application/use-cases/ConfirmCheckoutUseCase.ts:1), [`ElectronCheckoutConfirmationAdapter`](packages/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts:1) and the renderer dialog. +- Overlay lifecycle via [`IAutomationLifecycleEmitter`](core/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) and [`OverlaySyncService`](core/application/services/OverlaySyncService.ts:1). +- Checkout safety via [`CheckoutPriceExtractor`](core/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1), [`ConfirmCheckoutUseCase`](core/application/use-cases/ConfirmCheckoutUseCase.ts:1), [`ElectronCheckoutConfirmationAdapter`](core/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts:1) and the renderer dialog. - Electron companion UI and IPC wiring. ### Phase A: Solid Hosted-Session Engine & Companion Baseline @@ -68,14 +68,14 @@ This track is grounded in the existing code and architecture: **Automation (this repo)** - [ ] Stabilize wizard step orchestration: - - [ ] Review and align wizard-step domain rules with [`StepTransitionValidator`](packages/domain/services/StepTransitionValidator.ts:1). + - [ ] Review and align wizard-step domain rules with [`StepTransitionValidator`](core/domain/services/StepTransitionValidator.ts:1). - [ ] Ensure `tests/e2e/steps/*` cover all 18 hosted wizard steps end to end. - - [ ] Harden [`WizardStepOrchestrator`](packages/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) behavior for retries and timeouts. + - [ ] Harden [`WizardStepOrchestrator`](core/infrastructure/adapters/automation/core/PlaywrightAutomationAdapter.ts:1) behavior for retries and timeouts. - [ ] Strengthen page validation: - - [ ] Extend [`PageStateValidator`](packages/domain/services/PageStateValidator.ts:1) to cover edge cases found in real-hosted tests. - - [ ] Ensure selector sets in `packages/infrastructure/adapters/automation/dom/*` match current iRacing UI. + - [ ] Extend [`PageStateValidator`](core/domain/services/PageStateValidator.ts:1) to cover edge cases found in real-hosted tests. + - [ ] Ensure selector sets in `core/infrastructure/adapters/automation/dom/*` match current iRacing UI. - [ ] Tighten auth/session flows: - - [ ] Verify [`CheckAuthenticationUseCase`](packages/application/use-cases/CheckAuthenticationUseCase.ts:1), [`InitiateLoginUseCase`](packages/application/use-cases/InitiateLoginUseCase.ts:1), and [`VerifyAuthenticatedPageUseCase`](packages/application/use-cases/VerifyAuthenticatedPageUseCase.ts:1) match the constraints in [`CONCEPT.md`](docs/concept/CONCEPT.md) and [`RACING.md`](docs/concept/RACING.md). + - [ ] Verify [`CheckAuthenticationUseCase`](core/application/use-cases/CheckAuthenticationUseCase.ts:1), [`InitiateLoginUseCase`](core/application/use-cases/InitiateLoginUseCase.ts:1), and [`VerifyAuthenticatedPageUseCase`](core/application/use-cases/VerifyAuthenticatedPageUseCase.ts:1) match the constraints in [`CONCEPT.md`](docs/concept/CONCEPT.md) and [`RACING.md`](docs/concept/RACING.md). - [ ] Confirm cookie handling in `automation/auth/*` matches the lifecycle described in [`ARCHITECTURE.md`](docs/ARCHITECTURE.md). - [ ] Companion baseline: - [ ] Ensure the Electron app boots and connects reliably on supported platforms (see smoke tests in `tests/smoke/*`). @@ -96,8 +96,8 @@ This track is grounded in the existing code and architecture: **Automation (this repo)** - [ ] Lifecycle events: - - [ ] Review events emitted by [`IAutomationLifecycleEmitter`](packages/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) and consumed by [`OverlaySyncService`](packages/application/services/OverlaySyncService.ts:1). - - [ ] Ensure all critical state transitions of [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1) are reflected in overlay events. + - [ ] Review events emitted by [`IAutomationLifecycleEmitter`](core/infrastructure/adapters/IAutomationLifecycleEmitter.ts:1) and consumed by [`OverlaySyncService`](core/application/services/OverlaySyncService.ts:1). + - [ ] Ensure all critical state transitions of [`AutomationSession`](core/domain/entities/AutomationSession.ts:1) are reflected in overlay events. - [ ] Overlay UX: - [ ] Ensure [`SessionProgressMonitor`](apps/companion/renderer/components/SessionProgressMonitor.tsx:1) clearly maps steps 1–18 to admin-understandable labels. - [ ] Align overlay messaging with admin QoL themes in [`ADMINS.md`](docs/concept/ADMINS.md) (less repetitive work, more transparency). @@ -119,11 +119,11 @@ This track is grounded in the existing code and architecture: **Automation (this repo)** - [ ] Enrich checkout detection: - - [ ] Validate selector logic and price parsing in [`CheckoutPriceExtractor`](packages/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1) against current iRacing UI. - - [ ] Ensure [`CheckoutState`](packages/domain/value-objects/CheckoutState.ts:1) covers all relevant button states. + - [ ] Validate selector logic and price parsing in [`CheckoutPriceExtractor`](core/infrastructure/adapters/automation/CheckoutPriceExtractor.ts:1) against current iRacing UI. + - [ ] Ensure [`CheckoutState`](core/domain/value-objects/CheckoutState.ts:1) covers all relevant button states. - [ ] Harden confirmation logic: - - [ ] Confirm [`ConfirmCheckoutUseCase`](packages/application/use-cases/ConfirmCheckoutUseCase.ts:1) is the *only* entry point for automation that proceeds past a non-zero price. - - [ ] Ensure [`ElectronCheckoutConfirmationAdapter`](packages/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts:1) and [`CheckoutConfirmationDialog`](apps/companion/renderer/components/CheckoutConfirmationDialog.tsx:1) enforce explicit admin confirmation and timeouts. + - [ ] Confirm [`ConfirmCheckoutUseCase`](core/application/use-cases/ConfirmCheckoutUseCase.ts:1) is the *only* entry point for automation that proceeds past a non-zero price. + - [ ] Ensure [`ElectronCheckoutConfirmationAdapter`](core/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter.ts:1) and [`CheckoutConfirmationDialog`](apps/companion/renderer/components/CheckoutConfirmationDialog.tsx:1) enforce explicit admin confirmation and timeouts. - [ ] Failure paths: - [ ] Verify that any parsing failure or ambiguous state results in a safe stop, not a blind click. - [ ] Add tests to cover “weird but possible” UI states observed via fixtures. @@ -143,11 +143,11 @@ This track is grounded in the existing code and architecture: - [ ] Map additional hosted workflows: - [ ] Identify additional iRacing hosted flows that align with admin QoL needs from [`ADMINS.md`](docs/concept/ADMINS.md) (e.g. practice-only, league-specific hosted sessions). - - [ ] Encode them as configurations on top of [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) where feasible. + - [ ] Encode them as configurations on top of [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) where feasible. - [ ] Workflow templates: - [ ] Provide a small set of reusable presets (e.g. “standard league race”, “test session”) that can later be populated by external services. - [ ] Resilience work: - - [ ] Improve behavior under partial UI changes (selectors, labels) using the validation patterns from [`PageStateValidator`](packages/domain/services/PageStateValidator.ts:1). + - [ ] Improve behavior under partial UI changes (selectors, labels) using the validation patterns from [`PageStateValidator`](core/domain/services/PageStateValidator.ts:1). **Success criteria** @@ -195,7 +195,7 @@ Each phase is intentionally high-level to avoid going stale; details belong in f - Implement league identity, schedules and season configuration: - public league pages, schedules, rules, rosters (see sections 3 and 4 in [`CONCEPT.md`](docs/concept/CONCEPT.md)). - admin tools for creating seasons, calendars, formats (mirroring [`RACING.md`](docs/concept/RACING.md)). -- Model leagues, seasons and events as first-class entities that can later produce [`HostedSessionConfig`](packages/domain/entities/HostedSessionConfig.ts:1) instances for this repo’s automation engine. +- Model leagues, seasons and events as first-class entities that can later produce [`HostedSessionConfig`](core/domain/entities/HostedSessionConfig.ts:1) instances for this repo’s automation engine. **Success criteria** diff --git a/docs/TECH.md b/docs/TECH.md index fab244985..8653d9dd7 100644 --- a/docs/TECH.md +++ b/docs/TECH.md @@ -205,7 +205,7 @@ Two candidates meet accessibility and performance requirements: ### npm Workspaces - **Rationale:** Built-in, zero configuration, dependency hoisting -- **Structure:** `/src/apps/*`, `/src/packages/*`, `/tests/*` +- **Structure:** `/src/apps/*`, `/src/core/*`, `/tests/*` ### Build Orchestration: Under Evaluation diff --git a/docs/TESTS.md b/docs/TESTS.md index f77137a17..78d4d6b24 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -1131,8 +1131,8 @@ GridPilot's testing strategy ensures: For the iRacing hosted-session automation, confidence is provided by these concrete suites: - **Domain/Application unit tests** - - Entities and value objects such as [`AutomationSession`](packages/domain/entities/AutomationSession.ts:1), [`SessionState`](packages/domain/value-objects/SessionState.ts:1), [`CheckoutState`](packages/domain/value-objects/CheckoutState.ts:1), [`CheckoutConfirmation`](packages/domain/value-objects/CheckoutConfirmation.ts:1), and [`RaceCreationResult`](packages/domain/value-objects/RaceCreationResult.ts:1). - - Use cases such as [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1), [`VerifyAuthenticatedPageUseCase`](packages/application/use-cases/VerifyAuthenticatedPageUseCase.ts:1), [`CompleteRaceCreationUseCase`](packages/application/use-cases/CompleteRaceCreationUseCase.ts:1), and [`ConfirmCheckoutUseCase`](packages/application/use-cases/ConfirmCheckoutUseCase.ts:1). + - Entities and value objects such as [`AutomationSession`](core/domain/entities/AutomationSession.ts:1), [`SessionState`](core/domain/value-objects/SessionState.ts:1), [`CheckoutState`](core/domain/value-objects/CheckoutState.ts:1), [`CheckoutConfirmation`](core/domain/value-objects/CheckoutConfirmation.ts:1), and [`RaceCreationResult`](core/domain/value-objects/RaceCreationResult.ts:1). + - Use cases such as [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1), [`VerifyAuthenticatedPageUseCase`](core/application/use-cases/VerifyAuthenticatedPageUseCase.ts:1), [`CompleteRaceCreationUseCase`](core/application/use-cases/CompleteRaceCreationUseCase.ts:1), and [`ConfirmCheckoutUseCase`](core/application/use-cases/ConfirmCheckoutUseCase.ts:1). - **Infrastructure / automation integration tests** - Adapter wiring and fixture serving via [`FixtureServer.integration.test.ts`](tests/integration/infrastructure/FixtureServer.integration.test.ts:1). @@ -1140,13 +1140,13 @@ For the iRacing hosted-session automation, confidence is provided by these concr - UI/overlay integration via [`renderer-overlay.integration.test.ts`](tests/integration/interface/renderer/renderer-overlay.integration.test.ts:1). - **Fixture-based step E2E tests (per-step behavior)** - - One test per wizard step under [`tests/e2e/steps`](tests/e2e/steps:1), all using the shared [`StepHarness`](tests/e2e/support/StepHarness.ts:1) and [`FixtureServer`](packages/infrastructure/adapters/automation/engine/FixtureServer.ts:1). + - One test per wizard step under [`tests/e2e/steps`](tests/e2e/steps:1), all using the shared [`StepHarness`](tests/e2e/support/StepHarness.ts:1) and [`FixtureServer`](core/infrastructure/adapters/automation/engine/FixtureServer.ts:1). - These validate DOM-level selectors / flows for each step (1–18) against fixture-backed HTML, and are considered canonical for step behavior. - **Fixture-based workflow E2E tests (button → auth entry → automation → confirmation boundary)** - Workflow-focused tests under [`tests/e2e/workflows`](tests/e2e/workflows:1) that drive the `PlaywrightAutomationAdapter` + `WizardStepOrchestrator` across multiple steps using the fixture server. - - Example: [`steps-07-09-cars-flow.e2e.test.ts`](tests/e2e/workflows/steps-07-09-cars-flow.e2e.test.ts:1) exercises cross-step cars flow, while [`full-hosted-session.workflow.e2e.test.ts`](tests/e2e/workflows/full-hosted-session.workflow.e2e.test.ts:1) runs a full 1–18 workflow via [`MockAutomationEngineAdapter`](packages/infrastructure/adapters/automation/engine/MockAutomationEngineAdapter.ts:1) and [`StartAutomationSessionUseCase`](packages/application/use-cases/StartAutomationSessionUseCase.ts:1), asserting final `SessionState` and step position. - - Additional workflow scenarios cover mid-flow failure using [`MockBrowserAutomationAdapter`](packages/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts:1), ensuring failure states and diagnostics are surfaced without emitting false confirmations. + - Example: [`steps-07-09-cars-flow.e2e.test.ts`](tests/e2e/workflows/steps-07-09-cars-flow.e2e.test.ts:1) exercises cross-step cars flow, while [`full-hosted-session.workflow.e2e.test.ts`](tests/e2e/workflows/full-hosted-session.workflow.e2e.test.ts:1) runs a full 1–18 workflow via [`MockAutomationEngineAdapter`](core/infrastructure/adapters/automation/engine/MockAutomationEngineAdapter.ts:1) and [`StartAutomationSessionUseCase`](core/application/use-cases/StartAutomationSessionUseCase.ts:1), asserting final `SessionState` and step position. + - Additional workflow scenarios cover mid-flow failure using [`MockBrowserAutomationAdapter`](core/infrastructure/adapters/automation/engine/MockBrowserAutomationAdapter.ts:1), ensuring failure states and diagnostics are surfaced without emitting false confirmations. - **Opt-in real-world automation smoke tests (legacy)** - The legacy real iRacing automation suite [`automation.e2e.test.ts`](tests/e2e/automation.e2e.test.ts:1) is now a skipped, documentation-only layer. @@ -1182,7 +1182,7 @@ The hosted-session automation stack is covered by layered suites that balance re - **Fixture-backed auto-navigation workflows** - [`full-hosted-session.autonav.workflow.e2e.test.ts`](tests/e2e/workflows/full-hosted-session.autonav.workflow.e2e.test.ts:1) - Uses the real Playwright stack (adapter + `WizardStepOrchestrator` + `FixtureServer`) with auto navigation enabled (`__skipFixtureNavigation` forbidden). - - Drives a representative subset of steps (e.g., 1 → 3 → 7 → 9 → 13 → 17) and asserts each step lands on the expected wizard container via [`IRACING_SELECTORS`](packages/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1). + - Drives a representative subset of steps (e.g., 1 → 3 → 7 → 9 → 13 → 17) and asserts each step lands on the expected wizard container via [`IRACING_SELECTORS`](core/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1). - **Step-level fixture E2Es with explicit mismatch path** - Existing step suites under [`tests/e2e/steps`](tests/e2e/steps:1) now have two execution paths via [`StepHarness`](tests/e2e/support/StepHarness.ts:1): @@ -1265,7 +1265,7 @@ These suites assume the same fixture server and Playwright wiring as the rest of #### Selector ↔ fixture ↔ real DOM guardrail -For hosted-session automation, [`IRACING_SELECTORS`](packages/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1) must match **either**: +For hosted-session automation, [`IRACING_SELECTORS`](core/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1) must match **either**: - The current `html-dumps-optimized` fixtures under [`html-dumps-optimized/iracing-hosted-sessions`](html-dumps-optimized/iracing-hosted-sessions:1), or - The real-site DOM as exercised by the hosted-real tests above. @@ -1287,7 +1287,7 @@ Manual workflow when the iRacing DOM changes: 3. Re-align selectors and tests: - - Update [`IRACING_SELECTORS`](packages/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1) to reflect the new DOM shape. + - Update [`IRACING_SELECTORS`](core/infrastructure/adapters/automation/dom/IRacingSelectors.ts:1) to reflect the new DOM shape. - Fix any failing step/workflow E2Es under [`tests/e2e/steps`](tests/e2e/steps:1) and [`tests/e2e/workflows`](tests/e2e/workflows:1) so they again describe the canonical behavior. - Re-run: - `npm test` diff --git a/package-lock.json b/package-lock.json index dba24d10a..6abefffef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,11 +8,11 @@ "name": "gridpilot", "version": "0.1.0", "workspaces": [ - "packages/*", + "core/*", "apps/*" ], "dependencies": { - "@gridpilot/social": "file:packages/social", + "@gridpilot/social": "file:core/social", "playwright-extra": "^4.3.6", "puppeteer-extra-plugin-stealth": "^2.11.2", "reflect-metadata": "^0.2.2", @@ -194,11 +194,11 @@ "version": "0.1.0", "dependencies": { "@faker-js/faker": "^9.2.0", - "@gridpilot/identity": "file:../../packages/identity", - "@gridpilot/notifications": "file:../../packages/notifications", - "@gridpilot/racing": "file:../../packages/racing", - "@gridpilot/social": "file:../../packages/social", - "@gridpilot/testing-support": "file:../../packages/testing-support", + "@gridpilot/identity": "file:../../core/identity", + "@gridpilot/notifications": "file:../../core/notifications", + "@gridpilot/racing": "file:../../core/racing", + "@gridpilot/social": "file:../../core/social", + "@gridpilot/testing-support": "file:../../core/testing-support", "@vercel/kv": "^3.0.0", "framer-motion": "^12.23.25", "lucide-react": "^0.555.0", @@ -1849,11 +1849,11 @@ } }, "node_modules/@gridpilot/analytics": { - "resolved": "packages/analytics", + "resolved": "core/analytics", "link": true }, "node_modules/@gridpilot/automation": { - "resolved": "packages/automation", + "resolved": "core/automation", "link": true }, "node_modules/@gridpilot/companion": { @@ -1861,27 +1861,27 @@ "link": true }, "node_modules/@gridpilot/identity": { - "resolved": "packages/identity", + "resolved": "core/identity", "link": true }, "node_modules/@gridpilot/media": { - "resolved": "packages/media", + "resolved": "core/media", "link": true }, "node_modules/@gridpilot/notifications": { - "resolved": "packages/notifications", + "resolved": "core/notifications", "link": true }, "node_modules/@gridpilot/racing": { - "resolved": "packages/racing", + "resolved": "core/racing", "link": true }, "node_modules/@gridpilot/social": { - "resolved": "packages/social", + "resolved": "core/social", "link": true }, "node_modules/@gridpilot/testing-support": { - "resolved": "packages/testing-support", + "resolved": "core/testing-support", "link": true }, "node_modules/@gridpilot/website": { @@ -17649,26 +17649,26 @@ "url": "https://github.com/sponsors/colinhacks" } }, - "packages/analytics": { + "core/analytics": { "name": "@gridpilot/analytics", "version": "0.1.0" }, - "packages/automation": { + "core/automation": { "name": "@gridpilot/automation", "version": "0.1.0" }, - "packages/identity": { + "core/identity": { "name": "@gridpilot/identity", "version": "0.1.0", "dependencies": { "zod": "^3.25.76" } }, - "packages/media": { + "core/media": { "name": "@gridpilot/media", "version": "0.1.0" }, - "packages/notifications": { + "core/notifications": { "name": "@gridpilot/notifications", "version": "0.1.0", "dependencies": { @@ -17678,7 +17678,7 @@ "@types/uuid": "^10.0.0" } }, - "packages/racing": { + "core/racing": { "name": "@gridpilot/racing", "version": "0.1.0", "dependencies": { @@ -17688,11 +17688,11 @@ "@types/uuid": "^10.0.0" } }, - "packages/social": { + "core/social": { "name": "@gridpilot/social", "version": "0.1.0" }, - "packages/testing-support": { + "core/testing-support": { "name": "@gridpilot/testing-support", "version": "0.1.0" } diff --git a/package.json b/package.json index eca8088e0..844798d44 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "node": ">=20.0.0" }, "workspaces": [ - "packages/*", + "core/*", "apps/*" ], "scripts": { @@ -83,7 +83,7 @@ "vitest": "^2.1.8" }, "dependencies": { - "@gridpilot/social": "file:packages/social", + "@gridpilot/social": "file:core/social", "playwright-extra": "^4.3.6", "puppeteer-extra-plugin-stealth": "^2.11.2", "reflect-metadata": "^0.2.2", diff --git a/tests/bdd/race-event-performance-summary.test.ts b/tests/bdd/race-event-performance-summary.test.ts index 142fa023f..19983bf5e 100644 --- a/tests/bdd/race-event-performance-summary.test.ts +++ b/tests/bdd/race-event-performance-summary.test.ts @@ -1,14 +1,14 @@ import { describe, it, beforeEach, expect, vi } from 'vitest'; -import { Session } from '../../packages/racing/domain/entities/Session'; -import { RaceEvent } from '../../packages/racing/domain/entities/RaceEvent'; -import { SessionType } from '../../packages/racing/domain/value-objects/SessionType'; -import { MainRaceCompletedEvent } from '../../packages/racing/domain/events/MainRaceCompleted'; -import { RaceEventStewardingClosedEvent } from '../../packages/racing/domain/events/RaceEventStewardingClosed'; -import { SendPerformanceSummaryUseCase } from '../../packages/racing/application/use-cases/SendPerformanceSummaryUseCase'; -import { SendFinalResultsUseCase } from '../../packages/racing/application/use-cases/SendFinalResultsUseCase'; -import { CloseRaceEventStewardingUseCase } from '../../packages/racing/application/use-cases/CloseRaceEventStewardingUseCase'; -import { InMemoryRaceEventRepository } from '../../packages/racing/infrastructure/repositories/InMemoryRaceEventRepository'; -import { InMemorySessionRepository } from '../../packages/racing/infrastructure/repositories/InMemorySessionRepository'; +import { Session } from '../../core/racing/domain/entities/Session'; +import { RaceEvent } from '../../core/racing/domain/entities/RaceEvent'; +import { SessionType } from '../../core/racing/domain/value-objects/SessionType'; +import { MainRaceCompletedEvent } from '../../core/racing/domain/events/MainRaceCompleted'; +import { RaceEventStewardingClosedEvent } from '../../core/racing/domain/events/RaceEventStewardingClosed'; +import { SendPerformanceSummaryUseCase } from '../../core/racing/application/use-cases/SendPerformanceSummaryUseCase'; +import { SendFinalResultsUseCase } from '../../core/racing/application/use-cases/SendFinalResultsUseCase'; +import { CloseRaceEventStewardingUseCase } from '../../core/racing/application/use-cases/CloseRaceEventStewardingUseCase'; +import { InMemoryRaceEventRepository } from '../../core/racing/infrastructure/repositories/InMemoryRaceEventRepository'; +import { InMemorySessionRepository } from '../../core/racing/infrastructure/repositories/InMemorySessionRepository'; // Mock notification service const mockNotificationService = { diff --git a/tests/e2e/automation.e2e.test.ts b/tests/e2e/automation.e2e.test.ts index b952f2862..942ef1938 100644 --- a/tests/e2e/automation.e2e.test.ts +++ b/tests/e2e/automation.e2e.test.ts @@ -3,9 +3,9 @@ import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; import { FixtureServer, PlaywrightAutomationAdapter, -} from 'packages/automation/infrastructure/adapters/automation'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; +} from 'core/automation/infrastructure/adapters/automation'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; describe('Real Playwright hosted-session smoke (fixtures, steps 2–7)', () => { let server: FixtureServer; diff --git a/tests/e2e/companion/companion-ui-full-workflow.e2e.test.ts b/tests/e2e/companion/companion-ui-full-workflow.e2e.test.ts index 12850ba5d..3ffc3be10 100644 --- a/tests/e2e/companion/companion-ui-full-workflow.e2e.test.ts +++ b/tests/e2e/companion/companion-ui-full-workflow.e2e.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import { DIContainer } from '../../../apps/companion/main/di-container'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; import type { HostedSessionConfig } from '@gridpilot/automation/domain/types/HostedSessionConfig'; -import { PlaywrightAutomationAdapter } from 'packages/automation/infrastructure/adapters/automation'; +import { PlaywrightAutomationAdapter } from 'core/automation/infrastructure/adapters/automation'; describe('Companion UI - hosted workflow via fixture-backed real stack', () => { let container: DIContainer; diff --git a/tests/e2e/hosted-real/cars-flow.real.e2e.test.ts b/tests/e2e/hosted-real/cars-flow.real.e2e.test.ts index dee4c6a3d..e85d4bdf2 100644 --- a/tests/e2e/hosted-real/cars-flow.real.e2e.test.ts +++ b/tests/e2e/hosted-real/cars-flow.real.e2e.test.ts @@ -2,12 +2,12 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; import { PlaywrightAutomationAdapter, -} from 'packages/automation/infrastructure/adapters/automation'; +} from 'core/automation/infrastructure/adapters/automation'; import { IRACING_SELECTORS, IRACING_TIMEOUTS, -} from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; +} from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; const shouldRun = process.env.HOSTED_REAL_E2E === '1'; const describeMaybe = shouldRun ? describe : describe.skip; diff --git a/tests/e2e/hosted-real/login-and-wizard-smoke.e2e.test.ts b/tests/e2e/hosted-real/login-and-wizard-smoke.e2e.test.ts index a1e654c12..765812502 100644 --- a/tests/e2e/hosted-real/login-and-wizard-smoke.e2e.test.ts +++ b/tests/e2e/hosted-real/login-and-wizard-smoke.e2e.test.ts @@ -2,12 +2,12 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; import { PlaywrightAutomationAdapter, -} from 'packages/automation/infrastructure/adapters/automation'; +} from 'core/automation/infrastructure/adapters/automation'; import { IRACING_SELECTORS, IRACING_TIMEOUTS, -} from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; +} from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; const shouldRun = process.env.HOSTED_REAL_E2E === '1'; diff --git a/tests/e2e/hosted-real/step-03-race-information.real.e2e.test.ts b/tests/e2e/hosted-real/step-03-race-information.real.e2e.test.ts index baf3be067..836ef6a0f 100644 --- a/tests/e2e/hosted-real/step-03-race-information.real.e2e.test.ts +++ b/tests/e2e/hosted-real/step-03-race-information.real.e2e.test.ts @@ -4,12 +4,12 @@ import path from 'path'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; import { PlaywrightAutomationAdapter, -} from 'packages/automation/infrastructure/adapters/automation'; +} from 'core/automation/infrastructure/adapters/automation'; import { IRACING_SELECTORS, IRACING_TIMEOUTS, -} from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; +} from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; const shouldRun = process.env.HOSTED_REAL_E2E === '1'; const describeMaybe = shouldRun ? describe : describe.skip; diff --git a/tests/e2e/steps/step-02-create-race.e2e.test.ts b/tests/e2e/steps/step-02-create-race.e2e.test.ts index 3ac395876..98b4b7896 100644 --- a/tests/e2e/steps/step-02-create-race.e2e.test.ts +++ b/tests/e2e/steps/step-02-create-race.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 2 – create race', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-03-race-information.e2e.test.ts b/tests/e2e/steps/step-03-race-information.e2e.test.ts index ae62d68e8..c68152cf2 100644 --- a/tests/e2e/steps/step-03-race-information.e2e.test.ts +++ b/tests/e2e/steps/step-03-race-information.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 3 – race information', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-04-server-details.e2e.test.ts b/tests/e2e/steps/step-04-server-details.e2e.test.ts index 2869cd7b5..1cad85da9 100644 --- a/tests/e2e/steps/step-04-server-details.e2e.test.ts +++ b/tests/e2e/steps/step-04-server-details.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 4 – server details', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-05-set-admins.e2e.test.ts b/tests/e2e/steps/step-05-set-admins.e2e.test.ts index 3c924a013..021f6295b 100644 --- a/tests/e2e/steps/step-05-set-admins.e2e.test.ts +++ b/tests/e2e/steps/step-05-set-admins.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 5 – set admins', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-06-admins.e2e.test.ts b/tests/e2e/steps/step-06-admins.e2e.test.ts index c9e44b2c5..f96d5dc55 100644 --- a/tests/e2e/steps/step-06-admins.e2e.test.ts +++ b/tests/e2e/steps/step-06-admins.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 6 – admins', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-07-time-limits.e2e.test.ts b/tests/e2e/steps/step-07-time-limits.e2e.test.ts index b16157c20..f597a5c5a 100644 --- a/tests/e2e/steps/step-07-time-limits.e2e.test.ts +++ b/tests/e2e/steps/step-07-time-limits.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 7 – time limits', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-08-cars.e2e.test.ts b/tests/e2e/steps/step-08-cars.e2e.test.ts index 59e0381dc..8fc747a3d 100644 --- a/tests/e2e/steps/step-08-cars.e2e.test.ts +++ b/tests/e2e/steps/step-08-cars.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 8 – cars', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-13-track-options.e2e.test.ts b/tests/e2e/steps/step-13-track-options.e2e.test.ts index 7921fc8df..566fa4b59 100644 --- a/tests/e2e/steps/step-13-track-options.e2e.test.ts +++ b/tests/e2e/steps/step-13-track-options.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 13 – track options', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-14-time-of-day.e2e.test.ts b/tests/e2e/steps/step-14-time-of-day.e2e.test.ts index ebb81be08..153d0d4d9 100644 --- a/tests/e2e/steps/step-14-time-of-day.e2e.test.ts +++ b/tests/e2e/steps/step-14-time-of-day.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 14 – time of day', () => { let harness: StepHarness; diff --git a/tests/e2e/steps/step-15-weather.e2e.test.ts b/tests/e2e/steps/step-15-weather.e2e.test.ts index d0cca3b46..ce8e65603 100644 --- a/tests/e2e/steps/step-15-weather.e2e.test.ts +++ b/tests/e2e/steps/step-15-weather.e2e.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { StepHarness } from '../support/StepHarness'; import { createStepHarness } from '../support/StepHarness'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; describe('Step 15 – weather', () => { let harness: StepHarness; diff --git a/tests/e2e/support/AutoNavGuard.ts b/tests/e2e/support/AutoNavGuard.ts index 0a4fcb383..eca8a3a5f 100644 --- a/tests/e2e/support/AutoNavGuard.ts +++ b/tests/e2e/support/AutoNavGuard.ts @@ -1,6 +1,6 @@ import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; -import type { PlaywrightAutomationAdapter } from 'packages/automation/infrastructure/adapters/automation'; -import type { AutomationResult } from 'packages/automation/application/ports/AutomationResults'; +import type { PlaywrightAutomationAdapter } from 'core/automation/infrastructure/adapters/automation'; +import type { AutomationResult } from 'core/automation/application/ports/AutomationResults'; export function assertAutoNavigationConfig(config: Record): void { const skipFixtureNavigationFlag = diff --git a/tests/e2e/support/StepHarness.ts b/tests/e2e/support/StepHarness.ts index 48b9d537e..ea0c2ada0 100644 --- a/tests/e2e/support/StepHarness.ts +++ b/tests/e2e/support/StepHarness.ts @@ -1,10 +1,10 @@ -import type { AutomationResult } from 'packages/automation/application/ports/AutomationResults'; +import type { AutomationResult } from 'core/automation/application/ports/AutomationResults'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; import { PlaywrightAutomationAdapter, FixtureServer, -} from 'packages/automation/infrastructure/adapters/automation'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; +} from 'core/automation/infrastructure/adapters/automation'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; export interface StepHarness { server: FixtureServer; diff --git a/tests/e2e/validators/hosted-validator-guards.e2e.test.ts b/tests/e2e/validators/hosted-validator-guards.e2e.test.ts index 0e7e0d2ab..e09372e11 100644 --- a/tests/e2e/validators/hosted-validator-guards.e2e.test.ts +++ b/tests/e2e/validators/hosted-validator-guards.e2e.test.ts @@ -2,9 +2,9 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import { PlaywrightAutomationAdapter, FixtureServer, -} from 'packages/automation/infrastructure/adapters/automation'; +} from 'core/automation/infrastructure/adapters/automation'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; import { executeStepWithAutoNavigationGuard } from '../support/AutoNavGuard'; describe('Hosted validator guards (fixture-backed, real stack)', () => { diff --git a/tests/e2e/workflows/full-hosted-session.autonav.workflow.e2e.test.ts b/tests/e2e/workflows/full-hosted-session.autonav.workflow.e2e.test.ts index 9f8edc6ba..bd1314f62 100644 --- a/tests/e2e/workflows/full-hosted-session.autonav.workflow.e2e.test.ts +++ b/tests/e2e/workflows/full-hosted-session.autonav.workflow.e2e.test.ts @@ -2,10 +2,10 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import { PlaywrightAutomationAdapter, FixtureServer, -} from 'packages/automation/infrastructure/adapters/automation'; +} from 'core/automation/infrastructure/adapters/automation'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; import { executeStepWithAutoNavigationGuard } from '../support/AutoNavGuard'; describe('Workflow – hosted session autonav slice (fixture-backed, real stack)', () => { diff --git a/tests/e2e/workflows/full-hosted-session.workflow.e2e.test.ts b/tests/e2e/workflows/full-hosted-session.workflow.e2e.test.ts index 2afdc9634..8f62f868e 100644 --- a/tests/e2e/workflows/full-hosted-session.workflow.e2e.test.ts +++ b/tests/e2e/workflows/full-hosted-session.workflow.e2e.test.ts @@ -2,12 +2,12 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import { PlaywrightAutomationAdapter, FixtureServer, -} from 'packages/automation/infrastructure/adapters/automation'; -import { InMemorySessionRepository } from 'packages/automation/infrastructure/repositories/InMemorySessionRepository'; -import { AutomationEngineAdapter } from 'packages/automation/infrastructure/adapters/automation/engine/AutomationEngineAdapter'; -import { StartAutomationSessionUseCase } from 'packages/automation/application/use-cases/StartAutomationSessionUseCase'; +} from 'core/automation/infrastructure/adapters/automation'; +import { InMemorySessionRepository } from 'core/automation/infrastructure/repositories/InMemorySessionRepository'; +import { AutomationEngineAdapter } from 'core/automation/infrastructure/adapters/automation/engine/AutomationEngineAdapter'; +import { StartAutomationSessionUseCase } from 'core/automation/application/use-cases/StartAutomationSessionUseCase'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; describe('Workflow – hosted session end-to-end (fixture-backed, real stack)', () => { let server: FixtureServer; diff --git a/tests/e2e/workflows/steps-07-09-cars-flow.e2e.test.ts b/tests/e2e/workflows/steps-07-09-cars-flow.e2e.test.ts index 3d026423a..6c2807cf5 100644 --- a/tests/e2e/workflows/steps-07-09-cars-flow.e2e.test.ts +++ b/tests/e2e/workflows/steps-07-09-cars-flow.e2e.test.ts @@ -2,10 +2,10 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import { PlaywrightAutomationAdapter, FixtureServer, -} from 'packages/automation/infrastructure/adapters/automation'; +} from 'core/automation/infrastructure/adapters/automation'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; -import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; -import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter'; +import { IRACING_SELECTORS } from 'core/automation/infrastructure/adapters/automation/dom/IRacingSelectors'; +import { PinoLogAdapter } from 'core/automation/infrastructure/adapters/logging/PinoLogAdapter'; describe('Workflow – steps 7–9 cars flow (fixture-backed, real stack)', () => { let adapter: PlaywrightAutomationAdapter; diff --git a/tests/integration/infrastructure/BrowserModeIntegration.test.ts b/tests/integration/infrastructure/BrowserModeIntegration.test.ts index 9f0a5e705..e9e060419 100644 --- a/tests/integration/infrastructure/BrowserModeIntegration.test.ts +++ b/tests/integration/infrastructure/BrowserModeIntegration.test.ts @@ -87,7 +87,7 @@ describe('Browser Mode Integration - GREEN Phase', () => { }); const { PlaywrightAutomationAdapter } = await import( - 'packages/automation/infrastructure/adapters/automation' + 'core/automation/infrastructure/adapters/automation' ); adapter = new PlaywrightAutomationAdapter({ @@ -111,7 +111,7 @@ describe('Browser Mode Integration - GREEN Phase', () => { }); const { PlaywrightAutomationAdapter } = await import( - 'packages/automation/infrastructure/adapters/automation' + 'core/automation/infrastructure/adapters/automation' ); adapter = new PlaywrightAutomationAdapter({ @@ -135,7 +135,7 @@ describe('Browser Mode Integration - GREEN Phase', () => { }); const { PlaywrightAutomationAdapter } = await import( - 'packages/automation/infrastructure/adapters/automation' + 'core/automation/infrastructure/adapters/automation' ); adapter = new PlaywrightAutomationAdapter({ @@ -164,7 +164,7 @@ describe('Browser Mode Integration - GREEN Phase', () => { }); const { PlaywrightAutomationAdapter } = await import( - 'packages/automation/infrastructure/adapters/automation' + 'core/automation/infrastructure/adapters/automation' ); adapter = new PlaywrightAutomationAdapter({ @@ -185,7 +185,7 @@ describe('Browser Mode Integration - GREEN Phase', () => { }); const { PlaywrightAutomationAdapter } = await import( - 'packages/automation/infrastructure/adapters/automation' + 'core/automation/infrastructure/adapters/automation' ); adapter = new PlaywrightAutomationAdapter({ @@ -228,7 +228,7 @@ describe('Browser Mode Integration - GREEN Phase', () => { }; const { PlaywrightAutomationAdapter } = await import( - 'packages/automation/infrastructure/adapters/automation' + 'core/automation/infrastructure/adapters/automation' ); adapter = new PlaywrightAutomationAdapter( @@ -259,7 +259,7 @@ describe('Browser Mode Integration - GREEN Phase', () => { }); const { PlaywrightAutomationAdapter } = await import( - 'packages/automation/infrastructure/adapters/automation' + 'core/automation/infrastructure/adapters/automation' ); const userDataDir = path.join(process.cwd(), 'test-browser-data'); @@ -290,10 +290,10 @@ describe('Browser Mode Integration - GREEN Phase', () => { configurable: true }); const { PlaywrightAutomationAdapter } = await import( - 'packages/automation/infrastructure/adapters/automation' + 'core/automation/infrastructure/adapters/automation' ); const { BrowserModeConfigLoader } = await import( - '../../../packages/automation/infrastructure/config/BrowserModeConfig' + '../../../core/automation/infrastructure/config/BrowserModeConfig' ); // Create loader and set to headed diff --git a/tests/integration/infrastructure/CheckoutPriceExtractor.test.ts b/tests/integration/infrastructure/CheckoutPriceExtractor.test.ts index a9ccc85e1..00b758ee3 100644 --- a/tests/integration/infrastructure/CheckoutPriceExtractor.test.ts +++ b/tests/integration/infrastructure/CheckoutPriceExtractor.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, beforeEach, vi } from 'vitest'; -import { Result } from '../../../packages/shared/result/Result'; -import { CheckoutPriceExtractor } from '../../../packages/automation/infrastructure/adapters/automation/CheckoutPriceExtractor'; +import { Result } from '../../../core/shared/result/Result'; +import { CheckoutPriceExtractor } from '../../../core/automation/infrastructure/adapters/automation/CheckoutPriceExtractor'; import { CheckoutStateEnum } from '@gridpilot/automation/domain/value-objects/CheckoutState'; /** diff --git a/tests/integration/infrastructure/FixtureServer.integration.test.ts b/tests/integration/infrastructure/FixtureServer.integration.test.ts index 1d75af1a5..aacf16cda 100644 --- a/tests/integration/infrastructure/FixtureServer.integration.test.ts +++ b/tests/integration/infrastructure/FixtureServer.integration.test.ts @@ -3,7 +3,7 @@ */ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; -import { FixtureServer, getAllStepFixtureMappings, PlaywrightAutomationAdapter } from 'packages/automation/infrastructure/adapters/automation'; +import { FixtureServer, getAllStepFixtureMappings, PlaywrightAutomationAdapter } from 'core/automation/infrastructure/adapters/automation'; declare const getComputedStyle: any; declare const document: any; diff --git a/tests/integration/infrastructure/InMemorySessionRepository.test.ts b/tests/integration/infrastructure/InMemorySessionRepository.test.ts index f0a7c1e34..bc54475db 100644 --- a/tests/integration/infrastructure/InMemorySessionRepository.test.ts +++ b/tests/integration/infrastructure/InMemorySessionRepository.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, beforeEach } from 'vitest'; -import { InMemorySessionRepository } from '../../../packages/automation/infrastructure/repositories/InMemorySessionRepository'; +import { InMemorySessionRepository } from '../../../core/automation/infrastructure/repositories/InMemorySessionRepository'; import { AutomationSession } from '@gridpilot/automation/domain/entities/AutomationSession'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; diff --git a/tests/integration/infrastructure/MockBrowserAutomationAdapter.test.ts b/tests/integration/infrastructure/MockBrowserAutomationAdapter.test.ts index 724ffc1a3..b22e71cda 100644 --- a/tests/integration/infrastructure/MockBrowserAutomationAdapter.test.ts +++ b/tests/integration/infrastructure/MockBrowserAutomationAdapter.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; -import { MockBrowserAutomationAdapter } from 'packages/automation/infrastructure/adapters/automation'; +import { MockBrowserAutomationAdapter } from 'core/automation/infrastructure/adapters/automation'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; describe('MockBrowserAutomationAdapter Integration Tests', () => { diff --git a/tests/integration/infrastructure/automation/CarsFlow.integration.test.ts b/tests/integration/infrastructure/automation/CarsFlow.integration.test.ts index 2e0e21892..6a0150690 100644 --- a/tests/integration/infrastructure/automation/CarsFlow.integration.test.ts +++ b/tests/integration/infrastructure/automation/CarsFlow.integration.test.ts @@ -1,6 +1,6 @@ import { describe, test, expect } from 'vitest' import type { Page } from 'playwright' -import { PlaywrightAutomationAdapter } from 'packages/automation/infrastructure/adapters/automation' +import { PlaywrightAutomationAdapter } from 'core/automation/infrastructure/adapters/automation' describe('CarsFlow integration', () => { test('adapter emits panel-attached then action-started then action-complete for performAddCar', async () => { diff --git a/tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts b/tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts index dd4f1f8ab..e51e8644b 100644 --- a/tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts +++ b/tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts @@ -1,14 +1,14 @@ import { describe, it, expect } from 'vitest'; -import { OverlaySyncService } from 'packages/automation/application/services/OverlaySyncService'; -import type { AutomationEvent } from 'packages/automation/application/ports/IAutomationEventPublisher'; +import { OverlaySyncService } from 'core/automation/application/services/OverlaySyncService'; +import type { AutomationEvent } from 'core/automation/application/ports/IAutomationEventPublisher'; import type { IAutomationLifecycleEmitter, LifecycleCallback, -} from 'packages/automation/infrastructure/adapters/IAutomationLifecycleEmitter'; +} from 'core/automation/infrastructure/adapters/IAutomationLifecycleEmitter'; import type { OverlayAction, ActionAck, -} from 'packages/automation/application/ports/IOverlaySyncPort'; +} from 'core/automation/application/ports/IOverlaySyncPort'; class TestLifecycleEmitter implements IAutomationLifecycleEmitter { private callbacks: Set = new Set(); diff --git a/tests/integration/interface/companion/companion-start-automation.browser-mode-refresh.integration.test.ts b/tests/integration/interface/companion/companion-start-automation.browser-mode-refresh.integration.test.ts index e37f2dbf5..022dceaf8 100644 --- a/tests/integration/interface/companion/companion-start-automation.browser-mode-refresh.integration.test.ts +++ b/tests/integration/interface/companion/companion-start-automation.browser-mode-refresh.integration.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { DIContainer } from '../../../..//apps/companion/main/di-container'; import type { HostedSessionConfig } from '@gridpilot/automation/domain/types/HostedSessionConfig'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; -import { PlaywrightAutomationAdapter } from '../../../..//packages/automation/infrastructure/adapters/automation'; +import { PlaywrightAutomationAdapter } from '../../../..//core/automation/infrastructure/adapters/automation'; describe('companion start automation - browser mode refresh wiring', () => { const originalEnv = { ...process.env }; diff --git a/tests/integration/interface/companion/companion-start-automation.browser-not-connected.integration.test.ts b/tests/integration/interface/companion/companion-start-automation.browser-not-connected.integration.test.ts index 3c372a41f..735441e28 100644 --- a/tests/integration/interface/companion/companion-start-automation.browser-not-connected.integration.test.ts +++ b/tests/integration/interface/companion/companion-start-automation.browser-not-connected.integration.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { DIContainer } from '../../../..//apps/companion/main/di-container'; import type { HostedSessionConfig } from '@gridpilot/automation/domain/types/HostedSessionConfig'; import { StepId } from '@gridpilot/automation/domain/value-objects/StepId'; -import { PlaywrightAutomationAdapter } from '../../../..//packages/automation/infrastructure/adapters/automation'; +import { PlaywrightAutomationAdapter } from '../../../..//core/automation/infrastructure/adapters/automation'; describe('companion start automation - browser not connected at step 1', () => { const originalEnv = { ...process.env }; diff --git a/tests/integration/interface/companion/companion-start-automation.connection-failure.integration.test.ts b/tests/integration/interface/companion/companion-start-automation.connection-failure.integration.test.ts index 55a4a4685..4f6660cec 100644 --- a/tests/integration/interface/companion/companion-start-automation.connection-failure.integration.test.ts +++ b/tests/integration/interface/companion/companion-start-automation.connection-failure.integration.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; import { DIContainer } from '../../../..//apps/companion/main/di-container'; import type { HostedSessionConfig } from '@gridpilot/automation/domain/types/HostedSessionConfig'; -import { PlaywrightAutomationAdapter } from '../../../..//packages/automation/infrastructure/adapters/automation'; +import { PlaywrightAutomationAdapter } from '../../../..//core/automation/infrastructure/adapters/automation'; describe('companion start automation - browser connection failure before steps', () => { const originalEnv = { ...process.env }; diff --git a/tests/integration/interface/renderer/renderer-overlay-lifecycle.integration.test.ts b/tests/integration/interface/renderer/renderer-overlay-lifecycle.integration.test.ts index 4cffaf5da..72fefa366 100644 --- a/tests/integration/interface/renderer/renderer-overlay-lifecycle.integration.test.ts +++ b/tests/integration/interface/renderer/renderer-overlay-lifecycle.integration.test.ts @@ -1,8 +1,8 @@ import { describe, it, expect } from 'vitest'; import { MockAutomationLifecycleEmitter } from '../../../mocks/MockAutomationLifecycleEmitter'; -import { OverlaySyncService } from 'packages/automation/application/services/OverlaySyncService'; -import type { AutomationEvent } from 'packages/automation/application/ports/IAutomationEventPublisher'; -import type { OverlayAction } from 'packages/automation/application/ports/IOverlaySyncPort'; +import { OverlaySyncService } from 'core/automation/application/services/OverlaySyncService'; +import type { AutomationEvent } from 'core/automation/application/ports/IAutomationEventPublisher'; +import type { OverlayAction } from 'core/automation/application/ports/IOverlaySyncPort'; type RendererOverlayState = | { status: 'idle' } diff --git a/tests/integration/interface/renderer/renderer-overlay.integration.test.ts b/tests/integration/interface/renderer/renderer-overlay.integration.test.ts index b57ef7aa8..3d372fa9f 100644 --- a/tests/integration/interface/renderer/renderer-overlay.integration.test.ts +++ b/tests/integration/interface/renderer/renderer-overlay.integration.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest' import { MockAutomationLifecycleEmitter } from '../../../mocks/MockAutomationLifecycleEmitter' -import { OverlaySyncService } from 'packages/automation/application/services/OverlaySyncService' +import { OverlaySyncService } from 'core/automation/application/services/OverlaySyncService' describe('renderer overlay integration', () => { test('renderer shows confirmed only after main acks confirmed', async () => { diff --git a/tests/smoke/electron-init.smoke.test.ts b/tests/smoke/electron-init.smoke.test.ts index 4d0874f12..aac30dd2e 100644 --- a/tests/smoke/electron-init.smoke.test.ts +++ b/tests/smoke/electron-init.smoke.test.ts @@ -1,13 +1,13 @@ import { describe, it, expect, beforeEach, vi } from 'vitest'; import { DIContainer } from '../../apps/companion/main/di-container'; -import { StartAutomationSessionUseCase } from '../../packages/automation/application/use-cases/StartAutomationSessionUseCase'; -import { CheckAuthenticationUseCase } from '../../packages/automation/application/use-cases/CheckAuthenticationUseCase'; -import { InitiateLoginUseCase } from '../../packages/automation/application/use-cases/InitiateLoginUseCase'; -import { ClearSessionUseCase } from '../../packages/automation/application/use-cases/ClearSessionUseCase'; -import { ConfirmCheckoutUseCase } from '../../packages/automation/application/use-cases/ConfirmCheckoutUseCase'; -import { PlaywrightAutomationAdapter } from 'packages/automation/infrastructure/adapters/automation'; -import { InMemorySessionRepository } from '../../packages/automation/infrastructure/repositories/InMemorySessionRepository'; -import { NoOpLogAdapter } from '../../packages/automation/infrastructure/adapters/logging/NoOpLogAdapter'; +import { StartAutomationSessionUseCase } from '../../core/automation/application/use-cases/StartAutomationSessionUseCase'; +import { CheckAuthenticationUseCase } from '../../core/automation/application/use-cases/CheckAuthenticationUseCase'; +import { InitiateLoginUseCase } from '../../core/automation/application/use-cases/InitiateLoginUseCase'; +import { ClearSessionUseCase } from '../../core/automation/application/use-cases/ClearSessionUseCase'; +import { ConfirmCheckoutUseCase } from '../../core/automation/application/use-cases/ConfirmCheckoutUseCase'; +import { PlaywrightAutomationAdapter } from 'core/automation/infrastructure/adapters/automation'; +import { InMemorySessionRepository } from '../../core/automation/infrastructure/repositories/InMemorySessionRepository'; +import { NoOpLogAdapter } from '../../core/automation/infrastructure/adapters/logging/NoOpLogAdapter'; // Mock Electron's app module vi.mock('electron', () => ({ diff --git a/tests/smoke/playwright-init.smoke.test.ts b/tests/smoke/playwright-init.smoke.test.ts index 8c8e4b626..7106a2ab2 100644 --- a/tests/smoke/playwright-init.smoke.test.ts +++ b/tests/smoke/playwright-init.smoke.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, afterEach, beforeAll, afterAll } from 'vitest'; -import { PlaywrightAutomationAdapter, FixtureServer } from 'packages/automation/infrastructure/adapters/automation'; -import { NoOpLogAdapter } from '../../packages/automation/infrastructure/adapters/logging/NoOpLogAdapter'; +import { PlaywrightAutomationAdapter, FixtureServer } from 'core/automation/infrastructure/adapters/automation'; +import { NoOpLogAdapter } from '../../core/automation/infrastructure/adapters/logging/NoOpLogAdapter'; describe('Playwright Adapter Smoke Tests', () => { let adapter: PlaywrightAutomationAdapter | undefined; diff --git a/tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts b/tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts index 434b7f74c..15b06b4de 100644 --- a/tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts +++ b/tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts @@ -1,4 +1,4 @@ -import { AnalyticsEntityId } from '../../../../../packages/analytics/domain/value-objects/AnalyticsEntityId'; +import { AnalyticsEntityId } from '../../../../../core/analytics/domain/value-objects/AnalyticsEntityId'; describe('AnalyticsEntityId', () => { it('creates a valid AnalyticsEntityId from a non-empty string', () => { diff --git a/tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts b/tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts index d7cad466b..11e3ed1b6 100644 --- a/tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts +++ b/tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts @@ -1,4 +1,4 @@ -import { AnalyticsSessionId } from '../../../../../packages/analytics/domain/value-objects/AnalyticsSessionId'; +import { AnalyticsSessionId } from '../../../../../core/analytics/domain/value-objects/AnalyticsSessionId'; describe('AnalyticsSessionId', () => { it('creates a valid AnalyticsSessionId from a non-empty string', () => { diff --git a/tests/unit/analytics/domain/value-objects/PageViewId.test.ts b/tests/unit/analytics/domain/value-objects/PageViewId.test.ts index 6ac2da2c2..75adebb2e 100644 --- a/tests/unit/analytics/domain/value-objects/PageViewId.test.ts +++ b/tests/unit/analytics/domain/value-objects/PageViewId.test.ts @@ -1,4 +1,4 @@ -import { PageViewId } from '../../../../../packages/analytics/domain/value-objects/PageViewId'; +import { PageViewId } from '../../../../../core/analytics/domain/value-objects/PageViewId'; describe('PageViewId', () => { it('creates a valid PageViewId from a non-empty string', () => { diff --git a/tests/unit/application/services/OverlaySyncService.test.ts b/tests/unit/application/services/OverlaySyncService.test.ts index 4bdf5f5fd..ab0b12671 100644 --- a/tests/unit/application/services/OverlaySyncService.test.ts +++ b/tests/unit/application/services/OverlaySyncService.test.ts @@ -1,8 +1,8 @@ import { describe, expect, test } from 'vitest' -import { OverlayAction, ActionAck } from '../../../../packages/automation/application/ports/IOverlaySyncPort' -import { IAutomationEventPublisher, AutomationEvent } from '../../../../packages/automation/application/ports/IAutomationEventPublisher' -import { IAutomationLifecycleEmitter, LifecycleCallback } from '../../../../packages/automation/infrastructure/adapters/IAutomationLifecycleEmitter' -import { OverlaySyncService } from '../../../../packages/automation/application/services/OverlaySyncService' +import { OverlayAction, ActionAck } from '../../../../core/automation/application/ports/IOverlaySyncPort' +import { IAutomationEventPublisher, AutomationEvent } from '../../../../core/automation/application/ports/IAutomationEventPublisher' +import { IAutomationLifecycleEmitter, LifecycleCallback } from '../../../../core/automation/infrastructure/adapters/IAutomationLifecycleEmitter' +import { OverlaySyncService } from '../../../../core/automation/application/services/OverlaySyncService' class MockLifecycleEmitter implements IAutomationLifecycleEmitter { private callbacks: Set = new Set() diff --git a/tests/unit/application/services/OverlaySyncService.timeout.test.ts b/tests/unit/application/services/OverlaySyncService.timeout.test.ts index 88418c568..f5f87dc02 100644 --- a/tests/unit/application/services/OverlaySyncService.timeout.test.ts +++ b/tests/unit/application/services/OverlaySyncService.timeout.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest' -import { OverlayAction } from '../../../../packages/automation/application/ports/OverlaySyncPort' -import { IAutomationLifecycleEmitter, LifecycleCallback } from '../../../../packages/automation/infrastructure/adapters/IAutomationLifecycleEmitter' -import { OverlaySyncService } from '../../../../packages/automation/application/services/OverlaySyncService' +import { OverlayAction } from '../../../../core/automation/application/ports/OverlaySyncPort' +import { IAutomationLifecycleEmitter, LifecycleCallback } from '../../../../core/automation/infrastructure/adapters/IAutomationLifecycleEmitter' +import { OverlaySyncService } from '../../../../core/automation/application/services/OverlaySyncService' class MockLifecycleEmitter implements IAutomationLifecycleEmitter { private callbacks: Set = new Set() diff --git a/tests/unit/application/use-cases/CheckAuthenticationUseCase.test.ts b/tests/unit/application/use-cases/CheckAuthenticationUseCase.test.ts index ee35f0cbd..e348f57a3 100644 --- a/tests/unit/application/use-cases/CheckAuthenticationUseCase.test.ts +++ b/tests/unit/application/use-cases/CheckAuthenticationUseCase.test.ts @@ -1,9 +1,9 @@ import { describe, it, expect, beforeEach, vi, Mock } from 'vitest'; -import { CheckAuthenticationUseCase } from '../../../../packages/automation/application/use-cases/CheckAuthenticationUseCase'; +import { CheckAuthenticationUseCase } from '../../../../core/automation/application/use-cases/CheckAuthenticationUseCase'; import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState'; import { BrowserAuthenticationState } from '@gridpilot/automation/domain/value-objects/BrowserAuthenticationState'; -import { Result } from '../../../../packages/shared/result/Result'; -import type { AuthenticationServicePort } from '../../../../packages/automation/application/ports/AuthenticationServicePort'; +import { Result } from '../../../../core/shared/result/Result'; +import type { AuthenticationServicePort } from '../../../../core/automation/application/ports/AuthenticationServicePort'; interface ISessionValidator { validateSession(): Promise>; diff --git a/tests/unit/application/use-cases/CompleteRaceCreationUseCase.test.ts b/tests/unit/application/use-cases/CompleteRaceCreationUseCase.test.ts index 3fd320a4b..cec1a931c 100644 --- a/tests/unit/application/use-cases/CompleteRaceCreationUseCase.test.ts +++ b/tests/unit/application/use-cases/CompleteRaceCreationUseCase.test.ts @@ -1,9 +1,9 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; -import { CompleteRaceCreationUseCase } from '../../../../packages/automation/application/use-cases/CompleteRaceCreationUseCase'; -import { Result } from '../../../../packages/shared/result/Result'; +import { CompleteRaceCreationUseCase } from '../../../../core/automation/application/use-cases/CompleteRaceCreationUseCase'; +import { Result } from '../../../../core/shared/result/Result'; import { RaceCreationResult } from '@gridpilot/automation/domain/value-objects/RaceCreationResult'; import { CheckoutPrice } from '@gridpilot/automation/domain/value-objects/CheckoutPrice'; -import type { CheckoutServicePort } from '../../../../packages/automation/application/ports/CheckoutServicePort'; +import type { CheckoutServicePort } from '../../../../core/automation/application/ports/CheckoutServicePort'; import { CheckoutState } from '@gridpilot/automation/domain/value-objects/CheckoutState'; describe('CompleteRaceCreationUseCase', () => { diff --git a/tests/unit/application/use-cases/ConfirmCheckoutUseCase.test.ts b/tests/unit/application/use-cases/ConfirmCheckoutUseCase.test.ts index 709bde23e..e731a04cf 100644 --- a/tests/unit/application/use-cases/ConfirmCheckoutUseCase.test.ts +++ b/tests/unit/application/use-cases/ConfirmCheckoutUseCase.test.ts @@ -1,9 +1,9 @@ import { describe, it, expect, beforeEach, vi, Mock } from 'vitest'; -import { Result } from '../../../../packages/shared/result/Result'; -import { ConfirmCheckoutUseCase } from '../../../../packages/automation/application/use-cases/ConfirmCheckoutUseCase'; -import type { CheckoutServicePort } from '../../../../packages/automation/application/ports/CheckoutServicePort'; -import type { CheckoutConfirmationPort } from '../../../../packages/automation/application/ports/CheckoutConfirmationPort'; -import type { CheckoutInfoDTO } from '../../../../packages/automation/application/dto/CheckoutInfoDTO'; +import { Result } from '../../../../core/shared/result/Result'; +import { ConfirmCheckoutUseCase } from '../../../../core/automation/application/use-cases/ConfirmCheckoutUseCase'; +import type { CheckoutServicePort } from '../../../../core/automation/application/ports/CheckoutServicePort'; +import type { CheckoutConfirmationPort } from '../../../../core/automation/application/ports/CheckoutConfirmationPort'; +import type { CheckoutInfoDTO } from '../../../../core/automation/application/dto/CheckoutInfoDTO'; import { CheckoutPrice } from '@gridpilot/automation/domain/value-objects/CheckoutPrice'; import { CheckoutState, CheckoutStateEnum } from '@gridpilot/automation/domain/value-objects/CheckoutState'; import { CheckoutConfirmation } from '@gridpilot/automation/domain/value-objects/CheckoutConfirmation'; diff --git a/tests/unit/application/use-cases/StartAutomationSession.test.ts b/tests/unit/application/use-cases/StartAutomationSession.test.ts index 5e6431da0..85a344df5 100644 --- a/tests/unit/application/use-cases/StartAutomationSession.test.ts +++ b/tests/unit/application/use-cases/StartAutomationSession.test.ts @@ -1,8 +1,8 @@ import { describe, it, expect, vi, beforeEach, Mock } from 'vitest'; -import { StartAutomationSessionUseCase } from '../../../../packages/automation/application/use-cases/StartAutomationSessionUseCase'; -import { AutomationEnginePort as IAutomationEngine } from '../../../../packages/automation/application/ports/AutomationEnginePort'; -import { IBrowserAutomation as IScreenAutomation } from '../../../../packages/automation/application/ports/ScreenAutomationPort'; -import { SessionRepositoryPort as ISessionRepository } from '../../../../packages/automation/application/ports/SessionRepositoryPort'; +import { StartAutomationSessionUseCase } from '../../../../core/automation/application/use-cases/StartAutomationSessionUseCase'; +import { AutomationEnginePort as IAutomationEngine } from '../../../../core/automation/application/ports/AutomationEnginePort'; +import { IBrowserAutomation as IScreenAutomation } from '../../../../core/automation/application/ports/ScreenAutomationPort'; +import { SessionRepositoryPort as ISessionRepository } from '../../../../core/automation/application/ports/SessionRepositoryPort'; import { AutomationSession } from '@gridpilot/automation/domain/entities/AutomationSession'; describe('StartAutomationSessionUseCase', () => { diff --git a/tests/unit/application/use-cases/VerifyAuthenticatedPageUseCase.test.ts b/tests/unit/application/use-cases/VerifyAuthenticatedPageUseCase.test.ts index 47621c710..62e2618d9 100644 --- a/tests/unit/application/use-cases/VerifyAuthenticatedPageUseCase.test.ts +++ b/tests/unit/application/use-cases/VerifyAuthenticatedPageUseCase.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, vi } from 'vitest'; -import { VerifyAuthenticatedPageUseCase } from '../../../../packages/automation/application/use-cases/VerifyAuthenticatedPageUseCase'; -import { AuthenticationServicePort as IAuthenticationService } from '../../../../packages/automation/application/ports/AuthenticationServicePort'; -import { Result } from '../../../../packages/shared/result/Result'; +import { VerifyAuthenticatedPageUseCase } from '../../../../core/automation/application/use-cases/VerifyAuthenticatedPageUseCase'; +import { AuthenticationServicePort as IAuthenticationService } from '../../../../core/automation/application/ports/AuthenticationServicePort'; +import { Result } from '../../../../core/shared/result/Result'; import { BrowserAuthenticationState } from '@gridpilot/automation/domain/value-objects/BrowserAuthenticationState'; import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState'; diff --git a/tests/unit/domain/services/ScheduleCalculator.test.ts b/tests/unit/domain/services/ScheduleCalculator.test.ts index 041b37686..3df41a6d3 100644 --- a/tests/unit/domain/services/ScheduleCalculator.test.ts +++ b/tests/unit/domain/services/ScheduleCalculator.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; -import { calculateRaceDates, getNextWeekday, type ScheduleConfig } from '../../../../packages/racing/domain/services/ScheduleCalculator'; -import type { Weekday } from '../../../../packages/racing/domain/types/Weekday'; +import { calculateRaceDates, getNextWeekday, type ScheduleConfig } from '../../../../core/racing/domain/services/ScheduleCalculator'; +import type { Weekday } from '../../../../core/racing/domain/types/Weekday'; describe('ScheduleCalculator', () => { describe('calculateRaceDates', () => { diff --git a/tests/unit/infrastructure/AutomationConfig.test.ts b/tests/unit/infrastructure/AutomationConfig.test.ts index 7add6c9d0..1a3094a60 100644 --- a/tests/unit/infrastructure/AutomationConfig.test.ts +++ b/tests/unit/infrastructure/AutomationConfig.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; -import { loadAutomationConfig, getAutomationMode, AutomationMode } from '../../../packages/automation/infrastructure/config/AutomationConfig'; +import { loadAutomationConfig, getAutomationMode, AutomationMode } from '../../../core/automation/infrastructure/config/AutomationConfig'; describe('AutomationConfig', () => { const originalEnv = process.env; diff --git a/tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.initiateLogin.browserMode.test.ts b/tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.initiateLogin.browserMode.test.ts index fff2de165..a96d51cef 100644 --- a/tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.initiateLogin.browserMode.test.ts +++ b/tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.initiateLogin.browserMode.test.ts @@ -1,12 +1,12 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import type { Page, BrowserContext } from 'playwright'; -import { PlaywrightAuthSessionService } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService'; -import type { PlaywrightBrowserSession } from '../../../../packages/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession'; -import type { SessionCookieStore } from '../../../../packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore'; -import type { IPlaywrightAuthFlow } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow'; -import type { LoggerPort as ILogger } from '../../../../packages/automation/application/ports/LoggerPort'; +import { PlaywrightAuthSessionService } from '../../../../core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService'; +import type { PlaywrightBrowserSession } from '../../../../core/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession'; +import type { SessionCookieStore } from '../../../../core/automation/infrastructure/adapters/automation/auth/SessionCookieStore'; +import type { IPlaywrightAuthFlow } from '../../../../core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow'; +import type { LoggerPort as ILogger } from '../../../../core/automation/application/ports/LoggerPort'; import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState'; -import { Result } from '../../../../packages/shared/result/Result'; +import { Result } from '../../../../core/shared/result/Result'; describe('PlaywrightAuthSessionService.initiateLogin browser mode behaviour', () => { const originalEnv = { ...process.env }; diff --git a/tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.verifyPageAuthentication.test.ts b/tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.verifyPageAuthentication.test.ts index 6f4e437cc..4f7a8a1f4 100644 --- a/tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.verifyPageAuthentication.test.ts +++ b/tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.verifyPageAuthentication.test.ts @@ -1,13 +1,13 @@ import { describe, it, expect, vi } from 'vitest'; import type { Page, Locator } from 'playwright'; -import { PlaywrightAuthSessionService } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService'; +import { PlaywrightAuthSessionService } from '../../../../core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService'; import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState'; import { BrowserAuthenticationState } from '@gridpilot/automation/domain/value-objects/BrowserAuthenticationState'; -import type { LoggerPort as ILogger } from '../../../../packages/automation/application/ports/LoggerPort'; -import type { Result } from '../../../../packages/shared/result/Result'; -import type { PlaywrightBrowserSession } from '../../../../packages/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession'; -import type { SessionCookieStore } from '../../../../packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore'; -import type { IPlaywrightAuthFlow } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow'; +import type { LoggerPort as ILogger } from '../../../../core/automation/application/ports/LoggerPort'; +import type { Result } from '../../../../core/shared/result/Result'; +import type { PlaywrightBrowserSession } from '../../../../core/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession'; +import type { SessionCookieStore } from '../../../../core/automation/infrastructure/adapters/automation/auth/SessionCookieStore'; +import type { IPlaywrightAuthFlow } from '../../../../core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow'; describe('PlaywrightAuthSessionService.verifyPageAuthentication', () => { function createService(deps: { diff --git a/tests/unit/infrastructure/config/BrowserModeConfig.test.ts b/tests/unit/infrastructure/config/BrowserModeConfig.test.ts index 19f13973d..8197da205 100644 --- a/tests/unit/infrastructure/config/BrowserModeConfig.test.ts +++ b/tests/unit/infrastructure/config/BrowserModeConfig.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; -import { BrowserModeConfigLoader } from '../../../../packages/automation/infrastructure/config/BrowserModeConfig'; +import { BrowserModeConfigLoader } from '../../../../core/automation/infrastructure/config/BrowserModeConfig'; /** * Unit tests for BrowserModeConfig - GREEN PHASE diff --git a/tests/unit/media/domain/value-objects/MediaUrl.test.ts b/tests/unit/media/domain/value-objects/MediaUrl.test.ts index 512a33e9a..e17bc8a4e 100644 --- a/tests/unit/media/domain/value-objects/MediaUrl.test.ts +++ b/tests/unit/media/domain/value-objects/MediaUrl.test.ts @@ -1,4 +1,4 @@ -import { MediaUrl } from '../../../../../packages/media/domain/value-objects/MediaUrl'; +import { MediaUrl } from '../../../../../core/media/domain/value-objects/MediaUrl'; describe('MediaUrl', () => { it('creates from valid http/https URLs', () => { diff --git a/tests/unit/notifications/domain/value-objects/NotificationId.test.ts b/tests/unit/notifications/domain/value-objects/NotificationId.test.ts index 1b1252a37..341f771d4 100644 --- a/tests/unit/notifications/domain/value-objects/NotificationId.test.ts +++ b/tests/unit/notifications/domain/value-objects/NotificationId.test.ts @@ -1,5 +1,5 @@ -import { NotificationId } from '../../../../../packages/notifications/domain/value-objects/NotificationId'; -import { NotificationDomainError } from '../../../../../packages/notifications/domain/errors/NotificationDomainError'; +import { NotificationId } from '../../../../../core/notifications/domain/value-objects/NotificationId'; +import { NotificationDomainError } from '../../../../../core/notifications/domain/errors/NotificationDomainError'; describe('NotificationId', () => { it('creates a valid NotificationId from a non-empty string', () => { diff --git a/tests/unit/notifications/domain/value-objects/QuietHours.test.ts b/tests/unit/notifications/domain/value-objects/QuietHours.test.ts index 3e15ef15b..11ca6f6aa 100644 --- a/tests/unit/notifications/domain/value-objects/QuietHours.test.ts +++ b/tests/unit/notifications/domain/value-objects/QuietHours.test.ts @@ -1,4 +1,4 @@ -import { QuietHours } from '../../../../../packages/notifications/domain/value-objects/QuietHours'; +import { QuietHours } from '../../../../../core/notifications/domain/value-objects/QuietHours'; describe('QuietHours', () => { it('creates a valid normal-range window', () => { diff --git a/tests/unit/structure/packages/PackageDependencies.test.ts b/tests/unit/structure/packages/PackageDependencies.test.ts index fedb5f5a0..dfc3984aa 100644 --- a/tests/unit/structure/packages/PackageDependencies.test.ts +++ b/tests/unit/structure/packages/PackageDependencies.test.ts @@ -20,17 +20,17 @@ interface TsFile { function classifyFile(filePath: string): PackageKind { const normalized = filePath.replace(/\\/g, '/'); - // Bounded-context domain lives under packages/racing/domain - if (normalized.includes('/packages/racing/domain/')) { + // Bounded-context domain lives under core/racing/domain + if (normalized.includes('/core/racing/domain/')) { return 'racing-domain'; } - if (normalized.includes('/packages/racing-application/')) { + if (normalized.includes('/core/racing-application/')) { return 'racing-application'; } - if (normalized.includes('/packages/racing-infrastructure/')) { + if (normalized.includes('/core/racing-infrastructure/')) { return 'racing-infrastructure'; } - if (normalized.includes('/packages/racing-demo-infrastructure/')) { + if (normalized.includes('/core/racing-demo-infrastructure/')) { return 'racing-demo-infrastructure'; } @@ -129,7 +129,7 @@ describe('Package dependency structure for racing slice', () => { if (violations.length > 0) { const message = - 'Found forbidden imports in racing domain layer (packages/racing/domain):\n' + + 'Found forbidden imports in racing domain layer (core/racing/domain):\n' + violations .map( (v) => @@ -197,7 +197,7 @@ describe('Package dependency structure for racing slice', () => { if (violations.length > 0) { const message = - 'Found forbidden imports in packages/racing-application:\n' + + 'Found forbidden imports in core/racing-application:\n' + violations .map( (v) => diff --git a/tsconfig.base.json b/tsconfig.base.json index 6177652c8..0aeecac1b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -26,34 +26,34 @@ "@/lib/*": ["apps/website/lib/*"], "@/components/*": ["apps/website/components/*"], "@/app/*": ["apps/website/app/*"], - "packages/*": ["packages/*"], + "core/*": ["core/*"], "apps/*": ["apps/*"], - "@gridpilot/shared-result": ["packages/shared/result/Result.ts"], - "@gridpilot/shared": ["packages/shared/index.ts"], - "@gridpilot/shared/application": ["packages/shared/application"], - "@gridpilot/shared/application/*": ["packages/shared/application/*"], - "@gridpilot/shared/presentation": ["packages/shared/presentation"], - "@gridpilot/shared/presentation/*": ["packages/shared/presentation/*"], - "@gridpilot/shared/domain": ["packages/shared/domain"], - "@gridpilot/shared/domain/*": ["packages/shared/domain/*"], - "@gridpilot/shared/errors": ["packages/shared/errors"], - "@gridpilot/shared/errors/*": ["packages/shared/errors/*"], - "@gridpilot/automation": ["packages/automation/index.ts"], - "@gridpilot/automation/*": ["packages/automation/*"], - "@gridpilot/identity": ["packages/identity/index.ts"], - "@gridpilot/identity/*": ["packages/identity/*"], - "@gridpilot/media": ["packages/media/index.ts"], - "@gridpilot/media/*": ["packages/media/*"], - "@gridpilot/racing": ["packages/racing/index.ts"], - "@gridpilot/racing/*": ["packages/racing/*"], - "@gridpilot/social": ["packages/social/index.ts"], - "@gridpilot/social/*": ["packages/social/*"], - "@gridpilot/testing-support": ["packages/testing-support/index.ts"], - "@gridpilot/testing-support/*": ["packages/testing-support/*"], - "@gridpilot/analytics": ["packages/analytics/index.ts"], - "@gridpilot/analytics/*": ["packages/analytics/*"], - "@gridpilot/notifications": ["packages/notifications/application/index.ts"], - "@gridpilot/notifications/*": ["packages/notifications/*"] + "@gridpilot/shared-result": ["core/shared/result/Result.ts"], + "@gridpilot/shared": ["core/shared/index.ts"], + "@gridpilot/shared/application": ["core/shared/application"], + "@gridpilot/shared/application/*": ["core/shared/application/*"], + "@gridpilot/shared/presentation": ["core/shared/presentation"], + "@gridpilot/shared/presentation/*": ["core/shared/presentation/*"], + "@gridpilot/shared/domain": ["core/shared/domain"], + "@gridpilot/shared/domain/*": ["core/shared/domain/*"], + "@gridpilot/shared/errors": ["core/shared/errors"], + "@gridpilot/shared/errors/*": ["core/shared/errors/*"], + "@gridpilot/automation": ["core/automation/index.ts"], + "@gridpilot/automation/*": ["core/automation/*"], + "@gridpilot/identity": ["core/identity/index.ts"], + "@gridpilot/identity/*": ["core/identity/*"], + "@gridpilot/media": ["core/media/index.ts"], + "@gridpilot/media/*": ["core/media/*"], + "@gridpilot/racing": ["core/racing/index.ts"], + "@gridpilot/racing/*": ["core/racing/*"], + "@gridpilot/social": ["core/social/index.ts"], + "@gridpilot/social/*": ["core/social/*"], + "@gridpilot/testing-support": ["core/testing-support/index.ts"], + "@gridpilot/testing-support/*": ["core/testing-support/*"], + "@gridpilot/analytics": ["core/analytics/index.ts"], + "@gridpilot/analytics/*": ["core/analytics/*"], + "@gridpilot/notifications": ["core/notifications/application/index.ts"], + "@gridpilot/notifications/*": ["core/notifications/*"] } } } \ No newline at end of file diff --git a/tsconfig.electron.json b/tsconfig.electron.json index 7d6f6603b..4d9b6d2de 100644 --- a/tsconfig.electron.json +++ b/tsconfig.electron.json @@ -13,7 +13,7 @@ "include": [ "src/apps/companion/main/**/*", "src/apps/companion/renderer/**/*", - "src/packages/**/*", + "src/core/**/*", "src/infrastructure/**/*" ], "exclude": [ diff --git a/tsconfig.json b/tsconfig.json index 5704063b9..4cbd07220 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "alwaysStrict": true }, "include": [ - "packages/**/*", + "core/**/*", "apps/**/*", "tests/**/*" ], diff --git a/typecheck-errors.txt b/typecheck-errors.txt deleted file mode 100644 index b356a29fe..000000000 --- a/typecheck-errors.txt +++ /dev/null @@ -1,352 +0,0 @@ - -> gridpilot@0.1.0 typecheck -> tsc --noEmit - -packages/identity/domain/entities/SponsorAccount.ts(41,5): error TS2412: Type 'Date | undefined' is not assignable to type 'Date' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target. - Type 'undefined' is not assignable to type 'Date'. -tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts(54,7): error TS2739: Type 'LoggerLike' is missing the following properties from type 'LoggerPort': fatal, child, flush -tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts(67,12): error TS18048: 'first' is possibly 'undefined'. -tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts(68,12): error TS18048: 'first' is possibly 'undefined'. -tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts(87,12): error TS2532: Object is possibly 'undefined'. -tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts(88,12): error TS2532: Object is possibly 'undefined'. -tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts(105,7): error TS2739: Type 'LoggerLike' is missing the following properties from type 'LoggerPort': fatal, child, flush -tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts(112,12): error TS18048: 'ev' is possibly 'undefined'. -tests/integration/infrastructure/automation/OverlayLifecycle.integration.test.ts(113,12): error TS18048: 'ev' is possibly 'undefined'. -tests/integration/infrastructure/FixtureServer.integration.test.ts(21,15): error TS2554: Expected 2-3 arguments, but got 1. -tests/integration/infrastructure/FixtureServer.integration.test.ts(86,35): error TS2554: Expected 2-3 arguments, but got 1. -tests/integration/infrastructure/FixtureServer.integration.test.ts(108,26): error TS2554: Expected 2-3 arguments, but got 1. -tests/integration/infrastructure/InMemorySessionRepository.test.ts(290,14): error TS2532: Object is possibly 'undefined'. -tests/integration/interface/companion/companion-start-automation.browser-mode-refresh.integration.test.ts(61,42): error TS2339: Property 'browserAutomation' does not exist on type 'AutomationEnginePort'. -tests/integration/interface/companion/companion-start-automation.browser-mode-refresh.integration.test.ts(70,44): error TS2339: Property 'browserAutomation' does not exist on type 'AutomationEnginePort'. -tests/integration/interface/companion/companion-start-automation.browser-mode-refresh.integration.test.ts(100,35): error TS2352: Conversion of type 'AutomationEnginePort' to type '{ browserAutomation: unknown; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Property 'browserAutomation' is missing in type 'AutomationEnginePort' but required in type '{ browserAutomation: unknown; }'. -tests/integration/interface/companion/companion-start-automation.browser-not-connected.integration.test.ts(77,12): error TS18047: 'session' is possibly 'null'. -tests/integration/interface/companion/companion-start-automation.browser-not-connected.integration.test.ts(77,12): error TS18048: 'session.state' is possibly 'undefined'. -tests/integration/interface/companion/companion-start-automation.browser-not-connected.integration.test.ts(78,19): error TS18047: 'session' is possibly 'null'. -tests/integration/interface/renderer/renderer-overlay-lifecycle.integration.test.ts(54,7): error TS2739: Type 'Console' is missing the following properties from type 'LoggerPort': fatal, child, flush -tests/integration/interface/renderer/renderer-overlay-lifecycle.integration.test.ts(107,26): error TS2339: Property 'actionId' does not exist on type 'RendererOverlayState'. - Property 'actionId' does not exist on type '{ status: "idle"; }'. -tests/integration/interface/renderer/renderer-overlay-lifecycle.integration.test.ts(116,7): error TS2739: Type 'Console' is missing the following properties from type 'LoggerPort': fatal, child, flush -tests/integration/interface/renderer/renderer-overlay-lifecycle.integration.test.ts(144,26): error TS2339: Property 'actionId' does not exist on type 'RendererOverlayState'. - Property 'actionId' does not exist on type '{ status: "idle"; }'. -tests/integration/interface/renderer/renderer-overlay.integration.test.ts(12,7): error TS2739: Type 'Console' is missing the following properties from type 'LoggerPort': fatal, child, flush -tests/smoke/browser-mode-toggle.smoke.test.ts(6,15): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/smoke/electron-init.smoke.test.ts(26,66): error TS2339: Property 'instance' does not exist on type 'never'. - The intersection 'typeof DIContainer & { instance?: unknown; }' was reduced to 'never' because property 'instance' exists in multiple constituents and is private in some. -tests/smoke/helpers/console-monitor.ts(55,24): error TS2379: Argument of type '{ type: "pageerror"; message: string; location: string | undefined; timestamp: Date; }' is not assignable to parameter of type 'ConsoleError' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties. - Types of property 'location' are incompatible. - Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. -tests/smoke/helpers/electron-test-harness.ts(31,7): error TS2322: Type '{ NODE_ENV: string; NEXT_PUBLIC_GRIDPILOT_MODE?: "pre-launch" | "alpha"; NEXT_PUBLIC_X_URL?: string; TZ?: string | undefined; }' is not assignable to type '{ [key: string]: string; }'. - Property 'TZ' is incompatible with index signature. - Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. -tests/smoke/helpers/ipc-verifier.ts(64,7): error TS2375: Type '{ channel: string; success: boolean; error: string | undefined; duration: number; }' is not assignable to type 'IPCTestResult' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties. - Types of property 'error' are incompatible. - Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. -tests/smoke/helpers/ipc-verifier.ts(117,7): error TS2375: Type '{ channel: string; success: boolean; error: string | undefined; duration: number; }' is not assignable to type 'IPCTestResult' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties. - Types of property 'error' are incompatible. - Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. -tests/smoke/helpers/ipc-verifier.ts(176,7): error TS2375: Type '{ channel: string; success: boolean; error: string | undefined; duration: number; }' is not assignable to type 'IPCTestResult' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties. - Types of property 'error' are incompatible. - Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. -tests/smoke/playwright-init.smoke.test.ts(42,30): error TS2769: No overload matches this call. - Overload 1 of 2, '(event: "loaded", listener: Function): Process', gave the following error. - Argument of type '"unhandledRejection"' is not assignable to parameter of type '"loaded"'. - Overload 2 of 2, '(event: "loaded", listener: Function): Process', gave the following error. - Argument of type '"unhandledRejection"' is not assignable to parameter of type '"loaded"'. -tests/smoke/playwright-init.smoke.test.ts(49,17): error TS2554: Expected 2-3 arguments, but got 1. -tests/smoke/playwright-init.smoke.test.ts(58,15): error TS2554: Expected 2-3 arguments, but got 1. -tests/smoke/playwright-init.smoke.test.ts(73,15): error TS2554: Expected 2-3 arguments, but got 1. -tests/smoke/playwright-init.smoke.test.ts(86,24): error TS2554: Expected 2-3 arguments, but got 1. -tests/smoke/playwright-init.smoke.test.ts(91,24): error TS2554: Expected 2-3 arguments, but got 1. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(3,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(4,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(7,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(10,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(13,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(16,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(17,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(18,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(21,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(26,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsEntityId.test.ts(27,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(3,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(4,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(7,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(10,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(13,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(16,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(17,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(18,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(21,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(26,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/AnalyticsSessionId.test.ts(27,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(3,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(4,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(7,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(10,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(13,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(16,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(17,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(18,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(21,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(26,5): error TS2304: Cannot find name 'expect'. -tests/unit/analytics/domain/value-objects/PageViewId.test.ts(27,5): error TS2304: Cannot find name 'expect'. -tests/unit/application/services/OverlaySyncService.test.ts(29,7): error TS2739: Type 'Console' is missing the following properties from type 'LoggerPort': fatal, child, flush -tests/unit/application/services/OverlaySyncService.timeout.test.ts(16,10): error TS2345: Argument of type '{ type: string; actionId: string; timestamp: number; }' is not assignable to parameter of type 'AutomationEvent'. - Types of property 'type' are incompatible. - Type 'string' is not assignable to type '"panel-attached" | "modal-opened" | "action-started" | "action-complete" | "action-failed" | "panel-missing"'. -tests/unit/application/services/OverlaySyncService.timeout.test.ts(26,7): error TS2739: Type 'Console' is missing the following properties from type 'LoggerPort': fatal, child, flush -tests/unit/application/use-cases/CheckAuthenticationUseCase.test.ts(6,45): error TS2307: Cannot find module '../../../../packages/automation/application/ports/IAuthenticationService' or its corresponding type declarations. -tests/unit/application/use-cases/CompleteRaceCreationUseCase.test.ts(6,39): error TS2307: Cannot find module '../../../../packages/automation/application/ports/ICheckoutService' or its corresponding type declarations. -tests/unit/application/use-cases/ConfirmCheckoutUseCase.enhanced.test.ts(7,39): error TS2307: Cannot find module '@gridpilot/automation/application/ports/ICheckoutService' or its corresponding type declarations. -tests/unit/application/use-cases/ConfirmCheckoutUseCase.enhanced.test.ts(8,48): error TS2307: Cannot find module '@gridpilot/automation/application/ports/ICheckoutConfirmationPort' or its corresponding type declarations. -tests/unit/application/use-cases/ConfirmCheckoutUseCase.test.ts(4,48): error TS2307: Cannot find module '../../../../packages/automation/application/ports/ICheckoutService' or its corresponding type declarations. -tests/unit/application/use-cases/ConfirmCheckoutUseCase.test.ts(5,43): error TS2307: Cannot find module '../../../../packages/automation/application/ports/ICheckoutConfirmationPort' or its corresponding type declarations. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(26,7): error TS2420: Class 'InMemorySeasonRepository' incorrectly implements interface 'ISeasonRepository'. - Type 'InMemorySeasonRepository' is missing the following properties from type 'ISeasonRepository': create, add, update, listByLeague, listActiveByLeague -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(42,7): error TS2420: Class 'InMemoryLeagueScoringConfigRepository' incorrectly implements interface 'ILeagueScoringConfigRepository'. - Property 'save' is missing in type 'InMemoryLeagueScoringConfigRepository' but required in type 'ILeagueScoringConfigRepository'. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(113,7): error TS2420: Class 'InMemoryResultRepository' incorrectly implements interface 'IResultRepository'. - Type 'InMemoryResultRepository' is missing the following properties from type 'IResultRepository': findById, findAll, findByDriverId, findByDriverIdAndLeagueId, and 7 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(125,7): error TS2420: Class 'InMemoryPenaltyRepository' incorrectly implements interface 'IPenaltyRepository'. - Type 'InMemoryPenaltyRepository' is missing the following properties from type 'IPenaltyRepository': findById, findByDriverId, findByProtestId, findPending, and 4 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(133,43): error TS2339: Property 'leagueId' does not exist on type 'Penalty'. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(141,16): error TS2339: Property 'leagueId' does not exist on type 'Penalty'. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(260,7): error TS2345: Argument of type 'InMemorySeasonRepository' is not assignable to parameter of type 'ISeasonRepository'. - Type 'InMemorySeasonRepository' is missing the following properties from type 'ISeasonRepository': create, add, update, listByLeague, listActiveByLeague -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(270,11): error TS2740: Type '{ id: string; leagueId: string; gameId: string; name: string; status: "active"; year: number; order: number; startDate: Date; endDate: Date; }' is missing the following properties from type 'Season': schedule, scoringConfig, dropPolicy, stewardingConfig, and 14 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(295,7): error TS2740: Type '{ id: string; leagueId: string; scheduledAt: Date; track: string; car: string; sessionType: "race"; status: "completed"; }' is missing the following properties from type 'Race': trackId, carId, strengthOfField, registeredCount, and 8 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(304,7): error TS2740: Type '{ id: string; leagueId: string; scheduledAt: Date; track: string; car: string; sessionType: "race"; status: "completed"; }' is missing the following properties from type 'Race': trackId, carId, strengthOfField, registeredCount, and 8 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(313,7): error TS2740: Type '{ id: string; leagueId: string; scheduledAt: Date; track: string; car: string; sessionType: "race"; status: "completed"; }' is missing the following properties from type 'Race': trackId, carId, strengthOfField, registeredCount, and 8 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(322,7): error TS2740: Type '{ id: string; leagueId: string; scheduledAt: Date; track: string; car: string; sessionType: "race"; status: "completed"; }' is missing the following properties from type 'Race': trackId, carId, strengthOfField, registeredCount, and 8 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(331,7): error TS2740: Type '{ id: string; leagueId: string; scheduledAt: Date; track: string; car: string; sessionType: "race"; status: "completed"; }' is missing the following properties from type 'Race': trackId, carId, strengthOfField, registeredCount, and 8 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(340,7): error TS2740: Type '{ id: string; leagueId: string; scheduledAt: Date; track: string; car: string; sessionType: "race"; status: "completed"; }' is missing the following properties from type 'Race': trackId, carId, strengthOfField, registeredCount, and 8 more. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(395,15): error TS2739: Type '{ id: string; raceId: string; driverId: string; position: number; fastestLap: number; incidents: number; startPosition: number; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(427,12): error TS18048: 'leader' is possibly 'undefined'. -tests/unit/application/use-cases/RecalculateChampionshipStandingsUseCase.test.ts(428,12): error TS18048: 'leader' is possibly 'undefined'. -tests/unit/application/use-cases/StartAutomationSession.test.ts(3,35): error TS2307: Cannot find module '../../../../packages/automation/application/ports/IAutomationEngine' or its corresponding type declarations. -tests/unit/application/use-cases/StartAutomationSession.test.ts(4,35): error TS2307: Cannot find module '../../../../packages/automation/application/ports/IScreenAutomation' or its corresponding type declarations. -tests/unit/application/use-cases/StartAutomationSession.test.ts(5,36): error TS2307: Cannot find module '../../../../packages/automation/application/ports/ISessionRepository' or its corresponding type declarations. -tests/unit/application/use-cases/VerifyAuthenticatedPageUseCase.test.ts(3,40): error TS2307: Cannot find module '../../../../packages/automation/application/ports/IAuthenticationService' or its corresponding type declarations. -tests/unit/domain/services/EventScoringService.test.ts(11,39): error TS2307: Cannot find module '@gridpilot/racing/domain/value-objects/ChampionshipType' or its corresponding type declarations. -tests/unit/domain/services/EventScoringService.test.ts(86,7): error TS2739: Type '{ id: string; raceId: string; driverId: string; position: number; fastestLap: number; incidents: number; startPosition: number; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(95,7): error TS2739: Type '{ id: string; raceId: string; driverId: string; position: number; fastestLap: number; incidents: number; startPosition: number; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(104,7): error TS2739: Type '{ id: string; raceId: string; driverId: string; position: number; fastestLap: number; incidents: number; startPosition: number; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(113,7): error TS2739: Type '{ id: string; raceId: string; driverId: string; position: number; fastestLap: number; incidents: number; startPosition: number; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(122,7): error TS2739: Type '{ id: string; raceId: string; driverId: string; position: number; fastestLap: number; incidents: number; startPosition: number; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(182,7): error TS2739: Type '{ driverId: string; position: number; startPosition: number; fastestLap: number; raceId: "race-1"; incidents: 0; id: string; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(190,7): error TS2739: Type '{ driverId: string; position: number; startPosition: number; fastestLap: number; raceId: "race-1"; incidents: 0; id: string; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(198,7): error TS2739: Type '{ driverId: string; position: number; startPosition: number; fastestLap: number; raceId: "race-1"; incidents: 0; id: string; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(223,7): error TS2739: Type '{ driverId: string; position: number; startPosition: number; fastestLap: number; raceId: "race-1"; incidents: 0; id: string; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(231,7): error TS2739: Type '{ driverId: string; position: number; startPosition: number; fastestLap: number; raceId: "race-1"; incidents: 0; id: string; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/EventScoringService.test.ts(239,7): error TS2739: Type '{ driverId: string; position: number; startPosition: number; fastestLap: number; raceId: "race-1"; incidents: 0; id: string; }' is missing the following properties from type 'Result': getPositionChange, isPodium, isClean -tests/unit/domain/services/ScheduleCalculator.test.ts(78,16): error TS2532: Object is possibly 'undefined'. -tests/unit/domain/services/ScheduleCalculator.test.ts(80,16): error TS2532: Object is possibly 'undefined'. -tests/unit/domain/services/ScheduleCalculator.test.ts(141,16): error TS2532: Object is possibly 'undefined'. -tests/unit/domain/services/ScheduleCalculator.test.ts(143,16): error TS2532: Object is possibly 'undefined'. -tests/unit/domain/services/ScheduleCalculator.test.ts(145,16): error TS2532: Object is possibly 'undefined'. -tests/unit/domain/services/ScheduleCalculator.test.ts(147,16): error TS2532: Object is possibly 'undefined'. -tests/unit/domain/services/ScheduleCalculator.test.ts(168,16): error TS2532: Object is possibly 'undefined'. -tests/unit/domain/value-objects/CheckoutConfirmation.test.ts(22,48): error TS2345: Argument of type '"invalid"' is not assignable to parameter of type 'CheckoutConfirmationDecision'. -tests/unit/domain/value-objects/SessionState.test.ts(47,40): error TS2345: Argument of type '"INVALID"' is not assignable to parameter of type 'SessionStateValue'. -tests/unit/domain/value-objects/SessionState.test.ts(51,40): error TS2345: Argument of type '""' is not assignable to parameter of type 'SessionStateValue'. -tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.initiateLogin.browserMode.test.ts(7,30): error TS2307: Cannot find module '../../../../packages/automation/application/ports/ILogger' or its corresponding type declarations. -tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.initiateLogin.browserMode.test.ts(110,23): error TS2532: Object is possibly 'undefined'. -tests/unit/infrastructure/adapters/PlaywrightAuthSessionService.verifyPageAuthentication.test.ts(6,30): error TS2307: Cannot find module '../../../../packages/automation/application/ports/ILogger' or its corresponding type declarations. -tests/unit/infrastructure/adapters/SessionCookieStore.test.ts(9,19): error TS2554: Expected 2 arguments, but got 1. -tests/unit/infrastructure/adapters/SessionCookieStore.test.ts(198,14): error TS2532: Object is possibly 'undefined'. -tests/unit/infrastructure/adapters/SessionCookieStore.test.ts(229,14): error TS2532: Object is possibly 'undefined'. -tests/unit/infrastructure/adapters/SessionCookieStore.test.ts(260,14): error TS2532: Object is possibly 'undefined'. -tests/unit/infrastructure/AutomationConfig.test.ts(20,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(29,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(38,16): error TS2704: The operand of a 'delete' operator cannot be a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(47,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(56,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(107,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(119,16): error TS2704: The operand of a 'delete' operator cannot be a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(146,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(231,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(242,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/AutomationConfig.test.ts(252,21): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(15,12): error TS2704: The operand of a 'delete' operator cannot be a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(24,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(34,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(45,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(56,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(69,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(81,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(91,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(104,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(114,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(127,14): error TS2704: The operand of a 'delete' operator cannot be a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(137,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(149,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(158,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(167,19): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/infrastructure/config/BrowserModeConfig.test.ts(176,14): error TS2704: The operand of a 'delete' operator cannot be a read-only property. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(3,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(4,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(5,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(6,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(9,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(11,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(14,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(15,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(18,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(19,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(20,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(23,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(24,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(25,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(28,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(33,5): error TS2304: Cannot find name 'expect'. -tests/unit/media/domain/value-objects/MediaUrl.test.ts(34,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(4,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(5,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(8,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(11,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(14,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(17,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(18,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(19,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(25,9): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(30,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(35,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/NotificationId.test.ts(36,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(3,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(4,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(6,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(7,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(10,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(12,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(13,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(16,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(17,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(18,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(21,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(22,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(25,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(27,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(28,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(29,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(30,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(33,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(35,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(36,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(37,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(38,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(39,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(40,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(43,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(48,5): error TS2304: Cannot find name 'expect'. -tests/unit/notifications/domain/value-objects/QuietHours.test.ts(49,5): error TS2304: Cannot find name 'expect'. -tests/unit/racing-application/DashboardOverviewUseCase.test.ts(10,7): error TS2420: Class 'FakeDashboardOverviewPresenter' incorrectly implements interface 'IDashboardOverviewPresenter'. - Property 'reset' is missing in type 'FakeDashboardOverviewPresenter' but required in type 'Presenter'. -tests/unit/racing-application/DashboardOverviewUseCase.test.ts(204,7): error TS2554: Expected 11 arguments, but got 12. -tests/unit/racing-application/DashboardOverviewUseCase.test.ts(208,19): error TS2554: Expected 2 arguments, but got 1. -tests/unit/racing-application/DashboardOverviewUseCase.test.ts(392,7): error TS2554: Expected 11 arguments, but got 12. -tests/unit/racing-application/DashboardOverviewUseCase.test.ts(396,19): error TS2554: Expected 2 arguments, but got 1. -tests/unit/racing-application/DashboardOverviewUseCase.test.ts(499,7): error TS2554: Expected 11 arguments, but got 12. -tests/unit/racing-application/DashboardOverviewUseCase.test.ts(503,19): error TS2554: Expected 2 arguments, but got 1. -tests/unit/racing-application/MembershipUseCases.test.ts(112,33): error TS2345: Argument of type '{ leagueId: string; driverId: string; role: "member"; status: "active"; joinedAt: Date; }' is not assignable to parameter of type 'LeagueMembership'. - Property 'id' is missing in type '{ leagueId: string; driverId: string; role: "member"; status: "active"; joinedAt: Date; }' but required in type 'LeagueMembership'. -tests/unit/racing-application/RaceResultsUseCases.test.ts(20,7): error TS2420: Class 'FakeRaceResultsDetailPresenter' incorrectly implements interface 'IRaceResultsDetailPresenter'. - Property 'reset' is missing in type 'FakeRaceResultsDetailPresenter' but required in type 'Presenter'. -tests/unit/racing-application/RaceResultsUseCases.test.ts(113,7): error TS2345: Argument of type '{ findById: (id: string) => Promise; }' is not assignable to parameter of type 'IRaceRepository'. - Type '{ findById: (id: string) => Promise; }' is missing the following properties from type 'IRaceRepository': findAll, findByLeagueId, findUpcomingByLeagueId, findCompletedByLeagueId, and 6 more. -tests/unit/racing-application/RaceResultsUseCases.test.ts(230,7): error TS2345: Argument of type '{ findById: (id: string) => Promise; }' is not assignable to parameter of type 'IRaceRepository'. - Type '{ findById: (id: string) => Promise; }' is missing the following properties from type 'IRaceRepository': findAll, findByLeagueId, findUpcomingByLeagueId, findCompletedByLeagueId, and 6 more. -tests/unit/racing-application/RaceResultsUseCases.test.ts(353,7): error TS2554: Expected 5 arguments, but got 6. -tests/unit/racing-application/RaceResultsUseCases.test.ts(357,19): error TS2554: Expected 2 arguments, but got 1. -tests/unit/racing-application/RaceResultsUseCases.test.ts(363,12): error TS2532: Object is possibly 'undefined'. -tests/unit/racing-application/RaceResultsUseCases.test.ts(364,12): error TS2532: Object is possibly 'undefined'. -tests/unit/racing-application/RaceResultsUseCases.test.ts(463,7): error TS2554: Expected 5 arguments, but got 6. -tests/unit/racing-application/RaceResultsUseCases.test.ts(467,19): error TS2554: Expected 2 arguments, but got 1. -tests/unit/racing-application/RaceResultsUseCases.test.ts(528,7): error TS2554: Expected 5 arguments, but got 6. -tests/unit/racing-application/RaceResultsUseCases.test.ts(532,19): error TS2554: Expected 2 arguments, but got 1. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(14,3): error TS2305: Module '"@gridpilot/racing/domain/entities/Team"' has no exported member 'TeamMembership'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(15,3): error TS2305: Module '"@gridpilot/racing/domain/entities/Team"' has no exported member 'TeamMembershipStatus'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(16,3): error TS2305: Module '"@gridpilot/racing/domain/entities/Team"' has no exported member 'TeamRole'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(17,3): error TS2305: Module '"@gridpilot/racing/domain/entities/Team"' has no exported member 'TeamJoinRequest'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(171,3): error TS2416: Property 'present' in type 'TestDriverRegistrationStatusPresenter' is not assignable to the same property in base type 'IDriverRegistrationStatusPresenter'. - Type '(isRegistered: boolean, raceId: string, driverId: string) => void' is not assignable to type '(isRegistered: boolean, raceId: string, driverId: string) => DriverRegistrationStatusViewModel'. - Type 'void' is not assignable to type 'DriverRegistrationStatusViewModel'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(183,3): error TS2416: Property 'present' in type 'TestRaceRegistrationsPresenter' is not assignable to the same property in base type 'IRaceRegistrationsPresenter'. - Type '(raceIdOrDriverIds: string | string[], driverIds?: string[] | undefined) => void' is not assignable to type '(input: RaceRegistrationsResultDTO) => void'. - Types of parameters 'raceIdOrDriverIds' and 'input' are incompatible. - Type 'RaceRegistrationsResultDTO' is not assignable to type 'string | string[]'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(238,7): error TS2420: Class 'InMemoryTeamMembershipRepository' incorrectly implements interface 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(342,7): error TS2345: Argument of type 'TestDriverRegistrationStatusPresenter' is not assignable to parameter of type 'IDriverRegistrationStatusPresenter'. - Property 'getViewModel' is missing in type 'TestDriverRegistrationStatusPresenter' but required in type 'IDriverRegistrationStatusPresenter'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(347,7): error TS2554: Expected 1 arguments, but got 2. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(365,32): error TS2554: Expected 2 arguments, but got 1. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(392,32): error TS2554: Expected 2 arguments, but got 1. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(441,32): error TS2339: Property 'specialization' does not exist on type '{ id: string; name: string; tag: string; description: string; ownerId: string; leagues: string[]; createdAt: Date; memberCount: number; }'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(442,24): error TS2339: Property 'region' does not exist on type '{ id: string; name: string; tag: string; description: string; ownerId: string; leagues: string[]; createdAt: Date; memberCount: number; }'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(443,27): error TS2339: Property 'languages' does not exist on type '{ id: string; name: string; tag: string; description: string; ownerId: string; leagues: string[]; createdAt: Date; memberCount: number; }'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(461,5): error TS2416: Property 'present' in type 'TestTeamDetailsPresenter' is not assignable to the same property in base type 'ITeamDetailsPresenter'. - Type '(team: any, membership: any, driverId: string) => void' is not assignable to type '(input: TeamDetailsResultDTO) => void'. - Target signature provides too few arguments. Expected 3 or more, but got 1. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(491,49): error TS2367: This comparison appears to be unintentional because the types 'TeamRole' and '"member"' have no overlap. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(494,9): error TS2322: Type '{ driverId: string; driverName: string; role: TeamRole; joinedAt: string; isActive: boolean; avatarUrl: string; }[]' is not assignable to type 'TeamMemberViewModel[]'. - Type '{ driverId: string; driverName: string; role: TeamRole; joinedAt: string; isActive: boolean; avatarUrl: string; }' is not assignable to type 'TeamMemberViewModel'. - Types of property 'role' are incompatible. - Type 'TeamRole' is not assignable to type '"owner" | "member" | "manager"'. - Type '"driver"' is not assignable to type '"owner" | "member" | "manager"'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(538,9): error TS2322: Type '{ requestId: string; driverId: string; driverName: string; teamId: string; status: string; requestedAt: string; avatarUrl: string; }[]' is not assignable to type 'TeamJoinRequestViewModel[]'. - Type '{ requestId: string; driverId: string; driverName: string; teamId: string; status: string; requestedAt: string; avatarUrl: string; }' is not assignable to type 'TeamJoinRequestViewModel'. - Types of property 'status' are incompatible. - Type 'string' is not assignable to type '"pending" | "rejected" | "approved"'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(574,32): error TS2339: Property 'specialization' does not exist on type 'Team'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(575,24): error TS2339: Property 'region' does not exist on type 'Team'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(576,27): error TS2339: Property 'languages' does not exist on type 'Team'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(579,11): error TS2322: Type 'TeamRole' is not assignable to type '"owner" | "member" | "manager"'. - Type '"driver"' is not assignable to type '"owner" | "member" | "manager"'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(603,50): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(604,46): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(605,38): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(606,53): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(607,51): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(608,57): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(614,7): error TS2554: Expected 2 arguments, but got 3. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(621,7): error TS2554: Expected 2 arguments, but got 3. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(629,7): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(637,7): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(646,7): error TS2345: Argument of type 'InMemoryTeamMembershipRepository' is not assignable to parameter of type 'ITeamMembershipRepository'. - Property 'countByTeamId' is missing in type 'InMemoryTeamMembershipRepository' but required in type 'ITeamMembershipRepository'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(747,41): error TS2345: Argument of type 'string' is not assignable to parameter of type '{ teamId: string; driverId: string; }'. -tests/unit/racing-application/RegistrationAndTeamUseCases.test.ts(765,40): error TS2341: Property 'viewModel' is private and only accessible within class 'TestDriverTeamPresenter'. -tests/unit/structure/packages/PackageDependencies.test.ts(78,5): error TS2322: Type 'string | undefined' is not assignable to type 'string | null'. - Type 'undefined' is not assignable to type 'string | null'. -tests/unit/structure/packages/PackageDependencies.test.ts(84,5): error TS2322: Type 'string | undefined' is not assignable to type 'string | null'. - Type 'undefined' is not assignable to type 'string | null'. -tests/unit/website/AlphaNav.test.tsx(68,9): error TS2322: Type '{ children: Element; value: { session: null; loading: boolean; login: () => void; logout: () => Promise; refreshSession: () => Promise; }; }' is not assignable to type 'IntrinsicAttributes & AuthProviderProps'. - Property 'value' does not exist on type 'IntrinsicAttributes & AuthProviderProps'. -tests/unit/website/AlphaNav.test.tsx(90,9): error TS2322: Type '{ children: Element; value: { session: { user: { id: string; }; }; loading: boolean; login: () => void; logout: () => Promise; refreshSession: () => Promise; }; }' is not assignable to type 'IntrinsicAttributes & AuthProviderProps'. - Property 'value' does not exist on type 'IntrinsicAttributes & AuthProviderProps'. -tests/unit/website/auth/IracingRoutes.test.ts(38,11): error TS2488: Type 'any[] | undefined' must have a '[Symbol.iterator]()' method that returns an iterator. -tests/unit/website/getAppMode.test.ts(12,17): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/website/getAppMode.test.ts(17,17): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/website/getAppMode.test.ts(45,26): error TS2304: Cannot find name 'vi'. -tests/unit/website/getAppMode.test.ts(47,5): error TS2322: Type '"invalid-mode"' is not assignable to type '"pre-launch" | "alpha"'. -tests/unit/website/getAppMode.test.ts(58,17): error TS2540: Cannot assign to 'NODE_ENV' because it is a read-only property. -tests/unit/website/getAppMode.test.ts(59,5): error TS2322: Type '"invalid-mode"' is not assignable to type '"pre-launch" | "alpha"'. -tests/unit/website/leagues/CreateLeaguePage.wizardStep.test.tsx(106,21): error TS2532: Object is possibly 'undefined'. -tests/unit/website/signupRoute.test.ts(9,34): error TS2558: Expected 0-1 type arguments, but got 2. -tests/unit/website/signupRoute.test.ts(10,31): error TS2558: Expected 0-1 type arguments, but got 2. -tests/unit/website/signupRoute.test.ts(13,43): error TS2345: Argument of type '[]' is not assignable to parameter of type 'never'. -tests/unit/website/signupRoute.test.ts(14,41): error TS2345: Argument of type '[]' is not assignable to parameter of type 'never'. diff --git a/vitest.config.ts b/vitest.config.ts index bfb6ceac3..377ef48fd 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,7 +7,7 @@ export default defineConfig({ watch: false, environment: 'jsdom', setupFiles: ['tests/setup/vitest.setup.ts'], - include: ['tests/**/*.{test,spec}.?(c|m)[jt]s?(x)', 'packages/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + include: ['tests/**/*.{test,spec}.?(c|m)[jt]s?(x)', 'core/**/*.{test,spec}.?(c|m)[jt]s?(x)'], exclude: [ // Do not run library-internal tests from dependencies 'node_modules/**', @@ -18,16 +18,16 @@ export default defineConfig({ }, resolve: { alias: { - '@gridpilot/shared-result': path.resolve(__dirname, 'packages/shared/result/Result.ts'), - '@gridpilot/automation': path.resolve(__dirname, 'packages/automation'), - '@gridpilot/automation/*': path.resolve(__dirname, 'packages/automation/*'), - '@gridpilot/testing-support': path.resolve(__dirname, 'packages/testing-support'), - '@gridpilot/media': path.resolve(__dirname, 'packages/media'), + '@gridpilot/shared-result': path.resolve(__dirname, 'core/shared/result/Result.ts'), + '@gridpilot/automation': path.resolve(__dirname, 'core/automation'), + '@gridpilot/automation/*': path.resolve(__dirname, 'core/automation/*'), + '@gridpilot/testing-support': path.resolve(__dirname, 'core/testing-support'), + '@gridpilot/media': path.resolve(__dirname, 'core/media'), '@': path.resolve(__dirname, 'apps/website'), '@/*': path.resolve(__dirname, 'apps/website/*'), - // Support TS-style "packages/*" imports used in tests + // Support TS-style "core/*" imports used in tests packages: path.resolve(__dirname, 'packages'), - 'packages/*': path.resolve(__dirname, 'packages/*'), + 'core/*': path.resolve(__dirname, 'core/*'), }, }, }); \ No newline at end of file diff --git a/vitest.e2e.config.ts b/vitest.e2e.config.ts index feda51c0a..7799a68e9 100644 --- a/vitest.e2e.config.ts +++ b/vitest.e2e.config.ts @@ -32,15 +32,15 @@ export default defineConfig({ resolve: { alias: { // Mirror main Vitest config so E2E tests can resolve package paths - '@gridpilot/shared-result': path.resolve(__dirname, 'packages/shared/result/Result.ts'), - '@gridpilot/automation': path.resolve(__dirname, 'packages/automation'), - '@gridpilot/automation/*': path.resolve(__dirname, 'packages/automation/*'), - '@gridpilot/testing-support': path.resolve(__dirname, 'packages/testing-support'), - '@gridpilot/media': path.resolve(__dirname, 'packages/media'), + '@gridpilot/shared-result': path.resolve(__dirname, 'core/shared/result/Result.ts'), + '@gridpilot/automation': path.resolve(__dirname, 'core/automation'), + '@gridpilot/automation/*': path.resolve(__dirname, 'core/automation/*'), + '@gridpilot/testing-support': path.resolve(__dirname, 'core/testing-support'), + '@gridpilot/media': path.resolve(__dirname, 'core/media'), '@': path.resolve(__dirname, 'apps/website'), '@/*': path.resolve(__dirname, 'apps/website/*'), packages: path.resolve(__dirname, 'packages'), - 'packages/*': path.resolve(__dirname, 'packages/*'), + 'core/*': path.resolve(__dirname, 'core/*'), }, }, }); \ No newline at end of file