@pplancq/react-template 2.9.0 → 2.10.1

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 (94) hide show
  1. package/CHANGELOG.md +59 -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 +29 -30
  8. package/playwright.config.ts +3 -3
  9. package/src/app/App.tsx +5 -5
  10. package/src/app/AppHTMLElement.tsx +4 -4
  11. package/src/app/README.md +2 -2
  12. package/src/app/assets/css/index.ts +2 -2
  13. package/src/app/assets/css/reset.css +6 -6
  14. package/src/app/config/queryClientConfig.ts +1 -1
  15. package/src/app/config/serviceContainer.ts +2 -2
  16. package/src/app/providers/Providers/Providers.tsx +5 -5
  17. package/src/app/providers/QueryClientProvider/QueryClientProvider.tsx +3 -3
  18. package/src/app/providers/ServiceProvider/ServiceContext.ts +2 -2
  19. package/src/app/providers/ServiceProvider/ServiceProvider.tsx +4 -4
  20. package/src/app/routing/Router.tsx +2 -2
  21. package/src/app/routing/appRoutes.ts +1 -1
  22. package/src/app/routing/routes.tsx +3 -3
  23. package/src/demo/README.md +5 -4
  24. package/src/demo/application/dtos/ArchitecturePrinciple.ts +1 -1
  25. package/src/demo/application/use-cases/GetArchitecturePrinciplesUseCase.ts +3 -3
  26. package/src/demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface.ts +1 -1
  27. package/src/demo/application/use-cases/GetDemoUsersUseCase.ts +3 -3
  28. package/src/demo/application/use-cases/GetDemoUsersUseCaseInterface.ts +1 -1
  29. package/src/demo/domain/repositories/ArchitecturePrincipleRepositoryInterface.d.ts +1 -1
  30. package/src/demo/domain/repositories/DemoUserRepositoryInterface.d.ts +1 -1
  31. package/src/demo/infrastructure/repositories/HttpDemoUserRepository.ts +5 -5
  32. package/src/demo/infrastructure/repositories/StaticArchitecturePrincipleRepository.ts +14 -14
  33. package/src/demo/serviceDemo.ts +14 -13
  34. package/src/demo/serviceIdentifiers.ts +4 -4
  35. package/src/demo/ui/components/DemoFooter/DemoFooter.tsx +5 -5
  36. package/src/demo/ui/components/DemoFooter/index.ts +1 -1
  37. package/src/demo/ui/components/DemoHeader/DemoHeader.module.css +2 -2
  38. package/src/demo/ui/components/DemoHeader/DemoHeader.tsx +10 -10
  39. package/src/demo/ui/components/DemoHeader/index.ts +1 -1
  40. package/src/demo/ui/components/DemoNavigation/DemoNavigation.module.css +2 -2
  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.module.scss +2 -2
  44. package/src/demo/ui/components/Input/Input.tsx +3 -3
  45. package/src/demo/ui/components/Input/index.ts +1 -1
  46. package/src/demo/ui/components/Logo/Logo.tsx +2 -2
  47. package/src/demo/ui/components/Logo/index.ts +1 -1
  48. package/src/demo/ui/components/NavLink/NavLink.tsx +3 -3
  49. package/src/demo/ui/components/NavLink/index.ts +1 -1
  50. package/src/demo/ui/components/TextInput/TextInput.tsx +3 -3
  51. package/src/demo/ui/components/TextInput/index.ts +1 -1
  52. package/src/demo/ui/forms/ProfileForm/ProfileForm.module.scss +1 -1
  53. package/src/demo/ui/forms/ProfileForm/ProfileForm.tsx +9 -9
  54. package/src/demo/ui/forms/ProfileForm/index.ts +1 -1
  55. package/src/demo/ui/hooks/useDemoUsersQuery/useDemoUsersQuery.ts +5 -5
  56. package/src/demo/ui/layouts/DemoLayout/DemoLayout.tsx +4 -4
  57. package/src/demo/ui/layouts/MainTemplate/MainTemplate.module.css +3 -3
  58. package/src/demo/ui/layouts/MainTemplate/MainTemplate.tsx +2 -2
  59. package/src/demo/ui/layouts/MainTemplate/index.ts +1 -1
  60. package/src/demo/ui/pages/DemoHome/DemoHome.module.scss +24 -24
  61. package/src/demo/ui/pages/DemoHome/DemoHome.tsx +6 -6
  62. package/src/demo/ui/pages/DependencyInjectionDemo/DependencyInjectionDemo.module.scss +5 -5
  63. package/src/demo/ui/pages/DependencyInjectionDemo/DependencyInjectionDemo.tsx +5 -5
  64. package/src/demo/ui/pages/ReactHookFormDemo/ReactHookFormDemo.module.scss +4 -4
  65. package/src/demo/ui/pages/ReactHookFormDemo/ReactHookFormDemo.tsx +4 -4
  66. package/src/demo/ui/pages/ReactQueryDemo/ReactQueryDemo.module.scss +5 -5
  67. package/src/demo/ui/pages/ReactQueryDemo/ReactQueryDemo.tsx +3 -3
  68. package/src/demo/ui/routing/demoAppRoutes.ts +4 -4
  69. package/src/demo/ui/routing/demoRoutes.tsx +8 -8
  70. package/src/main.ts +5 -5
  71. package/src/react-app-env.d.ts +1 -1
  72. package/src/shared/infrastructure/http/constant.ts +8 -8
  73. package/src/shared/infrastructure/http/fetchApi.ts +3 -3
  74. package/src/shared/ui/hooks/useService/useService.ts +4 -4
  75. package/tests/e2e/demo.test.ts +17 -0
  76. package/tests/e2e/fixture/playwright.fixture.ts +15 -0
  77. package/tests/{utils → e2e/utils}/createNetworkFixture.ts +2 -2
  78. package/tests/{utils → e2e/utils}/createTestWithCoverageFixture.ts +8 -8
  79. package/tests/{utils → e2e/utils}/playwright.globalSetup.ts +4 -4
  80. package/tests/{utils → e2e/utils}/playwright.globalTeardown.ts +3 -3
  81. package/{src/app/__tests__ → tests/unit/app}/AppHTMLElement.test.tsx +14 -14
  82. package/tests/unit/demo/ui/components/DemoFooter/Footer.test.tsx +15 -0
  83. package/tests/unit/demo/ui/components/DemoHeader/Header.test.tsx +15 -0
  84. package/tests/unit/demo/ui/components/Logo/Logo.test.tsx +12 -0
  85. package/tsconfig.json +1 -1
  86. package/vitest.config.mts +1 -1
  87. package/postcss.config.mjs +0 -5
  88. package/src/demo/ui/components/DemoFooter/__tests__/Footer.test.tsx +0 -15
  89. package/src/demo/ui/components/DemoHeader/__tests__/Header.test.tsx +0 -15
  90. package/src/demo/ui/components/Logo/__tests__/Logo.test.tsx +0 -12
  91. package/tests/demo.test.ts +0 -17
  92. package/tests/fixture/playwright.fixture.ts +0 -15
  93. /package/{src/demo/ui/components/DemoFooter/__tests__ → tests/unit/demo/ui/components/DemoFooter}/__snapshots__/Footer.test.tsx.snap +0 -0
  94. /package/{src/demo/ui/components/DemoHeader/__tests__ → tests/unit/demo/ui/components/DemoHeader}/__snapshots__/Header.test.tsx.snap +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,62 @@
1
+ ## 2.10.1 (2026-08-03)
2
+
3
+ ### ♻️ Code Refactoring
4
+
5
+ - **dev-tools:** update arrow function parentheses for consistency ([0104ebf](https://github.com/pplancq/dev-tools/commit/0104ebf))
6
+ - **dev-tools:** update quotes to double quotes for consistency ([6b2d557](https://github.com/pplancq/dev-tools/commit/6b2d557))
7
+
8
+ ### 📦 Dependencies
9
+
10
+ - Updated @pplancq/commitlint-config to 4.0.4
11
+ - Updated @pplancq/stylelint-config to 6.0.0
12
+ - Updated @pplancq/prettier-config to 4.0.0
13
+ - Updated @pplancq/eslint-config to 6.0.19
14
+ - **deps:** update dependency @playwright/test to ^1.62.1 ([#1841](https://github.com/pplancq/dev-tools/pull/1841))
15
+ - **deps:** update dependency @hookform/resolvers to ^5.5.7 ([#1842](https://github.com/pplancq/dev-tools/pull/1842))
16
+
17
+ ### ❤️ Thank You
18
+
19
+ - Paul PLANCQ
20
+
21
+ ## 2.10.0 (2026-07-28)
22
+
23
+ ### 🎉 Features
24
+
25
+ - **react-template:** remove postcss-config dependency ([3b57e0e](https://github.com/pplancq/dev-tools/commit/3b57e0e))
26
+ - **react-template:** restructure test directories ([4762120](https://github.com/pplancq/dev-tools/commit/4762120))
27
+
28
+ ### 📦 Dependencies
29
+
30
+ - Updated @pplancq/commitlint-config to 4.0.3
31
+ - Updated @pplancq/stylelint-config to 5.0.4
32
+ - Updated @pplancq/prettier-config to 3.0.1
33
+ - Updated @pplancq/eslint-config to 6.0.18
34
+ - **deps:** update dependency @bdellegrazie/playwright-sonar-reporter to ^0.5.2 ([#1821](https://github.com/pplancq/dev-tools/pull/1821))
35
+ - **deps:** update dependency react-hook-form to ^7.83.0 ([#1828](https://github.com/pplancq/dev-tools/pull/1828))
36
+ - **deps:** update dependency inversify to ^8.2.3 ([#1817](https://github.com/pplancq/dev-tools/pull/1817))
37
+ - **deps:** update dependency @rsbuild/core to ^2.1.8 ([#1816](https://github.com/pplancq/dev-tools/pull/1816))
38
+ - **deps:** update dependency @testing-library/jest-dom to v7 ([#1831](https://github.com/pplancq/dev-tools/pull/1831))
39
+ - **deps:** update dependency react-router to ^8.3.0 ([#1829](https://github.com/pplancq/dev-tools/pull/1829))
40
+ - **deps:** update react-query mono repo to ^5.101.4 ([#1826](https://github.com/pplancq/dev-tools/pull/1826))
41
+ - **deps:** update react monorepo to ^19.2.8 ([#1825](https://github.com/pplancq/dev-tools/pull/1825))
42
+ - **deps:** update dependency @vitejs/plugin-react to ^6.0.4 ([#1822](https://github.com/pplancq/dev-tools/pull/1822))
43
+ - **deps:** update dependency inversify to ^8.1.3 ([#1782](https://github.com/pplancq/dev-tools/pull/1782))
44
+ - **deps:** update dependency react-hook-form to ^7.81.0 ([#1789](https://github.com/pplancq/dev-tools/pull/1789))
45
+ - **deps:** update commitlint monorepo ([#1799](https://github.com/pplancq/dev-tools/pull/1799))
46
+ - **deps:** update dependency @rsbuild/plugin-react to ^2.1.0 ([#1785](https://github.com/pplancq/dev-tools/pull/1785))
47
+ - **deps:** update dependency @vitejs/plugin-react to ^6.0.3 ([#1794](https://github.com/pplancq/dev-tools/pull/1794))
48
+ - **deps:** update react-query mono repo to ^5.101.2 ([#1796](https://github.com/pplancq/dev-tools/pull/1796))
49
+ - **deps:** update dependency @playwright/test to ^1.61.1 ([#1788](https://github.com/pplancq/dev-tools/pull/1788))
50
+ - **deps:** update dependency msw to ^2.15.0 ([#1809](https://github.com/pplancq/dev-tools/pull/1809))
51
+ - **deps:** update dependency @rsbuild/core to ^2.1.5 ([#1780](https://github.com/pplancq/dev-tools/pull/1780))
52
+ - **deps:** update dependency stylelint to ^17.14.0 ([#1798](https://github.com/pplancq/dev-tools/pull/1798))
53
+ - **deps:** update dependency react-router to v8 ([#1792](https://github.com/pplancq/dev-tools/pull/1792))
54
+ - **deps:** update dependency @rsbuild/plugin-sass to v2 ([#1801](https://github.com/pplancq/dev-tools/pull/1801))
55
+
56
+ ### ❤️ Thank You
57
+
58
+ - Paul PLANCQ
59
+
1
60
  ## @pplancq/react-template [2.9.0](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@2.8.17...@pplancq/react-template@2.9.0) (2026-06-15)
2
61
 
3
62
  ### Features
package/mise.toml CHANGED
@@ -1,3 +1,3 @@
1
1
  [tools]
2
- node = "24.16.0"
3
- npm = "11.17.0"
2
+ node = "24.18.1"
3
+ npm = "12.0.2"
package/mocks/browser.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { setupWorker } from 'msw/browser';
1
+ import { setupWorker } from "msw/browser";
2
2
 
3
3
  export const worker = setupWorker();
@@ -1,25 +1,25 @@
1
1
  export const users = [
2
2
  {
3
3
  id: 1,
4
- name: 'Demo user',
5
- username: '@demoUser',
6
- email: 'demo@user.test',
4
+ name: "Demo user",
5
+ username: "@demoUser",
6
+ email: "demo@user.test",
7
7
  address: {
8
- street: 'Kulas Light',
9
- suite: 'Apt. 556',
10
- city: 'Gwenborough',
11
- zipcode: '92998-3874',
8
+ street: "Kulas Light",
9
+ suite: "Apt. 556",
10
+ city: "Gwenborough",
11
+ zipcode: "92998-3874",
12
12
  geo: {
13
- lat: '-37.3159',
14
- lng: '81.1496',
13
+ lat: "-37.3159",
14
+ lng: "81.1496",
15
15
  },
16
16
  },
17
- phone: '1-770-736-8031 x56442',
18
- website: 'hildegard.org',
17
+ phone: "1-770-736-8031 x56442",
18
+ website: "hildegard.org",
19
19
  company: {
20
- name: 'Romaguera-Crona',
21
- catchPhrase: 'Multi-layered client-server neural-net',
22
- bs: 'harness real-time e-markets',
20
+ name: "Romaguera-Crona",
21
+ catchPhrase: "Multi-layered client-server neural-net",
22
+ bs: "harness real-time e-markets",
23
23
  },
24
24
  },
25
25
  ];
@@ -1,6 +1,6 @@
1
- import { users } from '@Mocks/fixtures/user';
2
- import { http, HttpResponse } from 'msw';
1
+ import { users } from "@Mocks/fixtures/user";
2
+ import { http, HttpResponse } from "msw";
3
3
 
4
- export const getUsers200 = http.get('*/users', () => {
4
+ export const getUsers200 = http.get("*/users", () => {
5
5
  return HttpResponse.json(users);
6
6
  });
package/mocks/server.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { setupServer } from 'msw/node';
1
+ import { setupServer } from "msw/node";
2
2
 
3
3
  export const server = setupServer();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pplancq/react-template",
3
- "version": "2.9.0",
3
+ "version": "2.10.1",
4
4
  "license": "MIT",
5
5
  "description": "react template",
6
6
  "author": "pplancq <paul.plancq@outlook.fr>",
@@ -13,7 +13,7 @@
13
13
  "bin": {
14
14
  "template-install": "bin/template-install.js"
15
15
  },
16
- "packageManager": "npm@11.17.0",
16
+ "packageManager": "npm@12.0.2",
17
17
  "scripts": {
18
18
  "start": "rsbuild dev",
19
19
  "start:mock": "rsbuild dev --env-mode mock",
@@ -49,54 +49,53 @@
49
49
  "template"
50
50
  ],
51
51
  "dependencies": {
52
- "@hookform/resolvers": "^5.4.0",
53
- "@tanstack/react-query": "^5.101.0",
54
- "@tanstack/react-query-devtools": "^5.101.0",
55
- "inversify": "^8.1.0",
56
- "react": "^19.2.7",
57
- "react-dom": "^19.2.7",
58
- "react-hook-form": "^7.78.0",
59
- "react-router": "^7.17.0",
52
+ "@hookform/resolvers": "^5.5.7",
53
+ "@tanstack/react-query": "^5.101.4",
54
+ "@tanstack/react-query-devtools": "^5.101.4",
55
+ "inversify": "^8.2.3",
56
+ "react": "^19.2.8",
57
+ "react-dom": "^19.2.8",
58
+ "react-hook-form": "^7.83.0",
59
+ "react-router": "^8.3.0",
60
60
  "yup": "^1.7.1"
61
61
  },
62
62
  "devDependencies": {
63
- "@bdellegrazie/playwright-sonar-reporter": "^0.5.1",
64
- "@commitlint/cli": "^21.0.2",
63
+ "@bdellegrazie/playwright-sonar-reporter": "^0.5.2",
64
+ "@commitlint/cli": "^21.2.1",
65
65
  "@msw/playwright": "^0.6.7",
66
- "@playwright/test": "^1.60.0",
66
+ "@playwright/test": "^1.62.1",
67
67
  "@pplancq/commitlint-config": "*",
68
68
  "@pplancq/eslint-config": "*",
69
- "@pplancq/postcss-config": "*",
70
69
  "@pplancq/prettier-config": "*",
71
70
  "@pplancq/stylelint-config": "*",
72
- "@rsbuild/core": "^2.0.12",
71
+ "@rsbuild/core": "^2.1.9",
73
72
  "@rsbuild/plugin-eslint": "^2.0.2",
74
- "@rsbuild/plugin-react": "^2.0.1",
75
- "@rsbuild/plugin-sass": "^1.5.3",
76
- "@testing-library/jest-dom": "^6.9.1",
73
+ "@rsbuild/plugin-react": "^2.1.0",
74
+ "@rsbuild/plugin-sass": "^2.0.1",
75
+ "@testing-library/jest-dom": "^7.0.0",
77
76
  "@testing-library/react": "^16.3.2",
78
77
  "@testing-library/user-event": "^14.6.1",
79
- "@types/react": "^19.2.17",
80
- "@types/react-dom": "^19.2.3",
81
- "@vitejs/plugin-react": "^6.0.2",
82
- "@vitest/coverage-v8": "^4.1.8",
83
- "concurrently": "^10.0.3",
84
- "eslint": "^9.39.4",
78
+ "@types/react": "^19.2.18",
79
+ "@types/react-dom": "^19.2.4",
80
+ "@vitejs/plugin-react": "^6.0.5",
81
+ "@vitest/coverage-v8": "^4.1.10",
82
+ "concurrently": "^10.0.4",
83
+ "eslint": "^9.39.5",
85
84
  "eslint-plugin-prettier": "^5.5.6",
86
85
  "husky": "^9.1.7",
87
- "jsdom": "^29.1.1",
88
- "lint-staged": "^17.0.7",
86
+ "jsdom": "^30.0.1",
87
+ "lint-staged": "^17.2.0",
89
88
  "monocart-coverage-reports": "^2.12.12",
90
- "msw": "^2.14.6",
89
+ "msw": "^2.15.0",
91
90
  "nodemon": "^3.1.14",
92
- "prettier": "^3.8.4",
91
+ "prettier": "^3.9.6",
93
92
  "rsbuild-plugin-stylelint": "^1.2.0",
94
- "stylelint": "^17.13.0",
93
+ "stylelint": "^17.14.1",
95
94
  "stylelint-prettier": "^5.0.3",
96
95
  "tsc-files": "^1.1.4",
97
96
  "typescript": "^6.0.3",
98
97
  "vite-plugin-svgr": "^5.2.0",
99
- "vitest": "^4.1.8",
98
+ "vitest": "^4.1.10",
100
99
  "vitest-axe": "^1.0.0-pre.5",
101
100
  "vitest-sonar-reporter": "^3.0.0"
102
101
  },
@@ -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";
@@ -77,15 +77,15 @@ time,
77
77
  mark,
78
78
  audio,
79
79
  video {
80
- margin: 0;
81
80
  padding: 0;
82
- border: 0;
83
- vertical-align: baseline;
81
+ margin: 0;
84
82
  font: inherit;
85
83
  font-family:
86
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans',
87
- 'Helvetica Neue', sans-serif;
84
+ -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
85
+ "Helvetica Neue", sans-serif;
88
86
  font-size: 100%;
87
+ vertical-align: baseline;
88
+ border: 0;
89
89
  -webkit-font-smoothing: antialiased;
90
90
  -moz-osx-font-smoothing: grayscale;
91
91
  }
@@ -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