How danielfrrokaj/react-lms works
This React LMS serves administrators, teachers, and students through role-protected routes. Users sign in against demo data, then manage courses and enrollment, build course sections and learning materials, submit assignments, and review grades and feedback. Pages call in-memory services backed by shared mock data; the model includes course, section, subsection, task, and grade records. The graph preserves the documented role capabilities, but some pages and service calls were not excerpted, so their internal links are omitted rather than inferred.
Main entry points: courseService.ts Course service · Dashboard.tsx Role dashboard · AuthContext.tsx Authentication state · userService.ts User service
Components 23
Application shell
- Router and app
lms/src/App.tsx - Role dashboard
lms/src/pages/Dashboard.tsx - Role navigation
lms/src/components/common/Layout.tsx
Identity and access
- Login
lms/src/pages/auth/Login.tsx - Authentication state
lms/src/contexts/AuthContext.tsx - Route guard
lms/src/utils/ProtectedRoute.tsx
Administration
- Course administration
lms/src/pages/admin/Courses.tsx - User administration
lms/src/pages/admin/Users.tsx - Admin overview
lms/src/pages/admin/Dashboard.tsx
Teaching and learning
- Teacher courses
lms/src/pages/teacher/Courses.tsx - Course authoring
lms/src/pages/teacher/CourseDetail.tsx - Grade submissions
lms/src/pages/teacher/Assignments.tsx - Teacher overview
lms/src/pages/teacher/Dashboard.tsx - Student courses
lms/src/pages/student/Courses.tsx - Course materials
lms/src/pages/student/CourseDetail.tsx - Assignment work
lms/src/pages/student/Assignments.tsx - Student overview
lms/src/pages/student/Dashboard.tsx - Rich text editor
lms/src/components/common/RichTextEditor.tsx
Domain data
- Course service
lms/src/services/courseService.ts - User service
lms/src/services/userService.ts - Grade service
lms/src/services/gradeService.ts - Demo data
lms/src/services/mockData.ts
Other components
- User
Connections 30
- User → Router and app: opens
README.md - Router and app → Login: routes to
lms/src/App.tsx - Router and app → Route guard: guards routes
lms/src/App.tsx - Router and app → Role dashboard: routes to
lms/src/App.tsx - Login → Authentication state: signs in
lms/src/pages/auth/Login.tsx - Route guard → Authentication state: checks access
lms/src/utils/ProtectedRoute.tsx - Role dashboard → Authentication state: reads role
lms/src/pages/Dashboard.tsx - Role dashboard → Admin overview: dispatches
lms/src/pages/Dashboard.tsx - Role dashboard → Teacher overview: dispatches
lms/src/pages/Dashboard.tsx - Role dashboard → Student overview: dispatches
lms/src/pages/Dashboard.tsx - Role navigation → Authentication state: reads session
lms/src/components/common/Layout.tsx - Course administration → Course service: manages courses
lms/src/pages/admin/Courses.tsx - Course administration → User service: assigns teachers
lms/src/pages/admin/Courses.tsx - User administration → User service: manages users
lms/src/pages/admin/Users.tsx - Admin overview → Course service: reads course data
lms/src/pages/admin/Dashboard.tsx - Admin overview → User service: reads user data
lms/src/pages/admin/Dashboard.tsx - Teacher courses → Course service: reads courses
lms/src/pages/teacher/Courses.tsx - Teacher courses → User service: reads users
lms/src/pages/teacher/Courses.tsx - Course authoring → Rich text editor: edits content
lms/src/pages/teacher/CourseDetail.tsx - Course authoring → Course service: manages sections
lms/src/pages/teacher/CourseDetail.tsx - Grade submissions → Grade service: grades work
lms/src/pages/teacher/Assignments.tsx - Student courses → Course service: reads courses
lms/src/pages/student/Courses.tsx - Course materials → Course service: loads course
lms/src/pages/student/CourseDetail.tsx - Assignment work → Grade service: tracks attempts
lms/src/pages/student/Assignments.tsx - Student overview → Course service: reads courses
lms/src/pages/student/Dashboard.tsx - Student overview → Grade service: reads grades
lms/src/pages/student/Dashboard.tsx - Authentication state → Demo data: loads demo users
lms/src/contexts/AuthContext.tsx - Course service → Demo data: reads and updates
lms/src/services/courseService.ts - User service → Demo data: reads and updates
lms/src/services/userService.ts - Grade service → Demo data: reads and updates
lms/src/services/gradeService.ts