Learning Management System
Overview
BriteClasses is a comprehensive web application designed to facilitate class registration for students and class creation for instructors. It integrates seamlessly with a school management system via APIs, allowing for streamlined management and scalability. The platform is built using Next.js 14, React, Stripe, Mux, Prisma, Tailwind, and MySQL.
Purpose
The primary purpose of BriteClasses is to provide an efficient and user-friendly Learning Management System (LMS) that supports Continuous Professional Development (CPD) courses and modules. This ensures that users stay updated with the latest advancements in their fields.
Key Features
- Student Registration: Allows students to register for classes.
- Instructor Class Creation: Enables instructors to create and manage classes.
- API Integration: Ensures seamless communication with the school management system.
- Course Offering Management: Manages the offering of courses in different programs and semesters.
- Certificates: Issues certificates for completed courses with CPD credits.
- User Progress Tracking: Tracks the progress of users through various chapters and courses.
- Purchases and Payments: Handles course purchases and payments via Stripe.
- Attachments and Chapters: Supports the addition of attachments and chapters to courses.
- Categories: Organizes courses into different categories.
Schema
Course
A course contains information such as the title, description, image URL, price, publication status, points, category, and related entities like purchases, chapters, attachments, certificates, and course offerings.
CourseOffering
A course offering links a course to a specific program and semester, allowing for course registrations.
CourseRegistration
A course registration records a student's enrollment in a course offering, including the registration date and related entities.
Certificate
A certificate records the issuance of a certificate to a student for a specific course, including CPD credits and a PDF URL.
Points
Tracks the total CPD credits earned by a user.
Category
Represents a category for organizing courses.
Attachment
Stores attachments related to a course.
Chapter
A chapter is a part of a course and contains information such as the title, description, video URL, position, publication status, and related entities like questions and user progress.
Question
Represents a question in a chapter, including answer options and the correct answer index.
AnswerOption
Stores the text of an answer option for a question.
MuxData
Stores Mux video data for a chapter.
UserProgress
Tracks the progress of a user through a chapter, including completion status.
Purchase
Records a purchase of a course by a user, including whether points have been claimed.
StripeCustomer
Stores Stripe customer information for a user.
Technical Explanation
Course Registration Flow
-
Student Pays 50% of Fees:
- The system verifies the payment and triggers an API call to fetch courses related to the student's program.
-
Course Fetching:
- The API fetches the courses from the database based on the student's program and semester.
-
Course Registration:
- The student is prompted to confirm their course registration.
- Upon confirmation, a
CourseRegistrationrecord is created in the database.
Concept Diagram
+--------------------+ +-----------------+ +-----------------+
| | | | | |
| School System | <----> | BriteClasses | <----> | APIs |
| | | | | |
+--------------------+ +-----------------+ +-----------------+
^ ^ ^
| | |
| | |
+--------------------+ +--------------------+ +--------------------+
| | | | | |
| Payment Module | | Course Module | | Registration |
| | | | | Module |
+--------------------+ +--------------------+ +--------------------+
Flow Diagram
[Student Pays 50% of Fees]
|
v
[API Call to Fetch Courses]
|
v
[Courses Fetched Based on Program]
|
v
[Prompt Student to Confirm Registration]
|
v
[Student Confirms Registration]
|
v
[Create CourseRegistration Record]
|
v
[Course Registration Complete]
Tree Diagram of Course Structure
Course
|
+-- CourseOffering
| |
| +-- Program
| +-- Semester
| +-- CourseRegistration
|
+-- Chapter
| |
| +-- Question
| |
| +-- AnswerOption
| +-- UserProgress
| +-- MuxData
|
+-- Attachment
|
+-- Category
|
+-- Purchase
|
+-- Certificate
Implementation Details
BriteClasses Components
-
Course Module:
- Manages course creation, editing, and publishing.
- Handles adding chapters, attachments, and managing course offerings.
-
Payment Module:
- Integrates with Stripe to handle course payments.
- Verifies payment status and triggers course registration flow.
-
Registration Module:
- Manages student registrations for courses.
- Handles fetching and confirming course registrations via APIs.
API Integration
-
Course Fetching API:
- Fetches available courses for a student based on their program and semester.
- Ensures the courses are displayed for registration once the payment is verified.
-
Payment Verification API:
- Verifies that the student has paid 50% of their fees before allowing course registration.
"Great companies are built on great products"