This is a React /Typescript application created with Vite + Tailwind + Vitest for testing.
Before you begin, ensure you have met the following requirements:
- You have installed Node.js and npm - prefer nvm 18.18.0
To install, follow these steps:
- Clone the repository:
git clone https://github.com/nkoik/table.git
- Install the project dependencies:
npm ci
- Start the development server:
npm run dev
Open your web browser and visit http://localhost:8080
- Build the app for local env
npm run local_build
- Build the app with type check
npm run build
We follow specific patterns and naming conventions in this project to ensure consistency and readability.
We use the Presentational-Container pattern along with React hooks. This means that we separate our components into two categories:
-
Presentational Components: These are components that are primarily concerned with how things look. They usually have some DOM markup and styles and they receive data and callbacks exclusively via props.
-
Container Components: These are components that are more concerned with how things work. They provide the data and behavior to presentational or other container components.
We use Tailwind CSS for styling our components. Avoid using global classes; instead, use utility classes to style your components.
-
View/Layout Components: These should be suffixed with
Page
. For example,TablePage
,InnerPage
. -
Stateful/Heavy Calculation Components: Any component that communicates with the state management module (if one exists) or performs heavy calculations should be suffixed with
Container
. For example,CustomerContainer
. -
Styling Components: Any component that serves only as a style template should be suffixed with
Wrapper
. For example,StepWrapper
. -
Skeleton Components: These should be named like
ComponentNameSkeleton
. For example,TableSkeleton
,CustomerSkeleton
.