TODO: compete this section !!!
- Vite - Next Generation Frontend Tooling
- React - A JavaScript library for building user interfaces
- TypeScript - Typed JavaScript at Any Scale
- Ant Design - A design system for enterprise-level products
- LessCSS - The dynamic stylesheet language
- Phosphor Icons - Flexible icons for everyone
Before you begin, ensure you have Node.js and yarn installed on your machine. We strongly recommend you to use VSCode as your IDE. Also, make sure to install ESLint and Prettier extensions for VSCode.
-
Clone the repository:
git clone [email protected]:SchoolEvent/schoolevent-client.git
-
Change to the project directory:
cd schoolevent
-
Install dependencies:
yarn install
-
Start the development server:
yarn dev
Open your web browser and navigate to http://localhost:5173 to access the SchoolEvent web app.
TODO: Complete this section as you add environment variables.
Everything in this section is mandatory. If you don't follow these rules, your PR will be rejected.
The branch name must be in the following format:
feat-<name> # For new features
config-<name> # For configuration changes
fix-<name> # For any type of fixes
refactor-<name> # For refactoring
Commit messages follows the same format as branch names. The commit message must be in the following format:
feat: <message> # For new features
config: <message> # For configuration changes
fix: <message> # For any type of fixes
refactor: <message> # For refactoring
Any development happens in the src
directory. The assets
directory contains all the static assets. Components are placed in the components
directory. Utils that can be shared accross the app are placed in the utils
directory. Types that can be shared accross the app are placed in the types
directory. Routes are placed in the routes
directory.
src
├── assets
│ └── ...
├── components
│ └── ...
├── utils
│ └── ...
├── types
│ └── ...
├── routes
│ └── ...
├── App.css
├── App.tsx
├── index.css
├── main.tsx
└── ...
Components must follow the following folder structure:
components
├── MyComponent
│ ├── MyComponent.tsx
│ ├── MyComponent-styles.less
│ ├── MyComponent-types.ts|tsx
│ ├── MyComponent-utils.ts|tsx
│ ├── MyComponent-constants.ts|tsx
│ └── ...
└── ...
MyComponent.tsx
is the component itself.MyComponent-styles.less
contains the component styles.MyComponent-types.ts|tsx
contains the component types.MyComponent-utils.ts|tsx
contains the component utils.MyComponent-constants.ts|tsx
contains the component constants.
A component must be exported the following way:
export function MyComponent() {}
A component must be imported the following way:
import { MyComponent } from './MyComponent'
Types must be prefixed with T
and must be exported the following way:
export type TMyType = {}
Interfaces must be prefixed with I
and must be exported the following way:
export interface IMyInterface {}
There is only one util function per file (this doesn't applies to components utils files). Utils files from the utils
directory must follow this naming convention:
<nameOfTheUtilFunction>.ts|tsx
If there are more than 2 parameters, they must be converted as an object:
// Bad ❌
export function myUtilFunction(param1: string, param2: string, param3: string) {}
// Good ✅
interface IMyUtilFunctionParams {
param1: string
param2: string
param3: string
}
export function myUtilFunction(params: IMyUtilFunctionParams) {
const { param1, param2, param3 } = params
}
// Good ✅
export function myUtilFunction(param: string) {}
We uses Phosphor Icons. You can find all the icons here.
You can import icons the following way:
import { MyIcon } from '@phosphor-icons/react'