dccxx-s3-explorer 1.0.88 → 1.0.90

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/README.md CHANGED
@@ -1,340 +1,340 @@
1
- # Vite React Boilerplate
2
-
3
- ![](/public/vite-react-boilerplate.png)
4
-
5
- Everything you need to kick off your next Vite + React web app!
6
-
7
- ## Table of Contents
8
-
9
- - [Overview](#overview)
10
- - [Requirements](#requirements)
11
- - [Getting Started](#getting-started)
12
- - [Important Note](#important-note)
13
- - [Testing](#testing)
14
- - [Preparing for Deployment](#preparing-for-deployment)
15
- - [DevTools](#devtools)
16
- - [Installed Packages](#installed-packages)
17
-
18
- ## Overview
19
-
20
- Built with type safety, scalability, and developer experience in mind. A batteries included Vite + React template.
21
-
22
- - [pnpm](https://pnpm.io) - A strict and efficient alternative to npm with up to 3x faster performance
23
- - [TypeScript](https://www.typescriptlang.org) - A typed superset of JavaScript designed with large scale applications in mind
24
- - [ESLint](https://eslint.org) - Static code analysis to help find problems within a codebase
25
- - [Prettier](https://prettier.io) - An opinionated code formatter
26
- - [Vite](https://vitejs.dev) - Feature rich and highly optimized frontend tooling with TypeScript support out of the box
27
- - [React](https://react.dev) - A modern front-end JavaScript library for building user interfaces based on components
28
- - [Tailwind CSS](https://tailwindcss.com) - A utility-first CSS framework packed with classes to build any web design imaginable
29
- - [Storybook](https://storybook.js.org) - A frontend workshop for building UI components and pages in isolation
30
- - [TanStack Router](https://tanstack.com/router/v1) - Fully typesafe, modern and scalable routing for React applications
31
- - [TanStack Query](https://tanstack.com/query/latest) - Declarative, always-up-to-date auto-managed queries and mutations
32
- - [TanStack Table](https://tanstack.com/table/v8) - Headless UI for building powerful tables & datagrids
33
- - [Zustand](https://zustand-demo.pmnd.rs) - An unopinionated, small, fast and scalable bearbones state-management solution
34
- - [React Hook Form](https://react-hook-form.com) - Performant, flexible and extensible forms with easy-to-use validation
35
- - [Zod](https://zod.dev) - TypeScript-first schema validation with static type inference
36
- - [React Testing Library](https://testing-library.com) - A very light-weight, best practice first, solution for testing React components
37
- - [Vitest](https://vitest.dev) - A blazing fast unit test framework powered by Vite
38
- - [Playwright](https://playwright.dev) - Enables reliable end-to-end testing for modern web apps
39
- - [Nivo](https://nivo.rocks) - A rich set of data visualization components, built on top of D3 and React
40
- - [react-i18next](https://react.i18next.com/) - A powerful internationalization framework for React/React Native based on i18next
41
- - [Faker](https://fakerjs.dev/) - Generate massive amounts of fake (but realistic) data for testing and development
42
- - [Dayjs](https://day.js.org/en/) - A minimalist JavaScript library that parses, validates, manipulates, and displays dates and times for modern browsers
43
- - [Husky](https://github.com/typicode/husky#readme) + [Commitizen](https://github.com/commitizen/cz-cli#readme) + [Commitlint](https://github.com/conventional-changelog/commitlint#readme) - Git hooks and commit linting to ensure use of descriptive and practical commit messages
44
- - [ts-reset](https://github.com/total-typescript/ts-reset#readme) - Improvements for TypeScripts built-in typings for use in applications
45
- - [Docker](https://www.docker.com) - Containerization tool for deploying your vite-react-boilerplate app
46
-
47
- A more detailed list of the included packages can be found in the [Installed Packages](#installed-packages) section. Packages not shown above include Devtools, ui helper libraries, and eslint plugins/configs.
48
-
49
- ## Requirements
50
-
51
- - [NodeJS 18+](https://nodejs.org/en)
52
- - [pnpm](https://pnpm.io) (or equivalent)
53
-
54
- If you'd like to use the included Dockerfile then [Docker](https://www.docker.com) is required as well:
55
-
56
- ## Getting Started
57
-
58
- Getting started is a simple as cloning the repository
59
-
60
- ```
61
- git clone git@github.com:RicardoValdovinos/vite-react-boilerplate.git
62
- ```
63
-
64
- Changing into the new directory
65
-
66
- ```
67
- cd vite-react-boilerplate
68
- ```
69
-
70
- Removing the .git folder (and any additional files, folders or dependencies you may not need)
71
-
72
- ```
73
- rm -rf .git
74
- ```
75
-
76
- Installing dependencies
77
-
78
- ```
79
- pnpm install
80
- ```
81
-
82
- And running the setup script (initializes git repository and husky and installs playwright)
83
-
84
- ```
85
- pnpm run setup
86
- ```
87
-
88
- Congrats! You're ready to starting working on that new project!
89
-
90
- If you'd rather run the commands above in one go, check out the command below:
91
-
92
- ```
93
- git clone git@github.com:RicardoValdovinos/vite-react-boilerplate.git &&\
94
- cd vite-react-boilerplate &&\
95
- rm -rf .git &&\
96
- pnpm install &&\
97
- pnpm run setup
98
- ```
99
-
100
- **Note**: This project comes with two git hooks added by [husky](https://typicode.github.io/husky/). A prepare-commit-msg hook to run the [Commitizen](https://github.com/commitizen/cz-cli#readme) cli for those nice commit messages and a commit-msg hook to run [Commitlint](https://commitlint.js.org/#/) on the message itself. Commitlint will ensure the commit message follows the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) (it will if you used commitizen).
101
-
102
- If you wish to remove any hooks, simply delete the corresponding file in the .husky directory.
103
-
104
- ## Important Note
105
-
106
- 1. This boilerplate project does not include a demo. At most, a few utilities (types, devtools, initial home page routes) are included. There is no glue to get in your way when trying to modify the template.
107
-
108
- 2. Due to empty directories not being included in git commits, placeholder README files have been added to these empty directories. These README files contain simple descriptions about how the different directories in the accompanying folder structure may be used. As an example check out the [recommended component organizational structure](src/components/README.md) as well as the [recommended folder structure](src/features/README.md).
109
-
110
- 3. [Faker](https://fakerjs.dev/) is included to encourage more isolated testing and allow for rapid development of demos and MVPs. However, please make note that, [due to a bug](https://github.com/faker-js/faker/issues/1791), importing Faker from the main package (without a locale) will result in the entire Faker lib being imported causing bundle sizes to increase up to 2+ MB. Instead prefer [localized imports](https://fakerjs.dev/guide/localization.html#individual-localized-packages) as shown below.
111
-
112
- ```
113
- // import { faker } from '@faker-js/faker';
114
- import { faker } from '@faker-js/faker/locale/en'; // prefer localization when possible
115
- ```
116
-
117
- The imported lib will instead be around 600 KB. Nonetheless, Faker should **NOT** be used in production and instead be limited to testing and demos.
118
-
119
- ## Testing
120
-
121
- Unit testing is handled by React Testing Library and Vitest while End-to-End (E2E) Testing is conducted by Playwright.
122
-
123
- If you'd like to run all tests, Unit and E2E alike, execute the following command:
124
-
125
- ```
126
- pnpm run test
127
- ```
128
-
129
- ### Unit Testing
130
-
131
- When running unit test scripts, it is assumed that unit tests will be colocated with the source files. Take a look at the placeholder README file in `src/components` for [an example](src/components/README.md).
132
-
133
- If you'd like to execute unit tests specifically, the below command will execute vitest:
134
-
135
- ```
136
- pnpm run test:unit
137
- ```
138
-
139
- If instead you are interested in coverage reporting, run:
140
-
141
- ```
142
- pnpm run test:unit:coverage
143
- ```
144
-
145
- All unit tests run in watch mode by default. If you'd like to disable watch mode, change the package.json test scripts with the following
146
-
147
- before:
148
-
149
- ```
150
- "scripts": {
151
- "test:unit": "vitest src/",
152
- "test:unit:coverage": "vitest --coverage src/"
153
- }
154
- ```
155
-
156
- After:
157
-
158
- ```
159
- "scripts": {
160
- "test:unit": "vitest run src/",
161
- "test:unit:coverage": "vitest run --coverage src/"
162
- }
163
- ```
164
-
165
- **Note**: Faker is included to provide mock data. See the [Important Note](#important-note) section for crucial details regarding this package. Specifically, point 3.
166
-
167
- ### End-to-End (E2E) Testing
168
-
169
- Running E2E tests use a similar syntax to running unit tests:
170
-
171
- ```
172
- pnpm run test:e2e
173
- ```
174
-
175
- If you wish to see the reports, run:
176
-
177
- ```
178
- pnpm run test:e2e:report
179
- ```
180
-
181
- ## Preparing for Deployment
182
-
183
- Instructions are provided for deploying both with and without Docker. Both options still require a platform to host the application.
184
-
185
- ### Without Docker
186
-
187
- Deploying is as easy as running
188
-
189
- ```
190
- pnpm run build
191
- ```
192
-
193
- and pointing your web server to the generated `index.html` file found at `dist/index.html`
194
-
195
- ### With Docker
196
-
197
- A Dockerfile with an [NGINX](https://www.nginx.com) base image is also provided for quick and easy deployments. Simply execute the following commands:
198
-
199
- 1. `pnpm run build`
200
- 2. `docker build . -t <container_name>`
201
- - Example: `docker build . -t todo-app`
202
- 3. `docker run -p <port_number>:80 <container_name>`
203
- - Example: `docker run -p 8080:80 todo-app`
204
-
205
- ### Continuous Integration
206
-
207
- Due to the vast array of tools, opinions, requirements and preferences a CI template is not included in this project.
208
-
209
- ## Devtools
210
-
211
- This project includes a set of Devtools. Some are additional package dependencies whereas others come built-in to the packages themselves.
212
-
213
- ### Devtool dependencies:
214
-
215
- - [@tanstack/react-query-devtools](https://tanstack.com/query/v4/docs/react/devtools) - Dedicated dev tools to help visualize the inner workings of React Query
216
- - [@tanstack/router-devtools](https://tanstack.com/router/v1/docs/devtools) - Dedicated dev tools to help visualize the inner workings of TanStack Router
217
- - [@tanstack/react-table-devtools](https://www.npmjs.com/package/@tanstack/react-table-devtools) - Dedicated dev tools to help visualize the inner workings of TanStack Table
218
- - [@hookform/DevTools](https://react-hook-form.com/dev-tools) - React Hook Form Devtools to help debug forms with validation
219
-
220
- A set of utility components are provided in `src/components/utils/development-tools/`. These [wrapper components](https://tanstack.com/router/v1/docs/devtools#only-importing-and-using-devtools-in-developmentgit) check whether the application is running in development or production mode and render the component or null respectively. In other words, you can confidently use them during development without having to worry about them showing up for end users in production.
221
-
222
- **TanStack Query Devtools** are ready to go out of the box. The development vs. production rendering mechanism is built into the devtools. If you do wish to [render the devtools in production](https://tanstack.com/query/latest/docs/react/devtools) you can freely do so by following the TanStack Query Devtools documentation. The devtools component can be found in `src/App.tsx`.
223
-
224
- When running the application in development mode you can find the TanStack Query Devtools icon in the bottom left corner of the page sporting the [React Query Logo](https://img.stackshare.io/service/25599/default_c6db7125f2c663e452ba211df91b2ced3bb7f0ff.png).
225
-
226
- **TanStack Router Devtools**, however, utilizes its respective utility component in this project. The initial setup has been taken care of but if you wish to modify or remove the component, have a look in `src/App.tsx`.
227
-
228
- The TanStack Router Devtools icon can be found in the bottom right corner of the page denoted by the vertically stacked "TANSTACK ROUTER" logo.
229
-
230
- The above components, along with their imports, are commented out to start.
231
-
232
- **TanStack Table Devtools** Documentation is, at the time of writing this, non-existent. Having said that, usage is similar to the other TanStack devtools. A utility component restricting the devtools to development builds has been provided. The difference in comparison to the other TanStack devtools is the lack of floating mode. Instead, the Devtools are rendered as a component within the actual TanStack Table you define. An additional caveat being that the DevTools component (built-in and provided utility alike) require a table prop from the `useReactTable()` hook. In other words, if you have multiple tables, each table must have its own Devtools component. Check the simplified code below.
233
-
234
- ```
235
- function Table(): FunctionComponent {
236
- /* some code */
237
-
238
- const table = useReactTable({
239
- data,
240
- columns,
241
- getCoreRowModel: getCoreRowModel(),
242
- });
243
-
244
- return (
245
- <>
246
- {/* table code */}
247
- <TanStackTableDevelopmentTools table={table} />
248
- </>
249
- )
250
- }
251
- ```
252
-
253
- **React Hook Form DevTools** icon can be recognized in the top right corner of the page by the pink React Hook Form clipboard logo. A utility component has also provided. Like the TanStack Table Devtools component above, a prop must be passed from a specific hook. In this case, it is the control prop from the `useForm()` hook. Similar to TanStack Table, use of React Hook Form DevTools requires the component be added to each unique form. More information can be found in the [React Hook Form DevTools documentation](https://react-hook-form.com/dev-tools).
254
-
255
- To reiterate, if you wish to restrict the Devtools to development builds use the provided components found at `src/components/utils/development-tools` instead of the built-in components from their respective modules.
256
-
257
- ### Built-in Devtools:
258
-
259
- - Zustand
260
-
261
- **Zustand** provides a built-in [devtools middleware](https://github.com/pmndrs/zustand#redux-devtools) for use with [Redux DevTools](https://github.com/reduxjs/redux-devtools#redux-devtools).
262
-
263
- ## Installed Packages
264
-
265
- A simplified list can be found in the [Overview](#overview) section.
266
-
267
- ### Base
268
-
269
- - [TypeScript](https://www.typescriptlang.org)
270
- - [Vite](https://vitejs.dev)
271
- - [React](https://react.dev)
272
-
273
- ### Routing
274
-
275
- - [TanStack Router](https://tanstack.com/router/v1)
276
-
277
- ### Linting & Formatting
278
-
279
- - [ESLint](https://eslint.org)
280
- - [typescript-eslint](https://typescript-eslint.io)
281
- - [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier#readme)
282
- - [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#readme)
283
- - [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
284
- - [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh)
285
- - [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn#readme)
286
- - [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook#readme)
287
- - [Prettier](https://prettier.io)
288
-
289
- ### State Management
290
-
291
- - [TanStack Query (React Query)](https://tanstack.com/query/latest)
292
- - [Zustand](https://zustand-demo.pmnd.rs)
293
-
294
- ### UI
295
-
296
- - [Tailwind CSS](https://tailwindcss.com)
297
- - [HeadlessUI](https://headlessui.com)
298
- - [heroicons](https://heroicons.com)
299
- - [TanStack Table](https://tanstack.com/table/v8)
300
- - [Storybook](https://storybook.js.org)
301
-
302
- ### Forms
303
-
304
- - [React Hook Form](https://react-hook-form.com)
305
- - [Zod](https://zod.dev)
306
-
307
- ### Data Visualization
308
-
309
- - [Nivo](https://nivo.rocks)
310
- - [Line](https://nivo.rocks/line/)
311
- - [Bar](https://nivo.rocks/bar/)
312
- - [Pie](https://nivo.rocks/pie/)
313
-
314
- ### Testing
315
-
316
- - [Vitest](https://vitest.dev)
317
- - [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)
318
- - [Playwright](https://playwright.dev)
319
-
320
- ### Development Tools
321
-
322
- - [TanStack Query Devtools](https://tanstack.com/query/latest/docs/react/devtools?from=reactQueryV3&original=https%3A%2F%2Ftanstack.com%2Fquery%2Fv3%2Fdocs%2Fdevtools)
323
- - [TanStack Router Devtools](https://tanstack.com/router/v1/docs/devtools)
324
- - [TanStack Table Devtools](https://www.npmjs.com/package/@tanstack/react-table-devtools)
325
- - [React Hook Form Devtools](https://react-hook-form.com/dev-tools)
326
-
327
- ### Git
328
-
329
- - [Husky](https://github.com/typicode/husky#readme)
330
- - [Commitizen](https://github.com/commitizen/cz-cli#readme)
331
- - [Commitlint](https://github.com/conventional-changelog/commitlint#readme)
332
-
333
- ### Other
334
-
335
- - [i18next-browser-languageDetector](https://github.com/i18next/i18next-browser-languageDetector)
336
- - [i18next](https://www.i18next.com/)
337
- - [react-i18next](https://react.i18next.com/)
338
- - [ts-reset](https://github.com/total-typescript/ts-reset#readme)
339
- - [Faker](https://fakerjs.dev/)
340
- - [Dayjs](https://day.js.org/en/)
1
+ # Vite React Boilerplate
2
+
3
+ ![](/public/vite-react-boilerplate.png)
4
+
5
+ Everything you need to kick off your next Vite + React web app!
6
+
7
+ ## Table of Contents
8
+
9
+ - [Overview](#overview)
10
+ - [Requirements](#requirements)
11
+ - [Getting Started](#getting-started)
12
+ - [Important Note](#important-note)
13
+ - [Testing](#testing)
14
+ - [Preparing for Deployment](#preparing-for-deployment)
15
+ - [DevTools](#devtools)
16
+ - [Installed Packages](#installed-packages)
17
+
18
+ ## Overview
19
+
20
+ Built with type safety, scalability, and developer experience in mind. A batteries included Vite + React template.
21
+
22
+ - [pnpm](https://pnpm.io) - A strict and efficient alternative to npm with up to 3x faster performance
23
+ - [TypeScript](https://www.typescriptlang.org) - A typed superset of JavaScript designed with large scale applications in mind
24
+ - [ESLint](https://eslint.org) - Static code analysis to help find problems within a codebase
25
+ - [Prettier](https://prettier.io) - An opinionated code formatter
26
+ - [Vite](https://vitejs.dev) - Feature rich and highly optimized frontend tooling with TypeScript support out of the box
27
+ - [React](https://react.dev) - A modern front-end JavaScript library for building user interfaces based on components
28
+ - [Tailwind CSS](https://tailwindcss.com) - A utility-first CSS framework packed with classes to build any web design imaginable
29
+ - [Storybook](https://storybook.js.org) - A frontend workshop for building UI components and pages in isolation
30
+ - [TanStack Router](https://tanstack.com/router/v1) - Fully typesafe, modern and scalable routing for React applications
31
+ - [TanStack Query](https://tanstack.com/query/latest) - Declarative, always-up-to-date auto-managed queries and mutations
32
+ - [TanStack Table](https://tanstack.com/table/v8) - Headless UI for building powerful tables & datagrids
33
+ - [Zustand](https://zustand-demo.pmnd.rs) - An unopinionated, small, fast and scalable bearbones state-management solution
34
+ - [React Hook Form](https://react-hook-form.com) - Performant, flexible and extensible forms with easy-to-use validation
35
+ - [Zod](https://zod.dev) - TypeScript-first schema validation with static type inference
36
+ - [React Testing Library](https://testing-library.com) - A very light-weight, best practice first, solution for testing React components
37
+ - [Vitest](https://vitest.dev) - A blazing fast unit test framework powered by Vite
38
+ - [Playwright](https://playwright.dev) - Enables reliable end-to-end testing for modern web apps
39
+ - [Nivo](https://nivo.rocks) - A rich set of data visualization components, built on top of D3 and React
40
+ - [react-i18next](https://react.i18next.com/) - A powerful internationalization framework for React/React Native based on i18next
41
+ - [Faker](https://fakerjs.dev/) - Generate massive amounts of fake (but realistic) data for testing and development
42
+ - [Dayjs](https://day.js.org/en/) - A minimalist JavaScript library that parses, validates, manipulates, and displays dates and times for modern browsers
43
+ - [Husky](https://github.com/typicode/husky#readme) + [Commitizen](https://github.com/commitizen/cz-cli#readme) + [Commitlint](https://github.com/conventional-changelog/commitlint#readme) - Git hooks and commit linting to ensure use of descriptive and practical commit messages
44
+ - [ts-reset](https://github.com/total-typescript/ts-reset#readme) - Improvements for TypeScripts built-in typings for use in applications
45
+ - [Docker](https://www.docker.com) - Containerization tool for deploying your vite-react-boilerplate app
46
+
47
+ A more detailed list of the included packages can be found in the [Installed Packages](#installed-packages) section. Packages not shown above include Devtools, ui helper libraries, and eslint plugins/configs.
48
+
49
+ ## Requirements
50
+
51
+ - [NodeJS 18+](https://nodejs.org/en)
52
+ - [pnpm](https://pnpm.io) (or equivalent)
53
+
54
+ If you'd like to use the included Dockerfile then [Docker](https://www.docker.com) is required as well:
55
+
56
+ ## Getting Started
57
+
58
+ Getting started is a simple as cloning the repository
59
+
60
+ ```
61
+ git clone git@github.com:RicardoValdovinos/vite-react-boilerplate.git
62
+ ```
63
+
64
+ Changing into the new directory
65
+
66
+ ```
67
+ cd vite-react-boilerplate
68
+ ```
69
+
70
+ Removing the .git folder (and any additional files, folders or dependencies you may not need)
71
+
72
+ ```
73
+ rm -rf .git
74
+ ```
75
+
76
+ Installing dependencies
77
+
78
+ ```
79
+ pnpm install
80
+ ```
81
+
82
+ And running the setup script (initializes git repository and husky and installs playwright)
83
+
84
+ ```
85
+ pnpm run setup
86
+ ```
87
+
88
+ Congrats! You're ready to starting working on that new project!
89
+
90
+ If you'd rather run the commands above in one go, check out the command below:
91
+
92
+ ```
93
+ git clone git@github.com:RicardoValdovinos/vite-react-boilerplate.git &&\
94
+ cd vite-react-boilerplate &&\
95
+ rm -rf .git &&\
96
+ pnpm install &&\
97
+ pnpm run setup
98
+ ```
99
+
100
+ **Note**: This project comes with two git hooks added by [husky](https://typicode.github.io/husky/). A prepare-commit-msg hook to run the [Commitizen](https://github.com/commitizen/cz-cli#readme) cli for those nice commit messages and a commit-msg hook to run [Commitlint](https://commitlint.js.org/#/) on the message itself. Commitlint will ensure the commit message follows the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) (it will if you used commitizen).
101
+
102
+ If you wish to remove any hooks, simply delete the corresponding file in the .husky directory.
103
+
104
+ ## Important Note
105
+
106
+ 1. This boilerplate project does not include a demo. At most, a few utilities (types, devtools, initial home page routes) are included. There is no glue to get in your way when trying to modify the template.
107
+
108
+ 2. Due to empty directories not being included in git commits, placeholder README files have been added to these empty directories. These README files contain simple descriptions about how the different directories in the accompanying folder structure may be used. As an example check out the [recommended component organizational structure](src/components/README.md) as well as the [recommended folder structure](src/features/README.md).
109
+
110
+ 3. [Faker](https://fakerjs.dev/) is included to encourage more isolated testing and allow for rapid development of demos and MVPs. However, please make note that, [due to a bug](https://github.com/faker-js/faker/issues/1791), importing Faker from the main package (without a locale) will result in the entire Faker lib being imported causing bundle sizes to increase up to 2+ MB. Instead prefer [localized imports](https://fakerjs.dev/guide/localization.html#individual-localized-packages) as shown below.
111
+
112
+ ```
113
+ // import { faker } from '@faker-js/faker';
114
+ import { faker } from '@faker-js/faker/locale/en'; // prefer localization when possible
115
+ ```
116
+
117
+ The imported lib will instead be around 600 KB. Nonetheless, Faker should **NOT** be used in production and instead be limited to testing and demos.
118
+
119
+ ## Testing
120
+
121
+ Unit testing is handled by React Testing Library and Vitest while End-to-End (E2E) Testing is conducted by Playwright.
122
+
123
+ If you'd like to run all tests, Unit and E2E alike, execute the following command:
124
+
125
+ ```
126
+ pnpm run test
127
+ ```
128
+
129
+ ### Unit Testing
130
+
131
+ When running unit test scripts, it is assumed that unit tests will be colocated with the source files. Take a look at the placeholder README file in `src/components` for [an example](src/components/README.md).
132
+
133
+ If you'd like to execute unit tests specifically, the below command will execute vitest:
134
+
135
+ ```
136
+ pnpm run test:unit
137
+ ```
138
+
139
+ If instead you are interested in coverage reporting, run:
140
+
141
+ ```
142
+ pnpm run test:unit:coverage
143
+ ```
144
+
145
+ All unit tests run in watch mode by default. If you'd like to disable watch mode, change the package.json test scripts with the following
146
+
147
+ before:
148
+
149
+ ```
150
+ "scripts": {
151
+ "test:unit": "vitest src/",
152
+ "test:unit:coverage": "vitest --coverage src/"
153
+ }
154
+ ```
155
+
156
+ After:
157
+
158
+ ```
159
+ "scripts": {
160
+ "test:unit": "vitest run src/",
161
+ "test:unit:coverage": "vitest run --coverage src/"
162
+ }
163
+ ```
164
+
165
+ **Note**: Faker is included to provide mock data. See the [Important Note](#important-note) section for crucial details regarding this package. Specifically, point 3.
166
+
167
+ ### End-to-End (E2E) Testing
168
+
169
+ Running E2E tests use a similar syntax to running unit tests:
170
+
171
+ ```
172
+ pnpm run test:e2e
173
+ ```
174
+
175
+ If you wish to see the reports, run:
176
+
177
+ ```
178
+ pnpm run test:e2e:report
179
+ ```
180
+
181
+ ## Preparing for Deployment
182
+
183
+ Instructions are provided for deploying both with and without Docker. Both options still require a platform to host the application.
184
+
185
+ ### Without Docker
186
+
187
+ Deploying is as easy as running
188
+
189
+ ```
190
+ pnpm run build
191
+ ```
192
+
193
+ and pointing your web server to the generated `index.html` file found at `dist/index.html`
194
+
195
+ ### With Docker
196
+
197
+ A Dockerfile with an [NGINX](https://www.nginx.com) base image is also provided for quick and easy deployments. Simply execute the following commands:
198
+
199
+ 1. `pnpm run build`
200
+ 2. `docker build . -t <container_name>`
201
+ - Example: `docker build . -t todo-app`
202
+ 3. `docker run -p <port_number>:80 <container_name>`
203
+ - Example: `docker run -p 8080:80 todo-app`
204
+
205
+ ### Continuous Integration
206
+
207
+ Due to the vast array of tools, opinions, requirements and preferences a CI template is not included in this project.
208
+
209
+ ## Devtools
210
+
211
+ This project includes a set of Devtools. Some are additional package dependencies whereas others come built-in to the packages themselves.
212
+
213
+ ### Devtool dependencies:
214
+
215
+ - [@tanstack/react-query-devtools](https://tanstack.com/query/v4/docs/react/devtools) - Dedicated dev tools to help visualize the inner workings of React Query
216
+ - [@tanstack/router-devtools](https://tanstack.com/router/v1/docs/devtools) - Dedicated dev tools to help visualize the inner workings of TanStack Router
217
+ - [@tanstack/react-table-devtools](https://www.npmjs.com/package/@tanstack/react-table-devtools) - Dedicated dev tools to help visualize the inner workings of TanStack Table
218
+ - [@hookform/DevTools](https://react-hook-form.com/dev-tools) - React Hook Form Devtools to help debug forms with validation
219
+
220
+ A set of utility components are provided in `src/components/utils/development-tools/`. These [wrapper components](https://tanstack.com/router/v1/docs/devtools#only-importing-and-using-devtools-in-developmentgit) check whether the application is running in development or production mode and render the component or null respectively. In other words, you can confidently use them during development without having to worry about them showing up for end users in production.
221
+
222
+ **TanStack Query Devtools** are ready to go out of the box. The development vs. production rendering mechanism is built into the devtools. If you do wish to [render the devtools in production](https://tanstack.com/query/latest/docs/react/devtools) you can freely do so by following the TanStack Query Devtools documentation. The devtools component can be found in `src/App.tsx`.
223
+
224
+ When running the application in development mode you can find the TanStack Query Devtools icon in the bottom left corner of the page sporting the [React Query Logo](https://img.stackshare.io/service/25599/default_c6db7125f2c663e452ba211df91b2ced3bb7f0ff.png).
225
+
226
+ **TanStack Router Devtools**, however, utilizes its respective utility component in this project. The initial setup has been taken care of but if you wish to modify or remove the component, have a look in `src/App.tsx`.
227
+
228
+ The TanStack Router Devtools icon can be found in the bottom right corner of the page denoted by the vertically stacked "TANSTACK ROUTER" logo.
229
+
230
+ The above components, along with their imports, are commented out to start.
231
+
232
+ **TanStack Table Devtools** Documentation is, at the time of writing this, non-existent. Having said that, usage is similar to the other TanStack devtools. A utility component restricting the devtools to development builds has been provided. The difference in comparison to the other TanStack devtools is the lack of floating mode. Instead, the Devtools are rendered as a component within the actual TanStack Table you define. An additional caveat being that the DevTools component (built-in and provided utility alike) require a table prop from the `useReactTable()` hook. In other words, if you have multiple tables, each table must have its own Devtools component. Check the simplified code below.
233
+
234
+ ```
235
+ function Table(): FunctionComponent {
236
+ /* some code */
237
+
238
+ const table = useReactTable({
239
+ data,
240
+ columns,
241
+ getCoreRowModel: getCoreRowModel(),
242
+ });
243
+
244
+ return (
245
+ <>
246
+ {/* table code */}
247
+ <TanStackTableDevelopmentTools table={table} />
248
+ </>
249
+ )
250
+ }
251
+ ```
252
+
253
+ **React Hook Form DevTools** icon can be recognized in the top right corner of the page by the pink React Hook Form clipboard logo. A utility component has also provided. Like the TanStack Table Devtools component above, a prop must be passed from a specific hook. In this case, it is the control prop from the `useForm()` hook. Similar to TanStack Table, use of React Hook Form DevTools requires the component be added to each unique form. More information can be found in the [React Hook Form DevTools documentation](https://react-hook-form.com/dev-tools).
254
+
255
+ To reiterate, if you wish to restrict the Devtools to development builds use the provided components found at `src/components/utils/development-tools` instead of the built-in components from their respective modules.
256
+
257
+ ### Built-in Devtools:
258
+
259
+ - Zustand
260
+
261
+ **Zustand** provides a built-in [devtools middleware](https://github.com/pmndrs/zustand#redux-devtools) for use with [Redux DevTools](https://github.com/reduxjs/redux-devtools#redux-devtools).
262
+
263
+ ## Installed Packages
264
+
265
+ A simplified list can be found in the [Overview](#overview) section.
266
+
267
+ ### Base
268
+
269
+ - [TypeScript](https://www.typescriptlang.org)
270
+ - [Vite](https://vitejs.dev)
271
+ - [React](https://react.dev)
272
+
273
+ ### Routing
274
+
275
+ - [TanStack Router](https://tanstack.com/router/v1)
276
+
277
+ ### Linting & Formatting
278
+
279
+ - [ESLint](https://eslint.org)
280
+ - [typescript-eslint](https://typescript-eslint.io)
281
+ - [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier#readme)
282
+ - [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#readme)
283
+ - [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
284
+ - [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh)
285
+ - [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn#readme)
286
+ - [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook#readme)
287
+ - [Prettier](https://prettier.io)
288
+
289
+ ### State Management
290
+
291
+ - [TanStack Query (React Query)](https://tanstack.com/query/latest)
292
+ - [Zustand](https://zustand-demo.pmnd.rs)
293
+
294
+ ### UI
295
+
296
+ - [Tailwind CSS](https://tailwindcss.com)
297
+ - [HeadlessUI](https://headlessui.com)
298
+ - [heroicons](https://heroicons.com)
299
+ - [TanStack Table](https://tanstack.com/table/v8)
300
+ - [Storybook](https://storybook.js.org)
301
+
302
+ ### Forms
303
+
304
+ - [React Hook Form](https://react-hook-form.com)
305
+ - [Zod](https://zod.dev)
306
+
307
+ ### Data Visualization
308
+
309
+ - [Nivo](https://nivo.rocks)
310
+ - [Line](https://nivo.rocks/line/)
311
+ - [Bar](https://nivo.rocks/bar/)
312
+ - [Pie](https://nivo.rocks/pie/)
313
+
314
+ ### Testing
315
+
316
+ - [Vitest](https://vitest.dev)
317
+ - [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)
318
+ - [Playwright](https://playwright.dev)
319
+
320
+ ### Development Tools
321
+
322
+ - [TanStack Query Devtools](https://tanstack.com/query/latest/docs/react/devtools?from=reactQueryV3&original=https%3A%2F%2Ftanstack.com%2Fquery%2Fv3%2Fdocs%2Fdevtools)
323
+ - [TanStack Router Devtools](https://tanstack.com/router/v1/docs/devtools)
324
+ - [TanStack Table Devtools](https://www.npmjs.com/package/@tanstack/react-table-devtools)
325
+ - [React Hook Form Devtools](https://react-hook-form.com/dev-tools)
326
+
327
+ ### Git
328
+
329
+ - [Husky](https://github.com/typicode/husky#readme)
330
+ - [Commitizen](https://github.com/commitizen/cz-cli#readme)
331
+ - [Commitlint](https://github.com/conventional-changelog/commitlint#readme)
332
+
333
+ ### Other
334
+
335
+ - [i18next-browser-languageDetector](https://github.com/i18next/i18next-browser-languageDetector)
336
+ - [i18next](https://www.i18next.com/)
337
+ - [react-i18next](https://react.i18next.com/)
338
+ - [ts-reset](https://github.com/total-typescript/ts-reset#readme)
339
+ - [Faker](https://fakerjs.dev/)
340
+ - [Dayjs](https://day.js.org/en/)