Skip to content

feat: implement EduScale online learning platform MVP#1

Draft
Gabru44 with Copilot wants to merge 9 commits into
mainfrom
copilot/add-user-management-features
Draft

feat: implement EduScale online learning platform MVP#1
Gabru44 with Copilot wants to merge 9 commits into
mainfrom
copilot/add-user-management-features

Conversation

Copilot AI commented Apr 16, 2026

Copy link
Copy Markdown

Builds the EduScale full-stack online learning platform from scratch — the repo previously contained only a blank README. Covers all three phases: user auth + course CRUD + video streaming (Phase 1), assignments/grading + discussions + progress tracking (Phase 2), and PDF certificates + quiz auto-grading (Phase 3).

Backend — Node.js + Express + SQLite (/backend)

  • Auth: JWT register/login/me, bcrypt (10 rounds), rate limiting (30 req/15min on auth, 300 on all routes), admin role requires direct DB promotion
  • 15-table schema: users, courses, sections, enrollments, videos, assignments, submissions, discussions, discussion_replies, announcements, progress, certificates, quizzes, quiz_questions, quiz_attempts
  • 11 route modules:
    • courses — CRUD + sections, search/category filter, draft/published lifecycle
    • videos — multipart upload via multer, HTTP Range streaming, per-user progress tracking
    • assignments — create/submit/grade with file attachment support
    • quizzes — question bank, auto-graded attempt scoring
    • certificates — PDF generation (pdfkit) gated on 100% course completion
    • admin — user list, role management, platform stats

Frontend — React 18 + Vite (/frontend)

  • 10 pages: Home (catalog + search), Login, Register, CourseDetail (content/announcements/discussions tabs), VideoPlayer, StudentDashboard, InstructorDashboard, AdminDashboard, Certificates
  • AuthContext persists JWT in localStorage; Axios interceptor injects Authorization header globally
  • Responsive CSS with custom properties (indigo theme), progress bars, card layouts

Security

  • multer pinned to 2.1.1 (was 1.4.5-lts.2) — resolves 7 DoS CVEs (uncontrolled recursion, resource exhaustion, unclosed stream leaks, malformed request handling)
  • No hardcoded JWT secret — throws at startup if JWT_SECRET env var is absent

Screenshots

Course Catalog

Home

Instructor Dashboard

Instructor Dashboard

Course Detail

Course Detail

Student Dashboard

Student Dashboard

Original prompt

EduScale College Project — AI Coding Plan

Project Overview

EduScale: online learning platform for college project.
Target scale: 1000 students, 10 instructors, 10,000 video views/month.
Goal: MVP fully functional on local machine.

Features

  1. Udemy: Instructor marketplace, paid/free courses, video streaming, reviews
  2. edX: Structured programs, certificates
  3. Moodle: Course management, assignment submission, grading rubrics, attendance
  4. Canvas: Discussion boards, announcements, SpeedGrader-style grading, calendar
  5. YouTube: Adaptive video streaming, subtitles, playback speed, progress tracking
  6. Zoom: Live classes, virtual classrooms

Actors

  • Student: browse, enroll, watch videos, submit assignments, discussions
  • Instructor: create courses, upload videos, grade
  • Admin: manage content, analytics
  • Institution: manage users
  • Guest: browse catalog, preview courses

Functional Requirements

  • User management: register/login (email/OAuth), profiles, roles
  • Course management: CRUD courses, sections, lectures, quizzes, assignments
  • Video streaming: upload → transcode → HLS, resume playback, subtitles, playback speed
  • Assignments & grading: submission, auto-graded quizzes, instructor grading
  • Communication: discussion boards, announcements, notifications, Zoom integration
  • Progress & certificates: track completion, PDF certificates
  • Search & discovery: search by title, instructor, category

Non-Functional Requirements

  • Availability: 99%
  • API latency: <500ms
  • Video latency: <5s
  • Storage: ~50GB
  • Consistency: strong for grades/payments, eventual for notifications
  • Security: hashed passwords, JWT auth, input validation

Database (Simplified)

  • Users(id, name, email, password, role)
  • Courses(id, instructor_id, title, description, status)
  • Enrollments(id, user_id, course_id, progress)
  • Videos(id, course_id, title, file_path, duration)
  • Assignments(id, course_id, title, due_date)

API Endpoints

  • POST /register
  • POST /login
  • GET /courses
  • POST /courses (Instructor)
  • POST /videos/upload
  • GET /videos/:id
  • POST /enrollments
  • GET /assignments/:course_id
  • POST /assignments/:id/submit

Deployment (Local)

  1. Install Node.js, Python, SQLite/PostgreSQL, React
  2. Clone repository
  3. Setup DB: run schema.sql
  4. Run backend: node server.js / python app.py
  5. Run frontend: npm start
  6. Access: http://localhost:3000
  7. Store sample videos locally
  8. Integrate Zoom SDK/API for live classes

Incremental Build Plan

Phase 1 (MVP): user login, course CRUD, video upload/streaming, enrollment
Phase 2: assignments submission/grading, discussion boards, announcements, progress tracking
Phase 3: certificates (PDF), basic search, Zoom live classes integration

Copilot AI and others added 8 commits April 16, 2026 13:41
- Backend: Node.js + Express + SQLite (better-sqlite3)
  - JWT auth with bcryptjs (register, login, /me)
  - Courses CRUD with search/category filter
  - Video upload and Range-request streaming
  - Enrollment management with progress tracking
  - Assignments with file submission and grading
  - Discussion threads with replies
  - Announcements per course
  - Quizzes with auto-grading
  - PDF certificate generation (pdfkit + uuid)
  - Admin dashboard (user management, stats)
  - Multer for file uploads (videos + files)

- Frontend: React 18 + Vite + React Router v6
  - AuthContext with localStorage JWT persistence
  - Axios instance with auth interceptor
  - Home: course catalog with search/filter
  - Login & Register (with role selection)
  - CourseDetail: sections, videos, discussions, announcements tabs
  - VideoPlayer: HTML5 video, Range streaming, progress tracking, speed control
  - StudentDashboard: enrollments + progress bars + upcoming assignments
  - InstructorDashboard: course/section/video/assignment/quiz management
  - AdminDashboard: user table with role changes + stats
  - Certificates: list and download PDF certificates
  - Responsive CSS with CSS variables (indigo theme)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Gabru44 <150784667+Gabru44@users.noreply.github.com>
- Auth endpoints (login/register): 30 req/15min
- All other API endpoints: 300 req/15min
- Uses express-rate-limit with standardHeaders

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Gabru44 <150784667+Gabru44@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Gabru44 <150784667+Gabru44@users.noreply.github.com>
- Remove hardcoded JWT_SECRET fallback; require env var in both auth.js and middleware/auth.js
- Fix potential ReDoS in email validation; replace regex with safe indexOf-based check
- Add named constants MAX_VIDEO_SIZE_BYTES and MAX_ASSIGNMENT_FILE_SIZE_BYTES
- Add error logging in VideoPlayer saveProgress catch block
- Add error logging in InstructorDashboard fetchCourses catch block

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Gabru44 <150784667+Gabru44@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Gabru44 <150784667+Gabru44@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Gabru44/Edus/sessions/3cc0ab1b-7a12-4358-8e13-9bc049280552

Co-authored-by: Gabru44 <150784667+Gabru44@users.noreply.github.com>
Copilot AI changed the title [WIP] Add user management features for EduScale project feat: implement EduScale online learning platform MVP Apr 16, 2026
Copilot AI requested a review from Gabru44 April 16, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants