How nuelfell0ff/benedex-frontend works
Purpose and Runtime
This is a Vite-built React single-page learning-management frontend. It serves public marketing/authentication, role-specific student/instructor/admin portals, payment return handling, and public certificate verification. The README contains no usable project documentation. Browser entry and app composition begin at src/main.jsx, src/App.jsx, and index.html.
Application Shell, Routing, and Access Control
src/App.jsx is the likely route orchestration boundary, mapping public and portal pages into layouts. src/routes/ProtectedRoute.jsx gates authenticated/authorized navigation. Authentication state is centralized through src/context/AuthContext.jsx; pages and layouts should consume this context rather than establish independent session state.
Role-Specific Portal Layouts
Three layout boundaries organize navigation and shared chrome by user role: src/layouts/StudentLayout.jsx, src/layouts/InstructorLayout.jsx, and src/layouts/AdminLayout.jsx. Shared navigational/UI components reside in src/components/layout/Sidebar.jsx, src/components/layout/Topbar.jsx, and src/components/layout/AiSupportWidget.jsx. This separates common portal framing from feature pages.
Student Learning Flow
Students discover enrolled courses, enter course detail/viewer experiences, complete assignments and quizzes, attend live classes, and access certificates. Core screens are src/pages/student/StudentDashboard.jsx, src/pages/student/StudentCourses.jsx, and src/pages/student/StudentCourseViewer.jsx; assessment and completion surfaces include src/pages/student/Assignments.jsx, src/pages/student/StudentQuiz.jsx, and src/pages/student/CertificateView.jsx.
Instructor Authoring and Delivery Flow
Instructor features cover course/module/assignment creation, course-specific management, grading, learner oversight, communications, and live classes. The authoring flow is anchored in src/pages/instructor/CreateCourse.jsx, src/pages/instructor/CreateModule.jsx, and src/pages/instructor/CreateAssignment.jsx. Operational delivery and grading occur through src/pages/instructor/InstructorCourseDetails.jsx, src/pages/instructor/GradeSubmissions.jsx, and src/pages/instructor/InstructorLiveClasses.jsx.
Administration and Platform Operations
Admin pages provide governance over users, courses, payments, notifications, analytics, activity logs, AI tickets, and settings. Key operational control points are src/pages/admin/AdminDashboard.jsx, src/pages/admin/AdminUsers.jsx, and src/pages/admin/AdminCourses.jsx, with financial and support workflows in src/pages/admin/AdminPayments.jsx and src/pages/admin/AdminAiTickets.jsx.
External Integration Boundaries
Network communication is centralized at src/services/api.js, the principal frontend-to-backend API boundary. Payment provider redirect/callback completion is isolated in src/pages/payments/PaymentCallback.jsx, with implementation notes in PAYMENT_INTEGRATION_NOTES.md. The app is PWA-capable through public/manifest.json and public/sw.js; browser push-registration logic is in src/utils/registerPush.js. Deployment configuration indicates Vercel hosting via vercel.json.
Main entry points: ProtectedRoute.jsx Protected Routes · api.js Backend API · main.jsx React Bootstrap · InstructorLayout.jsx Instructor Portal
Components 19
App Shell
- Browser Entry
index.html - React Bootstrap
src/main.jsx - Route Composition · Maps public, portal, callback, and verification screens.
src/App.jsx - Auth State · Central session and identity state.
src/context/AuthContext.jsx - Protected Routes · Enforces authentication and role authorization.
src/routes/ProtectedRoute.jsx
Role Portals
- Student Portal
src/layouts/StudentLayout.jsx - Instructor Portal
src/layouts/InstructorLayout.jsx - Admin Portal
src/layouts/AdminLayout.jsx - Portal Chrome · Sidebar, topbar, and AI support widget.
src/components/layout/Sidebar.jsx - Student Learning · Dashboard, courses, course viewer, assignments, quizzes, and certificates.
src/pages/student/StudentCourseViewer.jsx - Course Authoring · Creates courses, modules, and assignments.
src/pages/instructor/CreateCourse.jsx - Delivery & Grading · Manages courses, submissions, and live classes.
src/pages/instructor/InstructorCourseDetails.jsx - Platform Operations · Governance for users, courses, payments, and AI tickets.
src/pages/admin/AdminDashboard.jsx
Browser Integrations
- Payment Return · Completes payment-provider redirect handling.
src/pages/payments/PaymentCallback.jsx - Backend API · Central frontend network boundary.
src/services/api.js - PWA Manifest
public/manifest.json - Service Worker
public/sw.js - Push Registration
src/utils/registerPush.js - Vercel Deployment
vercel.json
Connections 25
- Browser Entry → React Bootstrap: loads
- React Bootstrap → Route Composition: mounts
- React Bootstrap → Auth State: provides
- Route Composition → Protected Routes: protects portal routes
- Protected Routes → Auth State: checks identity and role
- Protected Routes → Student Portal: student access
- Protected Routes → Instructor Portal: instructor access
- Protected Routes → Admin Portal: admin access
- Student Portal → Portal Chrome: uses
- Instructor Portal → Portal Chrome: uses
- Admin Portal → Portal Chrome: uses
- Student Portal → Student Learning: hosts
- Instructor Portal → Course Authoring: hosts
- Instructor Portal → Delivery & Grading: hosts
- Admin Portal → Platform Operations: hosts
- Route Composition → Payment Return: routes payment return
- Student Learning → Backend API: learning data
- Course Authoring → Backend API: publishes content
- Delivery & Grading → Backend API: manages delivery
- Platform Operations → Backend API: operates platform
- Payment Return → Backend API: confirms payment
- Browser Entry → PWA Manifest: declares
- PWA Manifest → Service Worker: enables PWA
- React Bootstrap → Push Registration: registers push
- Vercel Deployment → Browser Entry: deploys