This Project is the frontend of the Fusion - IIITDMJ's ERP Portal. We've migrated the frontend of fusion from Django templates to a modern React-based architecture.
- ReactJS as the main frontend library
- Mantine UI for UI components
- Redux for state management
- Phosphor-icons for icons
Check the package.json
file for more information about all the libraries being used.
This project is using Eslint and Prettier for linting and formatting the code.
- Fork the repository
- Clone your forked repository
- Change directory to the project folder(
cd path/to/project
) - Run
npm install
to install all the dependencies - Run
npm run dev
to start the development server. The development server will start athttp://localhost:5173/
Make sure that your backend server is running properly before starting the frontend server.
- All the required assets(images, audio, videos) for the project are in the
src/assets
folder. - The routes for all the web pages are defined in the
src/App.jsx
file. - All the API routes are stored as constants in the
src/routes/api_routes.jsx
file. - Only the global components are in the
src/components
folder. - Only the global web pages are in the
src/pages
folder. - All the web pages related to a a module are in
src/modules/<module-name>
folder. - All the components related to a module are in the
src/modules/<module-name>/components
folder. - All the styles related to a module are in the
src/modules/<module-name>/styles
folder. - All the state management related code is in the
src/redux
folder. Thesrc/redux/userSlice.jsx
file contains user-related states.
- Note: You can access the username and role of the user using the
useSelector
hook.
import { useSelector } from 'react-redux';
const ExampleComponent = () => {
const role = useSelector(state => state.user.role);
const username = useSelector(state => state.user.username);
return (
<div>
{username}
{role}
</div>
);
}
- All the folder names should be in kebab-case.
- All the file names should be in camelCase.
- All the constants should be in UPPERCASE.
- All the components should be in PascalCase.
Note: Please make sure to follow the project structure and naming conventions while adding new files or folders to the project.