@pplancq/react-template 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/mise.toml +2 -2
  3. package/mocks/browser.ts +1 -1
  4. package/mocks/fixtures/user.ts +14 -14
  5. package/mocks/handlers/userHandlers.ts +3 -3
  6. package/mocks/server.ts +1 -1
  7. package/package.json +24 -25
  8. package/playwright-report/html/index.html +90 -0
  9. package/playwright-report/sonar-results.xml +20 -0
  10. package/playwright.config.ts +3 -3
  11. package/src/app/App.tsx +5 -5
  12. package/src/app/AppHTMLElement.tsx +4 -4
  13. package/src/app/README.md +2 -2
  14. package/src/app/assets/css/index.ts +2 -2
  15. package/src/app/assets/css/reset.css +3 -3
  16. package/src/app/config/queryClientConfig.ts +1 -1
  17. package/src/app/config/serviceContainer.ts +2 -2
  18. package/src/app/providers/Providers/Providers.tsx +5 -5
  19. package/src/app/providers/QueryClientProvider/QueryClientProvider.tsx +3 -3
  20. package/src/app/providers/ServiceProvider/ServiceContext.ts +2 -2
  21. package/src/app/providers/ServiceProvider/ServiceProvider.tsx +4 -4
  22. package/src/app/routing/Router.tsx +2 -2
  23. package/src/app/routing/appRoutes.ts +1 -1
  24. package/src/app/routing/routes.tsx +3 -3
  25. package/src/demo/README.md +5 -4
  26. package/src/demo/application/dtos/ArchitecturePrinciple.ts +1 -1
  27. package/src/demo/application/use-cases/GetArchitecturePrinciplesUseCase.ts +3 -3
  28. package/src/demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface.ts +1 -1
  29. package/src/demo/application/use-cases/GetDemoUsersUseCase.ts +3 -3
  30. package/src/demo/application/use-cases/GetDemoUsersUseCaseInterface.ts +1 -1
  31. package/src/demo/domain/repositories/ArchitecturePrincipleRepositoryInterface.d.ts +1 -1
  32. package/src/demo/domain/repositories/DemoUserRepositoryInterface.d.ts +1 -1
  33. package/src/demo/infrastructure/repositories/HttpDemoUserRepository.ts +5 -5
  34. package/src/demo/infrastructure/repositories/StaticArchitecturePrincipleRepository.ts +14 -14
  35. package/src/demo/serviceDemo.ts +14 -13
  36. package/src/demo/serviceIdentifiers.ts +4 -4
  37. package/src/demo/ui/components/DemoFooter/DemoFooter.tsx +5 -5
  38. package/src/demo/ui/components/DemoFooter/index.ts +1 -1
  39. package/src/demo/ui/components/DemoHeader/DemoHeader.tsx +10 -10
  40. package/src/demo/ui/components/DemoHeader/index.ts +1 -1
  41. package/src/demo/ui/components/DemoNavigation/DemoNavigation.tsx +4 -4
  42. package/src/demo/ui/components/DemoNavigation/index.ts +1 -1
  43. package/src/demo/ui/components/Input/Input.tsx +3 -3
  44. package/src/demo/ui/components/Input/index.ts +1 -1
  45. package/src/demo/ui/components/Logo/Logo.tsx +2 -2
  46. package/src/demo/ui/components/Logo/index.ts +1 -1
  47. package/src/demo/ui/components/NavLink/NavLink.tsx +3 -3
  48. package/src/demo/ui/components/NavLink/index.ts +1 -1
  49. package/src/demo/ui/components/TextInput/TextInput.tsx +3 -3
  50. package/src/demo/ui/components/TextInput/index.ts +1 -1
  51. package/src/demo/ui/forms/ProfileForm/ProfileForm.tsx +9 -9
  52. package/src/demo/ui/forms/ProfileForm/index.ts +1 -1
  53. package/src/demo/ui/hooks/useDemoUsersQuery/useDemoUsersQuery.ts +5 -5
  54. package/src/demo/ui/layouts/DemoLayout/DemoLayout.tsx +4 -4
  55. package/src/demo/ui/layouts/MainTemplate/MainTemplate.tsx +2 -2
  56. package/src/demo/ui/layouts/MainTemplate/index.ts +1 -1
  57. package/src/demo/ui/pages/DemoHome/DemoHome.module.scss +5 -5
  58. package/src/demo/ui/pages/DemoHome/DemoHome.tsx +6 -6
  59. package/src/demo/ui/pages/DependencyInjectionDemo/DependencyInjectionDemo.tsx +5 -5
  60. package/src/demo/ui/pages/ReactHookFormDemo/ReactHookFormDemo.tsx +4 -4
  61. package/src/demo/ui/pages/ReactQueryDemo/ReactQueryDemo.tsx +3 -3
  62. package/src/demo/ui/routing/demoAppRoutes.ts +4 -4
  63. package/src/demo/ui/routing/demoRoutes.tsx +8 -8
  64. package/src/main.ts +5 -5
  65. package/src/react-app-env.d.ts +1 -1
  66. package/src/shared/infrastructure/http/constant.ts +8 -8
  67. package/src/shared/infrastructure/http/fetchApi.ts +3 -3
  68. package/src/shared/ui/hooks/useService/useService.ts +4 -4
  69. package/test-results/.last-run.json +4 -0
  70. package/tests/e2e/demo.test.ts +17 -0
  71. package/tests/e2e/fixture/playwright.fixture.ts +15 -0
  72. package/tests/{utils → e2e/utils}/createNetworkFixture.ts +2 -2
  73. package/tests/{utils → e2e/utils}/createTestWithCoverageFixture.ts +8 -8
  74. package/tests/{utils → e2e/utils}/playwright.globalSetup.ts +4 -4
  75. package/tests/{utils → e2e/utils}/playwright.globalTeardown.ts +3 -3
  76. package/{src/app/__tests__ → tests/unit/app}/AppHTMLElement.test.tsx +14 -14
  77. package/tests/unit/demo/ui/components/DemoFooter/Footer.test.tsx +15 -0
  78. package/tests/unit/demo/ui/components/DemoHeader/Header.test.tsx +15 -0
  79. package/tests/unit/demo/ui/components/Logo/Logo.test.tsx +12 -0
  80. package/tsconfig.json +1 -1
  81. package/vitest.config.mts +1 -1
  82. package/postcss.config.mjs +0 -5
  83. package/src/demo/ui/components/DemoFooter/__tests__/Footer.test.tsx +0 -15
  84. package/src/demo/ui/components/DemoHeader/__tests__/Header.test.tsx +0 -15
  85. package/src/demo/ui/components/Logo/__tests__/Logo.test.tsx +0 -12
  86. package/tests/demo.test.ts +0 -17
  87. package/tests/fixture/playwright.fixture.ts +0 -15
  88. /package/{src/demo/ui/components/DemoFooter/__tests__ → tests/unit/demo/ui/components/DemoFooter}/__snapshots__/Footer.test.tsx.snap +0 -0
  89. /package/{src/demo/ui/components/DemoHeader/__tests__ → tests/unit/demo/ui/components/DemoHeader}/__snapshots__/Header.test.tsx.snap +0 -0
@@ -0,0 +1,20 @@
1
+ <testExecutions version="1">
2
+ <file path="/Users/paul/dev/@pplancq/dev-tools/packages/react-template/tests/e2e/demo.test.ts">
3
+ <testCase name="Demo Test › should have a title" duration="218">
4
+ </testCase>
5
+ <testCase name="Demo Test › should data fetching" duration="225">
6
+ </testCase>
7
+ </file>
8
+ <file path="/Users/paul/dev/@pplancq/dev-tools/packages/react-template/tests/e2e/demo.test.ts">
9
+ <testCase name="Demo Test › should have a title" duration="210">
10
+ </testCase>
11
+ <testCase name="Demo Test › should data fetching" duration="226">
12
+ </testCase>
13
+ </file>
14
+ <file path="/Users/paul/dev/@pplancq/dev-tools/packages/react-template/tests/e2e/demo.test.ts">
15
+ <testCase name="Demo Test › should have a title" duration="518">
16
+ </testCase>
17
+ <testCase name="Demo Test › should data fetching" duration="509">
18
+ </testCase>
19
+ </file>
20
+ </testExecutions>
@@ -3,7 +3,7 @@ import { defineConfig, devices } from '@playwright/test';
3
3
  const appUrl = 'http://localhost:3000';
4
4
 
5
5
  export default defineConfig({
6
- testDir: 'tests',
6
+ testDir: 'tests/e2e',
7
7
  outputDir: 'test-results',
8
8
  fullyParallel: true,
9
9
  forbidOnly: Boolean(process.env.CI),
@@ -18,8 +18,8 @@ export default defineConfig({
18
18
  { outputFile: 'playwright-report/sonar-results.xml', sonarcloud: true },
19
19
  ],
20
20
  ],
21
- globalSetup: 'tests/utils/playwright.globalSetup.ts',
22
- globalTeardown: 'tests/utils/playwright.globalTeardown.ts',
21
+ globalSetup: 'tests/e2e/utils/playwright.globalSetup.ts',
22
+ globalTeardown: 'tests/e2e/utils/playwright.globalTeardown.ts',
23
23
  use: {
24
24
  baseURL: appUrl,
25
25
  trace: 'retain-on-failure',
package/src/app/App.tsx CHANGED
@@ -1,9 +1,9 @@
1
- import { queryClient } from '@App/config/queryClientConfig';
2
- import { serviceContainer } from '@App/config/serviceContainer';
3
- import { Providers } from '@App/providers/Providers/Providers';
4
- import { Router } from '@App/routing/Router';
1
+ import { queryClient } from "@App/config/queryClientConfig";
2
+ import { serviceContainer } from "@App/config/serviceContainer";
3
+ import { Providers } from "@App/providers/Providers/Providers";
4
+ import { Router } from "@App/routing/Router";
5
5
 
6
- import '@App/assets/css';
6
+ import "@App/assets/css";
7
7
 
8
8
  type AppProps = {
9
9
  basename?: string;
@@ -1,6 +1,6 @@
1
- import { App } from '@App/App';
2
- import { StrictMode } from 'react';
3
- import { createRoot, type Root } from 'react-dom/client';
1
+ import { App } from "@App/App";
2
+ import { StrictMode } from "react";
3
+ import { createRoot, type Root } from "react-dom/client";
4
4
 
5
5
  // eslint-disable-next-line import/no-default-export
6
6
  export default class AppHTMLElement extends HTMLElement {
@@ -18,7 +18,7 @@ export default class AppHTMLElement extends HTMLElement {
18
18
  this.isMounted = true;
19
19
  this.root.render(
20
20
  <StrictMode>
21
- <App basename={this.getAttribute('basename') ?? ''} />
21
+ <App basename={this.getAttribute("basename") ?? ""} />
22
22
  </StrictMode>,
23
23
  );
24
24
  }
package/src/app/README.md CHANGED
@@ -24,8 +24,8 @@ place in the application where the Inversify container is created and all bounde
24
24
  are loaded:
25
25
 
26
26
  ```ts
27
- import { serviceDemo } from '@Demo/serviceDemo';
28
- import { Container } from 'inversify';
27
+ import { serviceDemo } from "@Demo/serviceDemo";
28
+ import { Container } from "inversify";
29
29
 
30
30
  export const serviceContainer = new Container();
31
31
  serviceContainer.load(serviceDemo);
@@ -1,2 +1,2 @@
1
- import './reset.css';
2
- import './mainBody.css';
1
+ import "./reset.css";
2
+ import "./mainBody.css";
@@ -83,8 +83,8 @@ video {
83
83
  vertical-align: baseline;
84
84
  font: inherit;
85
85
  font-family:
86
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans',
87
- 'Helvetica Neue', sans-serif;
86
+ -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
87
+ "Helvetica Neue", sans-serif;
88
88
  font-size: 100%;
89
89
  -webkit-font-smoothing: antialiased;
90
90
  -moz-osx-font-smoothing: grayscale;
@@ -128,5 +128,5 @@ table {
128
128
  }
129
129
 
130
130
  code {
131
- font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
131
+ font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
132
132
  }
@@ -1,3 +1,3 @@
1
- import { QueryClient } from '@tanstack/react-query';
1
+ import { QueryClient } from "@tanstack/react-query";
2
2
 
3
3
  export const queryClient = new QueryClient();
@@ -1,5 +1,5 @@
1
- import { serviceDemo } from '@Demo/serviceDemo';
2
- import { Container } from 'inversify';
1
+ import { serviceDemo } from "@Demo/serviceDemo";
2
+ import { Container } from "inversify";
3
3
 
4
4
  export const serviceContainer = new Container();
5
5
 
@@ -1,8 +1,8 @@
1
- import { QueryClientProvider } from '@App/providers/QueryClientProvider/QueryClientProvider';
2
- import { ServiceProvider } from '@App/providers/ServiceProvider/ServiceProvider';
3
- import type { QueryClient } from '@tanstack/react-query';
4
- import type { Container } from 'inversify';
5
- import type { PropsWithChildren } from 'react';
1
+ import { QueryClientProvider } from "@App/providers/QueryClientProvider/QueryClientProvider";
2
+ import { ServiceProvider } from "@App/providers/ServiceProvider/ServiceProvider";
3
+ import type { QueryClient } from "@tanstack/react-query";
4
+ import type { Container } from "inversify";
5
+ import type { PropsWithChildren } from "react";
6
6
 
7
7
  type ProvidersProps = PropsWithChildren<{
8
8
  queryClient: QueryClient;
@@ -1,6 +1,6 @@
1
- import { type QueryClient, QueryClientProvider as ReactQueryClientProvider } from '@tanstack/react-query';
2
- import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
3
- import type { PropsWithChildren } from 'react';
1
+ import { type QueryClient, QueryClientProvider as ReactQueryClientProvider } from "@tanstack/react-query";
2
+ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
3
+ import type { PropsWithChildren } from "react";
4
4
 
5
5
  type ClientProviderProps = {
6
6
  queryClient: QueryClient;
@@ -1,5 +1,5 @@
1
- import type { Container } from 'inversify';
2
- import { createContext } from 'react';
1
+ import type { Container } from "inversify";
2
+ import { createContext } from "react";
3
3
 
4
4
  export type ServiceContextValue = {
5
5
  container: Container;
@@ -1,7 +1,7 @@
1
- import { ServiceContext } from '@App/providers/ServiceProvider/ServiceContext';
2
- import type { Container } from 'inversify';
3
- import type { PropsWithChildren } from 'react';
4
- import { useRef } from 'react';
1
+ import { ServiceContext } from "@App/providers/ServiceProvider/ServiceContext";
2
+ import type { Container } from "inversify";
3
+ import type { PropsWithChildren } from "react";
4
+ import { useRef } from "react";
5
5
 
6
6
  export type ServiceProviderProps = PropsWithChildren<{
7
7
  container: Container;
@@ -1,5 +1,5 @@
1
- import { RouterProvider, createBrowserRouter } from 'react-router';
2
- import { routeObject } from './routes';
1
+ import { createBrowserRouter, RouterProvider } from "react-router";
2
+ import { routeObject } from "./routes";
3
3
 
4
4
  type RouterProps = {
5
5
  basename?: string;
@@ -1,3 +1,3 @@
1
1
  export const appRoutes = Object.freeze({
2
- home: '/',
2
+ home: "/",
3
3
  });
@@ -1,9 +1,9 @@
1
- import { demoRoutes } from '@Demo/ui/routing/demoRoutes';
2
- import type { RouteObject } from 'react-router';
1
+ import { demoRoutes } from "@Demo/ui/routing/demoRoutes";
2
+ import type { RouteObject } from "react-router";
3
3
 
4
4
  export const routeObject: RouteObject[] = [
5
5
  {
6
- path: '/',
6
+ path: "/",
7
7
  children: [demoRoutes],
8
8
  },
9
9
  ];
@@ -96,8 +96,8 @@ Declares unique `Symbol` identifiers for every service in the context:
96
96
 
97
97
  ```ts
98
98
  export const DEMO_SERVICES = Object.freeze({
99
- DemoUserRepository: Symbol.for('Demo.DemoUserRepository'),
100
- GetDemoUsersUseCase: Symbol.for('Demo.GetDemoUsersUseCase'),
99
+ DemoUserRepository: Symbol.for("Demo.DemoUserRepository"),
100
+ GetDemoUsersUseCase: Symbol.for("Demo.GetDemoUsersUseCase"),
101
101
  // ...
102
102
  });
103
103
  ```
@@ -111,7 +111,7 @@ A `ContainerModule` that binds each service identifier to its concrete implement
111
111
  free of framework metadata:
112
112
 
113
113
  ```ts
114
- export const serviceDemo: ContainerModule = new ContainerModule(options => {
114
+ export const serviceDemo: ContainerModule = new ContainerModule((options) => {
115
115
  options
116
116
  .bind<DemoUserRepositoryInterface>(DEMO_SERVICES.DemoUserRepository)
117
117
  .toDynamicValue(() => new HttpDemoUserRepository())
@@ -120,7 +120,8 @@ export const serviceDemo: ContainerModule = new ContainerModule(options => {
120
120
  options
121
121
  .bind<GetDemoUsersUseCaseInterface>(DEMO_SERVICES.GetDemoUsersUseCase)
122
122
  .toDynamicValue(
123
- services => new GetDemoUsersUseCase(services.get<DemoUserRepositoryInterface>(DEMO_SERVICES.DemoUserRepository)),
123
+ (services) =>
124
+ new GetDemoUsersUseCase(services.get<DemoUserRepositoryInterface>(DEMO_SERVICES.DemoUserRepository)),
124
125
  )
125
126
  .inSingletonScope();
126
127
  });
@@ -1,5 +1,5 @@
1
1
  export type ArchitecturePrinciple = {
2
2
  title: string;
3
3
  description: string;
4
- layer: 'domain' | 'application' | 'infrastructure' | 'ui';
4
+ layer: "domain" | "application" | "infrastructure" | "ui";
5
5
  };
@@ -1,6 +1,6 @@
1
- import type { ArchitecturePrinciple } from '@Demo/application/dtos/ArchitecturePrinciple';
2
- import type { GetArchitecturePrinciplesUseCaseInterface } from '@Demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface';
3
- import type { ArchitecturePrincipleRepositoryInterface } from '@Demo/domain/repositories/ArchitecturePrincipleRepositoryInterface';
1
+ import type { ArchitecturePrinciple } from "@Demo/application/dtos/ArchitecturePrinciple";
2
+ import type { GetArchitecturePrinciplesUseCaseInterface } from "@Demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface";
3
+ import type { ArchitecturePrincipleRepositoryInterface } from "@Demo/domain/repositories/ArchitecturePrincipleRepositoryInterface";
4
4
 
5
5
  export class GetArchitecturePrinciplesUseCase implements GetArchitecturePrinciplesUseCaseInterface {
6
6
  public constructor(private readonly architecturePrincipleRepository: ArchitecturePrincipleRepositoryInterface) {}
@@ -1,4 +1,4 @@
1
- import type { ArchitecturePrinciple } from '@Demo/application/dtos/ArchitecturePrinciple';
1
+ import type { ArchitecturePrinciple } from "@Demo/application/dtos/ArchitecturePrinciple";
2
2
 
3
3
  export interface GetArchitecturePrinciplesUseCaseInterface {
4
4
  execute: () => ArchitecturePrinciple[];
@@ -1,6 +1,6 @@
1
- import type { GetDemoUsersUseCaseInterface } from '@Demo/application/use-cases/GetDemoUsersUseCaseInterface';
2
- import type { DemoUser } from '@Demo/domain/entities/DemoUser';
3
- import type { DemoUserRepositoryInterface } from '@Demo/domain/repositories/DemoUserRepositoryInterface';
1
+ import type { GetDemoUsersUseCaseInterface } from "@Demo/application/use-cases/GetDemoUsersUseCaseInterface";
2
+ import type { DemoUser } from "@Demo/domain/entities/DemoUser";
3
+ import type { DemoUserRepositoryInterface } from "@Demo/domain/repositories/DemoUserRepositoryInterface";
4
4
 
5
5
  export class GetDemoUsersUseCase implements GetDemoUsersUseCaseInterface {
6
6
  public constructor(private readonly demoUserRepository: DemoUserRepositoryInterface) {}
@@ -1,4 +1,4 @@
1
- import type { DemoUser } from '@Demo/domain/entities/DemoUser';
1
+ import type { DemoUser } from "@Demo/domain/entities/DemoUser";
2
2
 
3
3
  export interface GetDemoUsersUseCaseInterface {
4
4
  execute: () => Promise<DemoUser[]>;
@@ -1,4 +1,4 @@
1
- import type { ArchitecturePrinciple } from '@Demo/application/dtos/ArchitecturePrinciple';
1
+ import type { ArchitecturePrinciple } from "@Demo/application/dtos/ArchitecturePrinciple";
2
2
 
3
3
  export interface ArchitecturePrincipleRepositoryInterface {
4
4
  getAll: () => ArchitecturePrinciple[];
@@ -1,4 +1,4 @@
1
- import type { DemoUser } from '@Demo/domain/entities/DemoUser';
1
+ import type { DemoUser } from "@Demo/domain/entities/DemoUser";
2
2
 
3
3
  export interface DemoUserRepositoryInterface {
4
4
  getAll: () => Promise<DemoUser[]>;
@@ -1,6 +1,6 @@
1
- import type { DemoUser } from '@Demo/domain/entities/DemoUser';
2
- import type { DemoUserRepositoryInterface } from '@Demo/domain/repositories/DemoUserRepositoryInterface';
3
- import { fetchApi } from '@Shared/infrastructure/http/fetchApi';
1
+ import type { DemoUser } from "@Demo/domain/entities/DemoUser";
2
+ import type { DemoUserRepositoryInterface } from "@Demo/domain/repositories/DemoUserRepositoryInterface";
3
+ import { fetchApi } from "@Shared/infrastructure/http/fetchApi";
4
4
 
5
5
  type DemoUserApiResponse = {
6
6
  id: number;
@@ -11,14 +11,14 @@ type DemoUserApiResponse = {
11
11
  };
12
12
 
13
13
  export class HttpDemoUserRepository implements DemoUserRepositoryInterface {
14
- private readonly apiPath = 'https://jsonplaceholder.typicode.com/users';
14
+ private readonly apiPath = "https://jsonplaceholder.typicode.com/users";
15
15
 
16
16
  public readonly getAll = async (): Promise<DemoUser[]> => {
17
17
  const users = await fetchApi<DemoUserApiResponse[]>({
18
18
  path: this.apiPath,
19
19
  });
20
20
 
21
- return users.map(user => ({
21
+ return users.map((user) => ({
22
22
  id: user.id,
23
23
  name: user.name,
24
24
  username: user.username.toUpperCase(),
@@ -1,29 +1,29 @@
1
- import type { ArchitecturePrinciple } from '@Demo/application/dtos/ArchitecturePrinciple';
2
- import type { ArchitecturePrincipleRepositoryInterface } from '@Demo/domain/repositories/ArchitecturePrincipleRepositoryInterface';
1
+ import type { ArchitecturePrinciple } from "@Demo/application/dtos/ArchitecturePrinciple";
2
+ import type { ArchitecturePrincipleRepositoryInterface } from "@Demo/domain/repositories/ArchitecturePrincipleRepositoryInterface";
3
3
 
4
4
  export class StaticArchitecturePrincipleRepository implements ArchitecturePrincipleRepositoryInterface {
5
5
  private readonly architecturePrinciples: ArchitecturePrinciple[] = [
6
6
  {
7
- title: 'Domain stays framework-free',
8
- description: 'The demo domain only defines contracts and pure data structures. React and Inversify stay outside.',
9
- layer: 'domain',
7
+ title: "Domain stays framework-free",
8
+ description: "The demo domain only defines contracts and pure data structures. React and Inversify stay outside.",
9
+ layer: "domain",
10
10
  },
11
11
  {
12
- title: 'Application orchestrates use cases',
13
- description: 'Use cases expose intent-driven APIs such as GetDemoUsersUseCase instead of leaking infrastructure.',
14
- layer: 'application',
12
+ title: "Application orchestrates use cases",
13
+ description: "Use cases expose intent-driven APIs such as GetDemoUsersUseCase instead of leaking infrastructure.",
14
+ layer: "application",
15
15
  },
16
16
  {
17
- title: 'Infrastructure implements contracts',
17
+ title: "Infrastructure implements contracts",
18
18
  description:
19
- 'Concrete adapters, such as the HTTP repository, live in infrastructure and are selected by the container.',
20
- layer: 'infrastructure',
19
+ "Concrete adapters, such as the HTTP repository, live in infrastructure and are selected by the container.",
20
+ layer: "infrastructure",
21
21
  },
22
22
  {
23
- title: 'UI depends on abstractions',
23
+ title: "UI depends on abstractions",
24
24
  description:
25
- 'React pages use hooks and useService to resolve use cases without importing infrastructure directly.',
26
- layer: 'ui',
25
+ "React pages use hooks and useService to resolve use cases without importing infrastructure directly.",
26
+ layer: "ui",
27
27
  },
28
28
  ];
29
29
 
@@ -1,15 +1,15 @@
1
- import type { ArchitecturePrincipleRepositoryInterface } from '@Demo/domain/repositories/ArchitecturePrincipleRepositoryInterface';
2
- import type { DemoUserRepositoryInterface } from '@Demo/domain/repositories/DemoUserRepositoryInterface';
3
- import { StaticArchitecturePrincipleRepository } from '@Demo/infrastructure/repositories/StaticArchitecturePrincipleRepository';
4
- import { HttpDemoUserRepository } from '@Demo/infrastructure/repositories/HttpDemoUserRepository';
5
- import { GetArchitecturePrinciplesUseCase } from '@Demo/application/use-cases/GetArchitecturePrinciplesUseCase';
6
- import type { GetArchitecturePrinciplesUseCaseInterface } from '@Demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface';
7
- import { GetDemoUsersUseCase } from '@Demo/application/use-cases/GetDemoUsersUseCase';
8
- import type { GetDemoUsersUseCaseInterface } from '@Demo/application/use-cases/GetDemoUsersUseCaseInterface';
9
- import { ContainerModule } from 'inversify';
10
- import { DEMO_SERVICES } from './serviceIdentifiers';
1
+ import { GetArchitecturePrinciplesUseCase } from "@Demo/application/use-cases/GetArchitecturePrinciplesUseCase";
2
+ import type { GetArchitecturePrinciplesUseCaseInterface } from "@Demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface";
3
+ import { GetDemoUsersUseCase } from "@Demo/application/use-cases/GetDemoUsersUseCase";
4
+ import type { GetDemoUsersUseCaseInterface } from "@Demo/application/use-cases/GetDemoUsersUseCaseInterface";
5
+ import type { ArchitecturePrincipleRepositoryInterface } from "@Demo/domain/repositories/ArchitecturePrincipleRepositoryInterface";
6
+ import type { DemoUserRepositoryInterface } from "@Demo/domain/repositories/DemoUserRepositoryInterface";
7
+ import { HttpDemoUserRepository } from "@Demo/infrastructure/repositories/HttpDemoUserRepository";
8
+ import { StaticArchitecturePrincipleRepository } from "@Demo/infrastructure/repositories/StaticArchitecturePrincipleRepository";
9
+ import { ContainerModule } from "inversify";
10
+ import { DEMO_SERVICES } from "./serviceIdentifiers";
11
11
 
12
- export const serviceDemo: ContainerModule = new ContainerModule(options => {
12
+ export const serviceDemo: ContainerModule = new ContainerModule((options) => {
13
13
  options
14
14
  .bind<DemoUserRepositoryInterface>(DEMO_SERVICES.DemoUserRepository)
15
15
  .toDynamicValue(() => new HttpDemoUserRepository())
@@ -18,7 +18,8 @@ export const serviceDemo: ContainerModule = new ContainerModule(options => {
18
18
  options
19
19
  .bind<GetDemoUsersUseCaseInterface>(DEMO_SERVICES.GetDemoUsersUseCase)
20
20
  .toDynamicValue(
21
- services => new GetDemoUsersUseCase(services.get<DemoUserRepositoryInterface>(DEMO_SERVICES.DemoUserRepository)),
21
+ (services) =>
22
+ new GetDemoUsersUseCase(services.get<DemoUserRepositoryInterface>(DEMO_SERVICES.DemoUserRepository)),
22
23
  )
23
24
  .inSingletonScope();
24
25
 
@@ -30,7 +31,7 @@ export const serviceDemo: ContainerModule = new ContainerModule(options => {
30
31
  options
31
32
  .bind<GetArchitecturePrinciplesUseCaseInterface>(DEMO_SERVICES.GetArchitecturePrinciplesUseCase)
32
33
  .toDynamicValue(
33
- services =>
34
+ (services) =>
34
35
  new GetArchitecturePrinciplesUseCase(
35
36
  services.get<ArchitecturePrincipleRepositoryInterface>(DEMO_SERVICES.ArchitecturePrincipleRepository),
36
37
  ),
@@ -1,6 +1,6 @@
1
1
  export const DEMO_SERVICES = Object.freeze({
2
- DemoUserRepository: Symbol.for('Demo.DemoUserRepository'),
3
- GetDemoUsersUseCase: Symbol.for('Demo.GetDemoUsersUseCase'),
4
- ArchitecturePrincipleRepository: Symbol.for('Demo.ArchitecturePrincipleRepository'),
5
- GetArchitecturePrinciplesUseCase: Symbol.for('Demo.GetArchitecturePrinciplesUseCase'),
2
+ DemoUserRepository: Symbol.for("Demo.DemoUserRepository"),
3
+ GetDemoUsersUseCase: Symbol.for("Demo.GetDemoUsersUseCase"),
4
+ ArchitecturePrincipleRepository: Symbol.for("Demo.ArchitecturePrincipleRepository"),
5
+ GetArchitecturePrinciplesUseCase: Symbol.for("Demo.GetArchitecturePrinciplesUseCase"),
6
6
  });
@@ -1,9 +1,9 @@
1
- import logo from '@Demo/ui/assets/images/logo.png';
2
- import { demoAppRoutes } from '@Demo/ui/routing/demoAppRoutes';
3
- import { Logo } from '@Demo/ui/components/Logo/Logo';
4
- import { Link } from 'react-router';
1
+ import logo from "@Demo/ui/assets/images/logo.png";
2
+ import { Logo } from "@Demo/ui/components/Logo/Logo";
3
+ import { demoAppRoutes } from "@Demo/ui/routing/demoAppRoutes";
4
+ import { Link } from "react-router";
5
5
 
6
- import classes from './DemoFooter.module.css';
6
+ import classes from "./DemoFooter.module.css";
7
7
 
8
8
  export const DemoFooter = () => {
9
9
  return (
@@ -1 +1 @@
1
- export { DemoFooter } from './DemoFooter';
1
+ export { DemoFooter } from "./DemoFooter";
@@ -1,10 +1,10 @@
1
- import logo from '@Demo/ui/assets/images/logo.png';
2
- import { DemoNavigation } from '@Demo/ui/components/DemoNavigation/DemoNavigation';
3
- import { demoAppRoutes } from '@Demo/ui/routing/demoAppRoutes';
4
- import { Logo } from '@Demo/ui/components/Logo/Logo';
5
- import { Link } from 'react-router';
1
+ import logo from "@Demo/ui/assets/images/logo.png";
2
+ import { DemoNavigation } from "@Demo/ui/components/DemoNavigation/DemoNavigation";
3
+ import { Logo } from "@Demo/ui/components/Logo/Logo";
4
+ import { demoAppRoutes } from "@Demo/ui/routing/demoAppRoutes";
5
+ import { Link } from "react-router";
6
6
 
7
- import classes from './DemoHeader.module.css';
7
+ import classes from "./DemoHeader.module.css";
8
8
 
9
9
  export const DemoHeader = () => {
10
10
  return (
@@ -14,10 +14,10 @@ export const DemoHeader = () => {
14
14
  </Link>
15
15
  <DemoNavigation
16
16
  links={[
17
- { label: 'Overview', url: demoAppRoutes.home },
18
- { label: 'React Query', url: demoAppRoutes.reactQuery },
19
- { label: 'React Hook Form', url: demoAppRoutes.reactHookForm },
20
- { label: 'Dependency Injection', url: demoAppRoutes.dependencyInjection },
17
+ { label: "Overview", url: demoAppRoutes.home },
18
+ { label: "React Query", url: demoAppRoutes.reactQuery },
19
+ { label: "React Hook Form", url: demoAppRoutes.reactHookForm },
20
+ { label: "Dependency Injection", url: demoAppRoutes.dependencyInjection },
21
21
  ]}
22
22
  />
23
23
  </div>
@@ -1 +1 @@
1
- export { DemoHeader } from './DemoHeader';
1
+ export { DemoHeader } from "./DemoHeader";
@@ -1,6 +1,6 @@
1
- import { NavLink } from '@Demo/ui/components/NavLink/NavLink';
2
- import { useId } from 'react';
3
- import classes from './DemoNavigation.module.css';
1
+ import { NavLink } from "@Demo/ui/components/NavLink/NavLink";
2
+ import { useId } from "react";
3
+ import classes from "./DemoNavigation.module.css";
4
4
 
5
5
  type DemoNavigationProps = {
6
6
  links: { label: string; url: string }[];
@@ -12,7 +12,7 @@ export const DemoNavigation = ({ links }: DemoNavigationProps) => {
12
12
  return (
13
13
  <nav>
14
14
  <ul className={classes.navList}>
15
- {links.map(link => (
15
+ {links.map((link) => (
16
16
  <li key={`${id} ${link.label} ${link.url}`}>
17
17
  <NavLink to={link.url} className={classes.a}>
18
18
  {link.label}
@@ -1 +1 @@
1
- export { DemoNavigation } from './DemoNavigation';
1
+ export { DemoNavigation } from "./DemoNavigation";
@@ -1,5 +1,5 @@
1
- import { forwardRef, InputHTMLAttributes, useId } from 'react';
2
- import classes from './Input.module.scss';
1
+ import { forwardRef, InputHTMLAttributes, useId } from "react";
2
+ import classes from "./Input.module.scss";
3
3
 
4
4
  interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
5
5
  label: string;
@@ -24,4 +24,4 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(({ label, hasError
24
24
  );
25
25
  });
26
26
 
27
- Input.displayName = 'Input';
27
+ Input.displayName = "Input";
@@ -1 +1 @@
1
- export { Input } from './Input';
1
+ export { Input } from "./Input";
@@ -1,4 +1,4 @@
1
- import classes from './Logo.module.css';
1
+ import classes from "./Logo.module.css";
2
2
 
3
3
  type LogoProps = {
4
4
  src: string;
@@ -6,6 +6,6 @@ type LogoProps = {
6
6
  size?: string;
7
7
  };
8
8
 
9
- export const Logo = ({ src, alt, size = '80px' }: LogoProps) => {
9
+ export const Logo = ({ src, alt, size = "80px" }: LogoProps) => {
10
10
  return <img className={classes.logoStyle} style={{ width: size }} src={src} alt={alt} />;
11
11
  };
@@ -1 +1 @@
1
- export { Logo } from './Logo';
1
+ export { Logo } from "./Logo";
@@ -1,8 +1,8 @@
1
- import { ComponentProps } from 'react';
2
- import { NavLink as RouterNavLink } from 'react-router';
1
+ import { ComponentProps } from "react";
2
+ import { NavLink as RouterNavLink } from "react-router";
3
3
 
4
4
  type NavLinkProps = ComponentProps<typeof RouterNavLink>;
5
5
 
6
6
  export const NavLink = ({ className, ...props }: NavLinkProps) => (
7
- <RouterNavLink {...props} className={[className].filter(Boolean).join(' ')} />
7
+ <RouterNavLink {...props} className={[className].filter(Boolean).join(" ")} />
8
8
  );
@@ -1 +1 @@
1
- export { NavLink } from './NavLink';
1
+ export { NavLink } from "./NavLink";
@@ -1,6 +1,6 @@
1
- import { Input } from '@Demo/ui/components/Input/Input';
2
- import type { InputHTMLAttributes } from 'react';
3
- import { type FieldError, useFormContext } from 'react-hook-form';
1
+ import { Input } from "@Demo/ui/components/Input/Input";
2
+ import type { InputHTMLAttributes } from "react";
3
+ import { type FieldError, useFormContext } from "react-hook-form";
4
4
 
5
5
  interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
6
6
  name: string;
@@ -1 +1 @@
1
- export { TextInput } from './TextInput';
1
+ export { TextInput } from "./TextInput";