@pplancq/react-template 2.8.17 → 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.
- package/CHANGELOG.md +66 -0
- package/_README.md +57 -52
- package/mise.toml +2 -2
- package/mocks/browser.ts +1 -1
- package/mocks/fixtures/user.ts +14 -14
- package/mocks/handlers/userHandlers.ts +3 -3
- package/mocks/server.ts +1 -1
- package/package.json +30 -30
- package/playwright-report/html/index.html +90 -0
- package/playwright-report/sonar-results.xml +20 -0
- package/playwright.config.ts +3 -3
- package/scripts/removeDemo.cjs +105 -66
- package/src/README.md +81 -0
- package/src/app/App.tsx +18 -0
- package/src/{bootstrap.tsx → app/AppHTMLElement.tsx} +5 -5
- package/src/app/README.md +69 -0
- package/src/app/assets/css/index.ts +2 -0
- package/src/{assets → app/assets}/css/reset.css +3 -3
- package/src/app/config/queryClientConfig.ts +3 -0
- package/src/app/config/serviceContainer.ts +6 -0
- package/src/app/providers/Providers/Providers.tsx +18 -0
- package/src/app/providers/QueryClientProvider/QueryClientProvider.tsx +16 -0
- package/src/app/providers/ServiceProvider/ServiceContext.ts +8 -0
- package/src/app/providers/ServiceProvider/ServiceProvider.tsx +14 -0
- package/src/app/routing/Router.tsx +14 -0
- package/src/app/routing/appRoutes.ts +3 -0
- package/src/app/routing/routes.tsx +9 -0
- package/src/demo/README.md +149 -0
- package/src/demo/application/dtos/ArchitecturePrinciple.ts +5 -0
- package/src/{types/profileTypes.ts → demo/application/dtos/ProfileFormValues.ts} +1 -1
- package/src/demo/application/use-cases/GetArchitecturePrinciplesUseCase.ts +11 -0
- package/src/demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface.ts +5 -0
- package/src/demo/application/use-cases/GetDemoUsersUseCase.ts +11 -0
- package/src/demo/application/use-cases/GetDemoUsersUseCaseInterface.ts +5 -0
- package/src/demo/domain/entities/DemoUser.ts +7 -0
- package/src/demo/domain/repositories/ArchitecturePrincipleRepositoryInterface.d.ts +5 -0
- package/src/demo/domain/repositories/DemoUserRepositoryInterface.d.ts +5 -0
- package/src/demo/infrastructure/repositories/HttpDemoUserRepository.ts +29 -0
- package/src/demo/infrastructure/repositories/StaticArchitecturePrincipleRepository.ts +33 -0
- package/src/demo/serviceDemo.ts +40 -0
- package/src/demo/serviceIdentifiers.ts +6 -0
- package/src/demo/ui/components/DemoFooter/DemoFooter.tsx +17 -0
- package/src/demo/ui/components/DemoFooter/index.ts +1 -0
- package/src/demo/ui/components/DemoHeader/DemoHeader.tsx +25 -0
- package/src/demo/ui/components/DemoHeader/index.ts +1 -0
- package/src/{ui/molecules/Navigation/Navigation.tsx → demo/ui/components/DemoNavigation/DemoNavigation.tsx} +6 -6
- package/src/demo/ui/components/DemoNavigation/index.ts +1 -0
- package/src/{ui/atoms → demo/ui/components}/Input/Input.tsx +3 -3
- package/src/demo/ui/components/Input/index.ts +1 -0
- package/src/{ui/atoms → demo/ui/components}/Logo/Logo.tsx +2 -2
- package/src/demo/ui/components/Logo/index.ts +1 -0
- package/src/{ui/atoms → demo/ui/components}/NavLink/NavLink.tsx +3 -3
- package/src/demo/ui/components/NavLink/index.ts +1 -0
- package/src/{components → demo/ui/components}/TextInput/TextInput.tsx +3 -3
- package/src/demo/ui/components/TextInput/index.ts +1 -0
- package/src/{forms → demo/ui/forms}/ProfileForm/ProfileForm.tsx +13 -13
- package/src/demo/ui/forms/ProfileForm/index.ts +1 -0
- package/src/demo/ui/hooks/useDemoUsersQuery/useDemoUsersQuery.ts +13 -0
- package/src/demo/ui/layouts/DemoLayout/DemoLayout.tsx +12 -0
- package/src/demo/ui/layouts/MainTemplate/MainTemplate.module.css +21 -0
- package/src/demo/ui/layouts/MainTemplate/MainTemplate.tsx +26 -0
- package/src/demo/ui/layouts/MainTemplate/index.ts +1 -0
- package/src/{pages/Demo/Demo.module.scss → demo/ui/pages/DemoHome/DemoHome.module.scss} +5 -5
- package/src/demo/ui/pages/DemoHome/DemoHome.tsx +117 -0
- package/src/demo/ui/pages/DependencyInjectionDemo/DependencyInjectionDemo.tsx +47 -0
- package/src/{pages/Demo → demo/ui/pages}/ReactHookFormDemo/ReactHookFormDemo.tsx +8 -8
- package/src/demo/ui/pages/ReactQueryDemo/ReactQueryDemo.module.scss +38 -0
- package/src/{pages/Demo → demo/ui/pages}/ReactQueryDemo/ReactQueryDemo.tsx +6 -5
- package/src/demo/ui/routing/demoAppRoutes.ts +6 -0
- package/src/demo/ui/routing/demoRoutes.tsx +31 -0
- package/src/main.ts +5 -5
- package/src/react-app-env.d.ts +1 -1
- package/src/shared/README.md +53 -0
- package/src/shared/application/README.md +49 -0
- package/src/shared/domain/README.md +52 -0
- package/src/shared/infrastructure/README.md +51 -0
- package/src/shared/infrastructure/http/constant.ts +16 -0
- package/src/{api → shared/infrastructure/http}/fetchApi.ts +3 -3
- package/src/shared/ui/README.md +50 -0
- package/src/shared/ui/hooks/useService/useService.ts +13 -0
- package/test-results/.last-run.json +4 -0
- package/tests/e2e/demo.test.ts +17 -0
- package/tests/e2e/fixture/playwright.fixture.ts +15 -0
- package/tests/{utils → e2e/utils}/createNetworkFixture.ts +2 -2
- package/tests/{utils → e2e/utils}/createTestWithCoverageFixture.ts +8 -8
- package/tests/{utils → e2e/utils}/playwright.globalSetup.ts +4 -4
- package/tests/{utils → e2e/utils}/playwright.globalTeardown.ts +3 -3
- package/{src/__tests__/bootstraps.test.tsx → tests/unit/app/AppHTMLElement.test.tsx} +14 -14
- package/tests/unit/demo/ui/components/DemoFooter/Footer.test.tsx +15 -0
- package/{src/components/Footer/__tests__ → tests/unit/demo/ui/components/DemoFooter}/__snapshots__/Footer.test.tsx.snap +3 -3
- package/tests/unit/demo/ui/components/DemoHeader/Header.test.tsx +15 -0
- package/tests/unit/demo/ui/components/DemoHeader/__snapshots__/Header.test.tsx.snap +64 -0
- package/tests/unit/demo/ui/components/Logo/Logo.test.tsx +12 -0
- package/tsconfig.json +4 -2
- package/vitest.config.mts +6 -2
- package/postcss.config.mjs +0 -5
- package/src/api/README.md +0 -65
- package/src/api/constant.ts +0 -16
- package/src/api/demoApi.ts +0 -10
- package/src/assets/README.md +0 -54
- package/src/assets/css/index.ts +0 -2
- package/src/components/App/App.tsx +0 -18
- package/src/components/App/index.ts +0 -1
- package/src/components/Footer/Footer.tsx +0 -16
- package/src/components/Footer/__tests__/Footer.test.tsx +0 -15
- package/src/components/Footer/index.ts +0 -1
- package/src/components/Header/Header.tsx +0 -17
- package/src/components/Header/__tests__/Header.test.tsx +0 -15
- package/src/components/Header/__tests__/__snapshots__/Header.test.tsx.snap +0 -37
- package/src/components/Header/index.ts +0 -1
- package/src/components/README.md +0 -33
- package/src/components/TextInput/index.ts +0 -1
- package/src/config/README.md +0 -63
- package/src/config/index.ts +0 -1
- package/src/config/queryClientConfig.ts +0 -3
- package/src/forms/ProfileForm/index.ts +0 -1
- package/src/forms/README.md +0 -142
- package/src/hooks/README.md +0 -83
- package/src/hooks/api/queryKey.ts +0 -1
- package/src/hooks/api/useDemoApi.ts +0 -16
- package/src/pages/Demo/Demo.tsx +0 -236
- package/src/pages/Demo/ReactHookFormDemo/index.ts +0 -1
- package/src/pages/Demo/ReactHookFormDemo/routes.tsx +0 -7
- package/src/pages/Demo/ReactQueryDemo/index.ts +0 -1
- package/src/pages/Demo/ReactQueryDemo/routes.tsx +0 -7
- package/src/pages/Demo/__tests__/Demo.test.tsx +0 -15
- package/src/pages/Demo/__tests__/__snapshots__/Demo.test.tsx.snap +0 -557
- package/src/pages/Demo/index.ts +0 -1
- package/src/pages/Demo/routes.tsx +0 -8
- package/src/pages/Layout/Layout.tsx +0 -12
- package/src/pages/Layout/index.ts +0 -1
- package/src/pages/README.md +0 -91
- package/src/pages/UnexpectedError/UnexpectedError.module.css +0 -8
- package/src/pages/UnexpectedError/UnexpectedError.tsx +0 -22
- package/src/pages/UnexpectedError/index.ts +0 -1
- package/src/providers/QueryClientProvider/QueryClientProvider.tsx +0 -16
- package/src/providers/QueryClientProvider/index.ts +0 -1
- package/src/providers/README.md +0 -112
- package/src/providers/index.ts +0 -1
- package/src/providers/withProviders/index.ts +0 -1
- package/src/providers/withProviders/withProviders.tsx +0 -18
- package/src/routing/README.md +0 -76
- package/src/routing/appRoutes.ts +0 -5
- package/src/routing/routerFactory.ts +0 -12
- package/src/routing/routes.tsx +0 -13
- package/src/types/README.md +0 -62
- package/src/types/demoApi.ts +0 -25
- package/src/ui/README.md +0 -144
- package/src/ui/atoms/Input/index.ts +0 -1
- package/src/ui/atoms/Logo/__tests__/Logo.test.tsx +0 -12
- package/src/ui/atoms/Logo/index.ts +0 -1
- package/src/ui/atoms/NavLink/index.ts +0 -1
- package/src/ui/molecules/Navigation/index.ts +0 -1
- package/src/ui/organisms/Footer/Footer.module.css +0 -10
- package/src/ui/organisms/Footer/Footer.tsx +0 -10
- package/src/ui/organisms/Footer/index.ts +0 -1
- package/src/ui/organisms/Header/Header.module.css +0 -17
- package/src/ui/organisms/Header/Header.tsx +0 -16
- package/src/ui/organisms/Header/index.ts +0 -1
- package/src/ui/organisms/MainContent/MainContent.module.css +0 -3
- package/src/ui/organisms/MainContent/MainContent.tsx +0 -6
- package/src/ui/organisms/MainContent/index.ts +0 -1
- package/src/ui/templates/MainTemplate/MainTemplate.module.css +0 -5
- package/src/ui/templates/MainTemplate/MainTemplate.tsx +0 -26
- package/src/ui/templates/MainTemplate/index.ts +0 -1
- package/src/utils/README.md +0 -70
- package/tests/demo.test.ts +0 -17
- package/tests/fixture/playwright.fixture.ts +0 -15
- /package/src/{assets → app/assets}/css/mainBody.css +0 -0
- /package/src/{assets → demo/ui/assets}/images/logo.png +0 -0
- /package/src/{assets → demo/ui/assets}/images/templatePlugins.png +0 -0
- /package/src/{components/Footer/Footer.module.css → demo/ui/components/DemoFooter/DemoFooter.module.css} +0 -0
- /package/src/{components/Header/Header.module.css → demo/ui/components/DemoHeader/DemoHeader.module.css} +0 -0
- /package/src/{ui/molecules/Navigation/Navigation.module.css → demo/ui/components/DemoNavigation/DemoNavigation.module.css} +0 -0
- /package/src/{ui/atoms → demo/ui/components}/Input/Input.module.scss +0 -0
- /package/src/{ui/atoms → demo/ui/components}/Logo/Logo.module.css +0 -0
- /package/src/{forms → demo/ui/forms}/ProfileForm/ProfileForm.module.scss +0 -0
- /package/src/{pages/Demo/ReactQueryDemo/ReactQueryDemo.module.scss → demo/ui/pages/DependencyInjectionDemo/DependencyInjectionDemo.module.scss} +0 -0
- /package/src/{pages/Demo/ReactHookFormDemo/ReactHookFormDemo.module.css → demo/ui/pages/ReactHookFormDemo/ReactHookFormDemo.module.scss} +0 -0
- /package/src/{types/api.ts → shared/infrastructure/http/fetchApi.type.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
+
## 2.10.0 (2026-07-28)
|
|
2
|
+
|
|
3
|
+
### 🎉 Features
|
|
4
|
+
|
|
5
|
+
- **react-template:** remove postcss-config dependency ([3b57e0e](https://github.com/pplancq/dev-tools/commit/3b57e0e))
|
|
6
|
+
- **react-template:** restructure test directories ([4762120](https://github.com/pplancq/dev-tools/commit/4762120))
|
|
7
|
+
|
|
8
|
+
### 📦 Dependencies
|
|
9
|
+
|
|
10
|
+
- Updated @pplancq/commitlint-config to 4.0.3
|
|
11
|
+
- Updated @pplancq/stylelint-config to 5.0.4
|
|
12
|
+
- Updated @pplancq/prettier-config to 3.0.1
|
|
13
|
+
- Updated @pplancq/eslint-config to 6.0.18
|
|
14
|
+
- **deps:** update dependency @bdellegrazie/playwright-sonar-reporter to ^0.5.2 ([#1821](https://github.com/pplancq/dev-tools/pull/1821))
|
|
15
|
+
- **deps:** update dependency react-hook-form to ^7.83.0 ([#1828](https://github.com/pplancq/dev-tools/pull/1828))
|
|
16
|
+
- **deps:** update dependency inversify to ^8.2.3 ([#1817](https://github.com/pplancq/dev-tools/pull/1817))
|
|
17
|
+
- **deps:** update dependency @rsbuild/core to ^2.1.8 ([#1816](https://github.com/pplancq/dev-tools/pull/1816))
|
|
18
|
+
- **deps:** update dependency @testing-library/jest-dom to v7 ([#1831](https://github.com/pplancq/dev-tools/pull/1831))
|
|
19
|
+
- **deps:** update dependency react-router to ^8.3.0 ([#1829](https://github.com/pplancq/dev-tools/pull/1829))
|
|
20
|
+
- **deps:** update react-query mono repo to ^5.101.4 ([#1826](https://github.com/pplancq/dev-tools/pull/1826))
|
|
21
|
+
- **deps:** update react monorepo to ^19.2.8 ([#1825](https://github.com/pplancq/dev-tools/pull/1825))
|
|
22
|
+
- **deps:** update dependency @vitejs/plugin-react to ^6.0.4 ([#1822](https://github.com/pplancq/dev-tools/pull/1822))
|
|
23
|
+
- **deps:** update dependency inversify to ^8.1.3 ([#1782](https://github.com/pplancq/dev-tools/pull/1782))
|
|
24
|
+
- **deps:** update dependency react-hook-form to ^7.81.0 ([#1789](https://github.com/pplancq/dev-tools/pull/1789))
|
|
25
|
+
- **deps:** update commitlint monorepo ([#1799](https://github.com/pplancq/dev-tools/pull/1799))
|
|
26
|
+
- **deps:** update dependency @rsbuild/plugin-react to ^2.1.0 ([#1785](https://github.com/pplancq/dev-tools/pull/1785))
|
|
27
|
+
- **deps:** update dependency @vitejs/plugin-react to ^6.0.3 ([#1794](https://github.com/pplancq/dev-tools/pull/1794))
|
|
28
|
+
- **deps:** update react-query mono repo to ^5.101.2 ([#1796](https://github.com/pplancq/dev-tools/pull/1796))
|
|
29
|
+
- **deps:** update dependency @playwright/test to ^1.61.1 ([#1788](https://github.com/pplancq/dev-tools/pull/1788))
|
|
30
|
+
- **deps:** update dependency msw to ^2.15.0 ([#1809](https://github.com/pplancq/dev-tools/pull/1809))
|
|
31
|
+
- **deps:** update dependency @rsbuild/core to ^2.1.5 ([#1780](https://github.com/pplancq/dev-tools/pull/1780))
|
|
32
|
+
- **deps:** update dependency stylelint to ^17.14.0 ([#1798](https://github.com/pplancq/dev-tools/pull/1798))
|
|
33
|
+
- **deps:** update dependency react-router to v8 ([#1792](https://github.com/pplancq/dev-tools/pull/1792))
|
|
34
|
+
- **deps:** update dependency @rsbuild/plugin-sass to v2 ([#1801](https://github.com/pplancq/dev-tools/pull/1801))
|
|
35
|
+
|
|
36
|
+
### ❤️ Thank You
|
|
37
|
+
|
|
38
|
+
- Paul PLANCQ
|
|
39
|
+
|
|
40
|
+
## @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)
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* **react-template:** restructure react-template to Clean Architecture and DDD bounded contexts ([#1742](https://github.com/pplancq/dev-tools/issues/1742)) ([bbd8a9d](https://github.com/pplancq/dev-tools/commit/bbd8a9da2028a3f070993e38bd7140a5edbe6d2c))
|
|
45
|
+
|
|
46
|
+
### Bug Fixes
|
|
47
|
+
|
|
48
|
+
* **deps:** update commitlint monorepo to ^21.0.2 ([#1769](https://github.com/pplancq/dev-tools/issues/1769)) ([f3c7f42](https://github.com/pplancq/dev-tools/commit/f3c7f42c1229060f6471d68a3bdfc0517543ef3a))
|
|
49
|
+
* **deps:** update dependency @hookform/resolvers to ^5.4.0 ([#1755](https://github.com/pplancq/dev-tools/issues/1755)) ([e7f1d68](https://github.com/pplancq/dev-tools/commit/e7f1d68a868fba6247fe360b8e8b5e9fc6275be4))
|
|
50
|
+
* **deps:** update dependency @rsbuild/core to ^2.0.12 ([#1744](https://github.com/pplancq/dev-tools/issues/1744)) ([22a93b3](https://github.com/pplancq/dev-tools/commit/22a93b3d027b2a88c4bc9f80ecbeb4af91e3f0e6))
|
|
51
|
+
* **deps:** update dependency @rsbuild/plugin-eslint to ^2.0.2 ([#1759](https://github.com/pplancq/dev-tools/issues/1759)) ([eeaa6cb](https://github.com/pplancq/dev-tools/commit/eeaa6cbe616a365066611c39a3ccc36db6598b7c))
|
|
52
|
+
* **deps:** update dependency @rsbuild/plugin-react to ^2.0.1 ([#1766](https://github.com/pplancq/dev-tools/issues/1766)) ([b1527e6](https://github.com/pplancq/dev-tools/commit/b1527e6097daf03e8dbe82959e14899cf11d1086))
|
|
53
|
+
* **deps:** update dependency @rsbuild/plugin-sass to ^1.5.3 ([#1767](https://github.com/pplancq/dev-tools/issues/1767)) ([b25e848](https://github.com/pplancq/dev-tools/commit/b25e848e00e384b3a378ec243ce69c7151ff4c8c))
|
|
54
|
+
* **deps:** update dependency monocart-coverage-reports to ^2.12.12 ([#1768](https://github.com/pplancq/dev-tools/issues/1768)) ([8a5ba24](https://github.com/pplancq/dev-tools/commit/8a5ba24051ff8f7eb6409b5ab6738ebdb01055d9))
|
|
55
|
+
* **deps:** update dependency react-hook-form to ^7.78.0 ([#1756](https://github.com/pplancq/dev-tools/issues/1756)) ([2cccd51](https://github.com/pplancq/dev-tools/commit/2cccd5144d875d0accf485b256ef3d91ca8fe893))
|
|
56
|
+
* **deps:** update dependency stylelint to ^17.13.0 ([#1752](https://github.com/pplancq/dev-tools/issues/1752)) ([acfc13f](https://github.com/pplancq/dev-tools/commit/acfc13f61041ffc9323a3e469c1b2e51fbf3bf9f))
|
|
57
|
+
* **deps:** update react monorepo ([#1745](https://github.com/pplancq/dev-tools/issues/1745)) ([8424cfe](https://github.com/pplancq/dev-tools/commit/8424cfed2645554410e1e7df2632376b26b1fb04))
|
|
58
|
+
* **deps:** update react-query mono repo to ^5.101.0 ([#1749](https://github.com/pplancq/dev-tools/issues/1749)) ([31d0cfd](https://github.com/pplancq/dev-tools/commit/31d0cfdedf9a5c1ed2779cff2a0b8a0fd8a8ac5d))
|
|
59
|
+
* **deps:** update react-router monorepo to ^7.17.0 ([#1763](https://github.com/pplancq/dev-tools/issues/1763)) ([6cfffba](https://github.com/pplancq/dev-tools/commit/6cfffba0a99f0c0dcb4f271ace035e60b2d951d3))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Dependencies
|
|
63
|
+
|
|
64
|
+
* **@pplancq/commitlint-config:** upgraded to 4.0.2
|
|
65
|
+
* **@pplancq/eslint-config:** upgraded to 6.0.17
|
|
66
|
+
|
|
1
67
|
## @pplancq/react-template [2.8.17](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@2.8.16...@pplancq/react-template@2.8.17) (2026-05-19)
|
|
2
68
|
|
|
3
69
|
### Bug Fixes
|
package/_README.md
CHANGED
|
@@ -81,64 +81,69 @@ Allows you to fix prettier lint errors.
|
|
|
81
81
|
|
|
82
82
|
To remove the demo application.
|
|
83
83
|
|
|
84
|
-
### `npm run migrate:vite`
|
|
85
|
-
|
|
86
|
-
To migrate from webpack to vite.
|
|
87
|
-
|
|
88
84
|
## 🏗 <span id="project-structure">Project Structure</span>
|
|
89
85
|
|
|
90
|
-
```
|
|
91
|
-
📁 my-
|
|
86
|
+
```text
|
|
87
|
+
📁 my-project
|
|
92
88
|
├── 📁 src
|
|
93
|
-
│ ├──
|
|
94
|
-
│
|
|
95
|
-
│ │ ├──
|
|
96
|
-
│ │ ├──
|
|
97
|
-
│ │ ├──
|
|
98
|
-
│ ├── 📁
|
|
99
|
-
│ │ ├── 📁
|
|
100
|
-
│ ├── 📁 providers
|
|
101
|
-
│
|
|
102
|
-
│
|
|
103
|
-
│ │ ├──
|
|
104
|
-
│ │
|
|
105
|
-
│
|
|
106
|
-
│ │ ├── 📁
|
|
107
|
-
│ │
|
|
108
|
-
│ │ ├── 📁
|
|
109
|
-
│
|
|
110
|
-
│ │
|
|
111
|
-
│ │
|
|
112
|
-
│
|
|
113
|
-
│ ├──
|
|
114
|
-
│ │ ├── 📁
|
|
115
|
-
│ │ ├── 📁
|
|
116
|
-
│ │ ├── 📁
|
|
117
|
-
│ ├── 📁
|
|
118
|
-
│ ├── 📁
|
|
119
|
-
│ ├── 📁
|
|
120
|
-
│ ├── 📁
|
|
121
|
-
│ ├── 📁
|
|
89
|
+
│ ├── 📄 README.md
|
|
90
|
+
│ ├── 📁 app
|
|
91
|
+
│ │ ├── 📄 README.md
|
|
92
|
+
│ │ ├── 📄 App.tsx
|
|
93
|
+
│ │ ├── 📄 AppHTMLElement.tsx
|
|
94
|
+
│ │ ├── 📁 assets
|
|
95
|
+
│ │ ├── 📁 config
|
|
96
|
+
│ │ ├── 📁 providers
|
|
97
|
+
│ │ └── 📁 routing
|
|
98
|
+
│ ├── 📁 shared
|
|
99
|
+
│ │ ├── 📄 README.md
|
|
100
|
+
│ │ ├── 📁 application
|
|
101
|
+
│ │ │ └── 📄 README.md
|
|
102
|
+
│ │ ├── 📁 domain
|
|
103
|
+
│ │ │ └── 📄 README.md
|
|
104
|
+
│ │ ├── 📁 infrastructure
|
|
105
|
+
│ │ │ └── 📄 README.md
|
|
106
|
+
│ │ └── 📁 ui
|
|
107
|
+
│ │ └── 📄 README.md
|
|
108
|
+
│ ├── 📁 demo
|
|
109
|
+
│ │ ├── 📄 README.md
|
|
110
|
+
│ │ ├── 📁 application
|
|
111
|
+
│ │ ├── 📁 domain
|
|
112
|
+
│ │ ├── 📁 infrastructure
|
|
113
|
+
│ │ ├── 📁 ui
|
|
114
|
+
│ │ │ ├── 📁 assets
|
|
115
|
+
│ │ │ ├── 📁 components
|
|
116
|
+
│ │ │ ├── 📁 forms
|
|
117
|
+
│ │ │ ├── 📁 hooks
|
|
118
|
+
│ │ │ ├── 📁 layouts
|
|
119
|
+
│ │ │ ├── 📁 pages
|
|
120
|
+
│ │ │ └── 📁 routing
|
|
121
|
+
│ │ ├── 📄 serviceDemo.ts
|
|
122
|
+
│ │ └── 📄 serviceIdentifiers.ts
|
|
123
|
+
│ ├── 📄 main.ts
|
|
124
|
+
│ └── 📄 react-app-env.d.ts
|
|
122
125
|
```
|
|
123
126
|
|
|
124
127
|
### 📚 Folder Definitions
|
|
125
128
|
|
|
126
129
|
Here is the project folder structure, with a brief description of each folder:
|
|
127
130
|
|
|
128
|
-
| Folder
|
|
129
|
-
|
|
|
130
|
-
| **📁 src**
|
|
131
|
-
| [**📁
|
|
132
|
-
| [
|
|
133
|
-
| [**📁
|
|
134
|
-
| [**📁
|
|
135
|
-
| [**📁
|
|
136
|
-
| [**📁
|
|
137
|
-
| [**📁
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
131
|
+
| Folder | Description |
|
|
132
|
+
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
133
|
+
| **📁 src** | **_The root directory of the application source code._** It also contains [`src/README.md`](./src/README.md), which serves as the documentation index. |
|
|
134
|
+
| [**📁 app**](./src/app/README.md) | Owns the application bootstrap layer: root app composition, custom element entry point, routing, providers, global configuration, and app-wide assets. |
|
|
135
|
+
| [**📁 shared**](./src/shared/README.md) | Contains only genuinely reusable cross-context code. In this starter it is intentionally conservative and avoids hosting demo-specific UI. |
|
|
136
|
+
| [**📁 shared/application**](./src/shared/application/README.md) | Shared application-layer abstractions, DTO helpers, or orchestration utilities that can be reused by several bounded contexts. |
|
|
137
|
+
| [**📁 shared/domain**](./src/shared/domain/README.md) | Shared pure types and contracts. This folder must stay framework-free and focused on stable, reusable domain-facing definitions. |
|
|
138
|
+
| [**📁 shared/infrastructure**](./src/shared/infrastructure/README.md) | Shared technical helpers backed by external tools or browser APIs, such as generic HTTP utilities. |
|
|
139
|
+
| [**📁 shared/ui**](./src/shared/ui/README.md) | Shared UI-facing helpers with no feature identity. In the current template it mainly exists for common hooks such as DI-to-React integration. |
|
|
140
|
+
| [**📁 demo**](./src/demo/README.md) | The example bounded context included in the starter. It demonstrates how to structure a feature using `application`, `domain`, `infrastructure`, and `ui`. |
|
|
141
|
+
| **📁 demo/ui/components** | Demo visual components and building blocks. The structure stays practical and readable instead of exposing `atoms`, `molecules`, or `organisms` folders. |
|
|
142
|
+
| **📁 demo/ui/layouts** | Demo layouts used to compose pages. |
|
|
143
|
+
| **📁 demo/ui/pages** | Demo pages such as the overview page and the example feature pages. |
|
|
144
|
+
| **📁 demo/ui/forms** | Demo form composition and form-related UI pieces. |
|
|
145
|
+
| **📁 demo/ui/hooks** | Demo-specific React hooks, such as query hooks that connect the UI to the application layer. |
|
|
146
|
+
| **📁 demo/ui/routing** | Demo route definitions and route path constants consumed by the app router. |
|
|
142
147
|
|
|
143
148
|
## 🏗 <span id="component-structure">React Component Structure</span>
|
|
144
149
|
|
|
@@ -171,7 +176,7 @@ export { ComponentName } from './ComponentName';
|
|
|
171
176
|
This will allow importing a component like this:
|
|
172
177
|
|
|
173
178
|
```typescript
|
|
174
|
-
import { ComponentName } from '@
|
|
179
|
+
import { ComponentName } from '@Demo/ui/components/ComponentName';
|
|
175
180
|
```
|
|
176
181
|
|
|
177
182
|
#### 📄 ComponentName.tsx
|
|
@@ -236,13 +241,13 @@ export const ComponentName = () => {
|
|
|
236
241
|
|
|
237
242
|
## ⚠️ Caution with Environment Variables
|
|
238
243
|
|
|
239
|
-
The
|
|
244
|
+
The build configuration of this project allows for environment variables to be included in the application bundle. This could potentially expose sensitive information if the bundle is publicly accessible.
|
|
240
245
|
|
|
241
246
|
It is recommended to only include non-sensitive environment variables in the application bundle. Sensitive information should not be exposed even if the bundle is publicly accessible.
|
|
242
247
|
|
|
243
248
|
Ensure you understand the security implications before including environment variables in your bundle.
|
|
244
249
|
|
|
245
|
-
Please note that the
|
|
250
|
+
Please note that the build configuration pre-filters environment variables via the default prefix `FRONT*`. This means that only environment variables starting with `FRONT*` will be included in the bundle. This is an additional layer of security to prevent the accidental exposure of sensitive environment variables.
|
|
246
251
|
|
|
247
252
|
## 🙇 <span id="learnmore">Learn More</span>
|
|
248
253
|
|
package/mise.toml
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
[tools]
|
|
2
|
-
node = "24.
|
|
3
|
-
npm = "
|
|
2
|
+
node = "24.18.0"
|
|
3
|
+
npm = "12.0.1"
|
package/mocks/browser.ts
CHANGED
package/mocks/fixtures/user.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export const users = [
|
|
2
2
|
{
|
|
3
3
|
id: 1,
|
|
4
|
-
name:
|
|
5
|
-
username:
|
|
6
|
-
email:
|
|
4
|
+
name: "Demo user",
|
|
5
|
+
username: "@demoUser",
|
|
6
|
+
email: "demo@user.test",
|
|
7
7
|
address: {
|
|
8
|
-
street:
|
|
9
|
-
suite:
|
|
10
|
-
city:
|
|
11
|
-
zipcode:
|
|
8
|
+
street: "Kulas Light",
|
|
9
|
+
suite: "Apt. 556",
|
|
10
|
+
city: "Gwenborough",
|
|
11
|
+
zipcode: "92998-3874",
|
|
12
12
|
geo: {
|
|
13
|
-
lat:
|
|
14
|
-
lng:
|
|
13
|
+
lat: "-37.3159",
|
|
14
|
+
lng: "81.1496",
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
|
-
phone:
|
|
18
|
-
website:
|
|
17
|
+
phone: "1-770-736-8031 x56442",
|
|
18
|
+
website: "hildegard.org",
|
|
19
19
|
company: {
|
|
20
|
-
name:
|
|
21
|
-
catchPhrase:
|
|
22
|
-
bs:
|
|
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
|
|
2
|
-
import { http, HttpResponse } from
|
|
1
|
+
import { users } from "@Mocks/fixtures/user";
|
|
2
|
+
import { http, HttpResponse } from "msw";
|
|
3
3
|
|
|
4
|
-
export const getUsers200 = http.get(
|
|
4
|
+
export const getUsers200 = http.get("*/users", () => {
|
|
5
5
|
return HttpResponse.json(users);
|
|
6
6
|
});
|
package/mocks/server.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pplancq/react-template",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
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@
|
|
16
|
+
"packageManager": "npm@12.0.1",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "rsbuild dev",
|
|
19
19
|
"start:mock": "rsbuild dev --env-mode mock",
|
|
@@ -49,53 +49,53 @@
|
|
|
49
49
|
"template"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@hookform/resolvers": "^5.
|
|
53
|
-
"@tanstack/react-query": "^5.
|
|
54
|
-
"@tanstack/react-query-devtools": "^5.
|
|
55
|
-
"
|
|
56
|
-
"react
|
|
57
|
-
"react-
|
|
58
|
-
"react-
|
|
52
|
+
"@hookform/resolvers": "^5.4.0",
|
|
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",
|
|
59
60
|
"yup": "^1.7.1"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
|
-
"@bdellegrazie/playwright-sonar-reporter": "^0.5.
|
|
63
|
-
"@commitlint/cli": "^21.
|
|
63
|
+
"@bdellegrazie/playwright-sonar-reporter": "^0.5.2",
|
|
64
|
+
"@commitlint/cli": "^21.2.1",
|
|
64
65
|
"@msw/playwright": "^0.6.7",
|
|
65
|
-
"@playwright/test": "^1.
|
|
66
|
+
"@playwright/test": "^1.61.1",
|
|
66
67
|
"@pplancq/commitlint-config": "*",
|
|
67
68
|
"@pplancq/eslint-config": "*",
|
|
68
|
-
"@pplancq/postcss-config": "*",
|
|
69
69
|
"@pplancq/prettier-config": "*",
|
|
70
70
|
"@pplancq/stylelint-config": "*",
|
|
71
|
-
"@rsbuild/core": "^2.
|
|
72
|
-
"@rsbuild/plugin-eslint": "^2.0.
|
|
73
|
-
"@rsbuild/plugin-react": "^2.
|
|
74
|
-
"@rsbuild/plugin-sass": "^
|
|
75
|
-
"@testing-library/jest-dom": "^
|
|
71
|
+
"@rsbuild/core": "^2.1.8",
|
|
72
|
+
"@rsbuild/plugin-eslint": "^2.0.2",
|
|
73
|
+
"@rsbuild/plugin-react": "^2.1.0",
|
|
74
|
+
"@rsbuild/plugin-sass": "^2.0.1",
|
|
75
|
+
"@testing-library/jest-dom": "^7.0.0",
|
|
76
76
|
"@testing-library/react": "^16.3.2",
|
|
77
77
|
"@testing-library/user-event": "^14.6.1",
|
|
78
|
-
"@types/react": "^19.2.
|
|
78
|
+
"@types/react": "^19.2.17",
|
|
79
79
|
"@types/react-dom": "^19.2.3",
|
|
80
|
-
"@vitejs/plugin-react": "^6.0.
|
|
81
|
-
"@vitest/coverage-v8": "^4.1.
|
|
82
|
-
"concurrently": "^
|
|
83
|
-
"eslint": "^9.39.
|
|
84
|
-
"eslint-plugin-prettier": "^5.5.
|
|
80
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
81
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
82
|
+
"concurrently": "^10.0.3",
|
|
83
|
+
"eslint": "^9.39.5",
|
|
84
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
85
85
|
"husky": "^9.1.7",
|
|
86
86
|
"jsdom": "^29.1.1",
|
|
87
|
-
"lint-staged": "^17.0
|
|
88
|
-
"monocart-coverage-reports": "^2.12.
|
|
89
|
-
"msw": "^2.
|
|
87
|
+
"lint-staged": "^17.2.0",
|
|
88
|
+
"monocart-coverage-reports": "^2.12.12",
|
|
89
|
+
"msw": "^2.15.0",
|
|
90
90
|
"nodemon": "^3.1.14",
|
|
91
|
-
"prettier": "^3.
|
|
91
|
+
"prettier": "^3.9.6",
|
|
92
92
|
"rsbuild-plugin-stylelint": "^1.2.0",
|
|
93
|
-
"stylelint": "^17.
|
|
93
|
+
"stylelint": "^17.14.1",
|
|
94
94
|
"stylelint-prettier": "^5.0.3",
|
|
95
95
|
"tsc-files": "^1.1.4",
|
|
96
96
|
"typescript": "^6.0.3",
|
|
97
97
|
"vite-plugin-svgr": "^5.2.0",
|
|
98
|
-
"vitest": "^4.1.
|
|
98
|
+
"vitest": "^4.1.10",
|
|
99
99
|
"vitest-axe": "^1.0.0-pre.5",
|
|
100
100
|
"vitest-sonar-reporter": "^3.0.0"
|
|
101
101
|
},
|