This document outlines the folder structure and usage conventions for our React TypeScript project.
The project is divided into the following main folders inside the src
folder:
modules
common
blocks
Each folder has a specific purpose and contains subfolders and files organised by functionality and type.
src
modules
, common
, blocks
modules
Header.tsx
: Header component for the homepage.SideBar.tsx
: Sidebar component for the homepage.HomePage.constants.ts
: Constants specific to the homepage.HomePage.hooks.ts
: Custom hooks for the homepage.HomePage.styled.ts
: Styled-components for the homepage.HomePage.tsx
: Main container for the homepage.HomePage.types.ts
: Type definitions for the homepage.HomePage.utils.ts
: Utility functions for the homepage.index.ts
: Entry point for homepage-related exports.common
SomeCommonComponent.tsx
: Example of a shared component.useTestHook.ts
: Example of a shared hook.someUtilFunction.ts
: Example of a shared component.blocks
Box.tsx
: Main component file.Box.constants.ts
: Constants used by the Box component.Box.types.ts
: Type definitions for the Box component.Box.utils.ts
: Utility functions for the Box component.Box.test.tsx
: Tests for the Box component.Box.stories.tsx
: Storybook stories for the Box component.index.ts
: Entry point for the Box component exports.