Content Management

+-----------------------+       +-----------------------+
| User Authenticates    |       | User Authenticates    |
+-----------------------+       +-----------------------+
          |                             |
          v                             v
+-----------------------+       +-----------------------+
| Verify Role           |       | Verify Role           |
| (Instructor/Admin)    |       | (Instructor/Admin)    |
+-----------------------+       +-----------------------+
          |                             |
          v                             v
+-----------------------+       +-----------------------+
| Manage Courses        |       | Manage Chapters       |
+-----------------------+       +-----------------------+
          |                             |
          +-------------+---------------+
                        |
                        v
          +-----------------------+
          | Course Creation       |
          | - Enter Course Details|
          | - Store in DB         |
          +-----------------------+
                        |
                        +-------------+
                        |             |
                        v             v
          +-----------------------+   +-----------------------+
          | Course Updating       |   | Course Deletion       |
          | - Enter Updates       |   | - Select Course       |
          | - Update in DB        |   | - Delete from DB      |
          +-----------------------+   +-----------------------+
                        |
                        v
          +-----------------------+
          | Course Publishing     |
          | - Verify Details      |
          | - Publish Course      |
          | - Update Status in DB |
          +-----------------------+
                        |
                        v
          +-----------------------+
          | Chapter Management    |
          | - Add/Update/Delete   |
          | - Reorder Chapters    |
          | - Update in DB        |
          +-----------------------+
                        |
                        v
          +-----------------------+
          | Handle Payments       |
          | - Track Payments      |
          | - Update Status in DB |
          +-----------------------+
                        |
                        v
          +-----------------------+
          | Manage Points         |
          | - Add/Update Points   |
          | - Track in DB         |
          +-----------------------+

1. Course Creation

  • Process Overview: Instructors or admins can create new courses.
  • Authentication: Only authenticated users with instructor or admin roles can create courses.
  • Data Storage: New course data is stored in the database.
+-----------------------+
| User Authenticates    |
+-----------------------+
          |
          v
+-----------------------+
| Verify Role (Instructor/Admin) |
+-----------------------+
          |
          v
+-----------------------+
| Enter Course Details  |
+-----------------------+
          |
          v
+-----------------------+
| Store Course in DB    |
+-----------------------+

2. Course Deletion

  • Process Overview: Admins can delete existing courses and associated resources.
  • Authentication: Only authenticated users with admin roles can delete courses.
  • Data Deletion: Courses and associated chapters, including media assets, are deleted from the database and third-party services like Mux.
+-----------------------+
| User Authenticates    |
+-----------------------+
          |
          v
+-----------------------+
| Verify Role (Admin)   |
+-----------------------+
          |
          v
+-----------------------+
| Select Course to Delete|
+-----------------------+
          |
          v
+-----------------------+
| Delete Chapters and Assets (Mux)|
+-----------------------+
          |
          v
+-----------------------+
| Delete Course from DB |
+-----------------------+

3. Course Updating

  • Process Overview: Instructors or admins can update course details.
  • Authentication: Only authenticated users with instructor or admin roles can update courses.
  • Data Update: Updates are made to the course details in the database.
+-----------------------+
| User Authenticates    |
+-----------------------+
          |
          v
+-----------------------+
| Verify Role (Instructor/Admin) |
+-----------------------+
          |
          v
+-----------------------+
| Enter Course Updates  |
+-----------------------+
          |
          v
+-----------------------+
| Update Course in DB   |
+-----------------------+

4. Course Publishing

  • Process Overview: Instructors or admins can publish courses once all required fields are completed.
  • Authentication: Only authenticated users with instructor or admin roles can publish courses.
  • Data Update: The course status is updated to published in the database.
+-----------------------+
| User Authenticates    |
+-----------------------+
          |
          v
+-----------------------+
| Verify Role (Instructor/Admin) |
+-----------------------+
          |
          v
+-----------------------+
| Verify Course Details  |
+-----------------------+
          |
          v
+-----------------------+
| Publish Course        |
+-----------------------+
          |
          v
+-----------------------+
| Update Course Status in DB |
+-----------------------+

5. Chapter Management

  • Process Overview: Instructors can add, update, delete, and reorder chapters within a course.
  • Authentication: Only authenticated users with instructor or admin roles can manage chapters.
  • Data Storage: Chapters and their metadata are managed within the database.
+-----------------------+
| User Authenticates    |
+-----------------------+
          |
          v
+-----------------------+
| Verify Role (Instructor/Admin) |
+-----------------------+
          |
          v
+-----------------------+
| Select Course         |
+-----------------------+
          |
          v
+-----------------------+
| Manage Chapters       |
+-----------------------+
          |
          +-------------------------+
          |                         |
          v                         v
+-------------------+      +--------------------+
| Add/Update/Delete |      | Reorder Chapters   |
| Chapters          |      | Update Position in DB |
+-------------------+      +--------------------+
          |
          v
+-----------------------+
| Update Chapters in DB |
+-----------------------+

6. Handling Payments and Points

  • Process Overview: Admins can manage payments, enrollments, and points.
  • Authentication: Only authenticated users can perform these actions.
  • Data Management: Payment statuses, course enrollments, and points are tracked in the database.
+-----------------------+
| User Authenticates    |
+-----------------------+
          |
          v
+-----------------------+
| Verify Role           |
+-----------------------+
          |
          v
+-----------------------+
| Manage Payments       |
+-----------------------+
          |
          +---------------------+
          |                     |
          v                     v
+---------------------+    +--------------------+
| Track Payments      |    | Update Points      |
| Update Status in DB |    | Add/Update in DB   |
+---------------------+    +--------------------+