- Add LMS Olympiad, Participant, Result doctypes with full API - Add Olympiads pages (list, detail, leaderboard, registration) - Redesign CourseCard with hover animations, badges, progress bar - Improve Courses page with hero banner and filters - Add Olympiads route and sidebar navigation entry - Add CLAUDE.md project documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.5 KiB
2.5 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Frappe LMS — full-stack Learning Management System. Fork of the official Frappe LMS app.
- Backend: Frappe Framework (Python 3.10+), 77 Doctypes
- Frontend: Vue 3 + Vite + TailwindCSS + Frappe UI
- Testing: Cypress E2E
Commands
Frontend Development
cd frontend
yarn dev # Dev server
yarn build # Build to /lms/public/frontend/
yarn lint # ESLint
Root Level
npm run dev # Same as frontend yarn dev
npm run build # Same as frontend yarn build
npm test-local # Open Cypress test runner
Backend (requires Frappe bench)
bench start # Start all services (Frappe, Redis, Worker)
bench --site [site] migrate # Run DB migrations after pulling
bench --site [site] build # Rebuild frontend assets
bench run-tests --app lms # Run backend tests
Docker (development)
docker compose up -d # Start all services
Architecture
Frontend (frontend/src/)
pages/— Page-level components (CourseDetail, Lesson, Batch, Quiz, etc.)components/— Reusable UI componentsstores/— Pinia state:user,session,settings,sidebarutils/— Helper functions- Vue Router base path:
/lms
Data fetching: Frappe UI's createResource / createListResource for all API calls. No manual fetch() calls.
Backend (lms/lms/)
doctype/— 77 Frappe Doctypes (Course, LMS Batch, Course Lesson, Quiz, LMS Assignment, Certification, etc.)api.py— All@frappe.whitelist()API endpoints callable from frontendutils.py— Shared backend helpershooks.py— Frappe app configuration (permissions, integrations, scheduled tasks)plugins.py— Plugin system for customizationpatches/— DB migration patches (v0_0, v1_0, v2_0)
Key Concepts
DocType hierarchy: Course → Course Chapter → Course Lesson
Enrollment: Batch Enrollment links user to LMS Batch
Assessments: Quiz, LMS Assignment, LMS Assessment are separate doctypes
User roles: Learner, Instructor, Evaluator, Course Creator, Batch Observer
Commit Convention
Uses semantic commits (enforced by commitlint):
feat: add new feature
fix: bug fix
chore: maintenance
docs: documentation
Build Output
Vite builds frontend to /lms/public/frontend/ and copies entry to /lms/www/lms.html.