Repository navigation
LMS Frontend
Aneesh Rao edited this page Dec 11, 2024
·
1 revision
This document provides a detailed guide to the frontend structure, organization, and key functionalities of the project.
The frontend project is built using React and is designed to provide a seamless user experience for both students and administrators. The key technologies used include:
- React Router DOM for routing.
- Redux for state management.
- Tailwind CSS and ShadCN UI for UI design.
- Embedded AI features for enhanced functionalities.
- Transcript functionality integrated across the application.
- Courses page where students watch videos with embedded assessment popups.
-
Path:
src/routes/index.ts -
Purpose: Manages routing for the application using
createBrowserRouterfromreact-router-dom. -
Description: All routes are defined in the
index.tsfile located in theroutesfolder. The routing is structured to separate student and admin pages.
-
Path:
src/components - Purpose: Contains reusable UI and functional components.
-
Key Subfolders:
- Proctoring Components: Contains components for AI features related to proctoring and real-time monitoring.
- Courses Component: A page where students watch videos and participate in assessments via popups.
-
Path:
src/pages -
Purpose: Contains the main pages for the application, organized into two subfolders:
- Student: Pages for the student interface.
- Admin: Pages for the admin interface.
src/pages
├── student
│ ├── Dashboard.tsx
│ ├── Exam.tsx
│ ├── Courses.tsx <-- New Page
│ └── Results.tsx
└── admin
└── AdminDashboard.tsx
-
Path:
src/store - Purpose: Handles global state management using Redux.
-
Slices Folder: Contains Redux slices for handling each functionality, especially for API calls and state updates.
-
Example:
src/store/slices/studentSlice.ts,src/store/slices/adminSlice.ts.
-
Example:
-
Tools:
- Tailwind CSS: Used for utility-first styling.
- ShadCN UI: Provides prebuilt components for design consistency and easy styling.
-
Structure:
- Global styles are managed in
src/styles/tailwind.css(if applicable). - Custom ShadCN components are styled within their respective files.
- Global styles are managed in
-
Path:
src/components/proctoring - Purpose: Embedded AI functionalities for real-time monitoring, proctoring, and behavior analysis.
- Description: These components are used in various parts of the application, particularly for exams and assessments.
- Purpose: Enables the generation and display of student transcripts.
- Implementation: The transcript feature is integrated across relevant student pages, interacting with the Redux store for data management.
-
Path:
src/pages/student/Courses.tsx - Purpose: Allows students to watch course videos and take assessments.
-
Features:
- Video Playback: Students can watch the video content.
- Assessment Popups: Interactive assessment popups appear during the video for student participation.
- State Management: Utilizes Redux for fetching video data, tracking assessment progress, and storing results.
- Define the new route in
src/routes/index.tsusing thecreateBrowserRoutermethod. - Ensure the route points to the correct component in the
pagesfolder.
- Add the new page component in the appropriate folder under
src/pages(studentoradmin). - If necessary, connect the page to Redux slices for data fetching and state management.
- Add new AI components under the Proctoring Components folder.
- Ensure proper integration with existing AI features and Redux state if needed.
- Use Tailwind CSS classes for custom designs and layout.
- Leverage ShadCN UI components to ensure consistency and UI component reuse.
- Use Redux for managing API calls and application state.
- Create slices in
src/store/slicesfor handling data fetching, updates, and any necessary logic.
- Ensure proper error handling for all API calls and Redux states.
- Implement fallback UI where necessary.
- Routing: Ensure that new routes do not conflict with existing ones.
- Reusability: Reuse existing components and functions wherever possible to keep the codebase DRY.
- Tailwind Utilities: Stick to Tailwind's utility-first classes and avoid inline styles.
- Testing: Thoroughly test all new components and features before deployment to ensure compatibility and smooth functioning.
Dhananjaya Lab for Education Design IIT Ropar