Academics & Classrooms
Last updated August 2, 2026
Classgrid's Academics module manages the core educational structure: classrooms, membership, timetables, and the relationship between teachers, students, and subjects. The classroom system uses MongoDB for identity and membership and Supabase for classroom content (materials, announcements, quizzes).
Classroom System
Core Model: Classroom (MongoDB)
Each classroom represents a single class-subject pairing (e.g., "FY BSc Div A — Physics"):
Classroom Membership: ClassroomMembership (MongoDB)
Students join classrooms using the 10-digit classCode. Each membership record tracks:
Auto-linking: When a student joins their first classroom, they are automatically linked to the classroom's organization via organization_id.
Classroom Content (Supabase)
All classroom content is stored in the Supabase classroom_content table with a content_type discriminator:
Content fields: title, type, description, message, file_url, duration, classroom_id, created_at
Timetable Management
Model: Timetable (MongoDB)
Each timetable entry represents a single lecture slot:
Timetable Usage Across the Platform
The timetable data is used by multiple modules:
- AI Chat RAG Engine — Fetches today's schedule and full weekly timetable for classroom context
- Teacher Availability — Calculates real-time BUSY/AVAILABLE status by checking if current time falls within any scheduled slot
- Student Dashboard — Displays daily schedule
Teacher Planning
Model: TeacherPlan (MongoDB)
Faculty members can create lesson plans linked to their classroom and subject:
- Teaching plan content
- Topic-wise breakdown
- Scheduled dates
- Progress tracking
Organization Subjects
Model: OrgSubject (MongoDB)
Centralized subject catalog for the organization:
Used by:
- Marks system — Subject configuration for multi-subject exams
- Classroom creation — Subject selection
- Report cards — Subject-wise result display
Academic Hierarchy
Model: AcademicHierarchy (MongoDB)
Defines the organizational structure for academic programs:
Used by:
- Admissions — Mapping students to programs and divisions
- Fee structures — Applying fees to specific programs
- Reports — Aggregating data by hierarchy level
Meetings
Model: Meeting (MongoDB)
Online meeting integration for classrooms:
Used by the AI chat to show upcoming meetings in the classroom context.
How Students Join a Classroom
- Teacher creates a classroom → system generates a 10-digit
classCode - Teacher shares the code with students
- Student enters the code →
ClassroomMembershipis created withstatus: pending - Teacher approves → status changes to
approved - Student's
organization_idis auto-set to match the classroom's organization
This joining flow is referenced across every module:
- Assignments — checks
ClassroomMembershipbefore allowing submission - Attendance — checks membership before allowing mark
- Marks — checks membership before showing results
- Chat — fetches enrolled classrooms for AI context