How shreyanshu005/classence-frontened works
Project Type & Purpose
• Classence is an online classroom management platform – much like Google Classroom – that supports both teacher and student functionalities.
• It handles authentication (login, OTP-based verification), dashboards tailored for teachers and students, resource and class management, calendar integration, and even real-time communication features via WebRTC.
• The tech stack comprises React.js, Redux Toolkit, Tailwind CSS, Node.js, MongoDB, Axios for API calls, and additional integrations (WebRTC and toast notifications).
Analyzing the File Structure
• The top-level directories (src, public) indicate a React-based single-page application.
• Within src, separate areas exist for:
• Auth-related components and styles (src/auth): Contains login, signup, password reset, OTP verification, policy, and terms pages.
• Platform-specific features (src/platform): This houses the dashboards (teacher/student), assignment management (multiple directories for assignments, submissions, etc.), attendance, calendar, announcements, live lecture (WebRTC integration), reminders, scheduling, settings, and sidebar components.
• Redux integration (src/redux): Contains the central store for state management.
• These directories point to a modular front-end design, where each functional domain (e.g., assignments, attendance, live lectures) is kept in its own component group.
Key Components
• Frontend (React SPA):
• Authentication Module: All components for login, signup, OTP, etc.
• Dashboard Module: Separate interfaces and components for teacher dashboards (teacher assignment insights, attendance graphs, performance indicators) and student dashboards.
• Class Management & Resources: Modules for creating/joining classes, class listings, announcements, and resource viewing.
• Assignment & Attendance Modules: Components for managing assignments (creation, submission, review) and attendance (charts, tables, streaks).
• Calendar, Reminder, and Schedule: Pages to organize deadlines and class schedules.
• Live Lecture Integration: Including components for video calling utilizing WebRTC.
• UI/UX Elements: Navigation (sidebar, header), modals, and toast notifications.
• Redux Store: Centralized state management using Redux Toolkit.
• Backend (Node.js & MongoDB):
• While not detailed in the file tree, the README tells us that a Node.js backend coupled with MongoDB is used.
• This backend likely exposes RESTful APIs that are consumed by Axios in the React application.
• External Services:
• WebRTC for real-time chat and video.
• 3rd-party services for notifications (toast notifications).
Relationships & Data Flow
• From authentication components to the Node.js auth API endpoints.
• From dashboard/assignment components to various API endpoints handling class, assignment, and attendance data.
• Data flow using Axios, indicating API calls and responses.
• Redux as an interactive layer between the UI components and data from the backend, managing state transitions.
Architectural Patterns & Design Principles
• Modular UI Structure: Each feature (auth, assignments, calendar, etc.) is encapsulated in its own folder with dedicated components, styles, and assets.
• Component-Based Architecture: Reflects common React patterns where reusable components exist for modals, forms, dashboards, etc.
• Separation of Concerns: Clearly distinguishes between the authentication logic (src/auth) and the platform features (src/platform).
• Integration Layer: Communication between the frontend and backend is handled via API calls (using Axios), centralized via Redux actions and slices.
• Real-Time Communication: Use of WebRTC components indicates a service-oriented approach for real-time interactions.