diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..5992d97d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,81 @@ +# 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 +```bash +cd frontend +yarn dev # Dev server +yarn build # Build to /lms/public/frontend/ +yarn lint # ESLint +``` + +### Root Level +```bash +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) +```bash +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) +```bash +docker compose up -d # Start all services +``` + +## Architecture + +### Frontend (`frontend/src/`) +- **`pages/`** — Page-level components (CourseDetail, Lesson, Batch, Quiz, etc.) +- **`components/`** — Reusable UI components +- **`stores/`** — Pinia state: `user`, `session`, `settings`, `sidebar` +- **`utils/`** — 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 frontend +- **`utils.py`** — Shared backend helpers +- **`hooks.py`** — Frappe app configuration (permissions, integrations, scheduled tasks) +- **`plugins.py`** — Plugin system for customization +- **`patches/`** — 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`. diff --git a/frontend/src/components/CourseCard.vue b/frontend/src/components/CourseCard.vue index 0e63c036..c65499e4 100644 --- a/frontend/src/components/CourseCard.vue +++ b/frontend/src/components/CourseCard.vue @@ -1,146 +1,162 @@ + - diff --git a/frontend/src/pages/Courses/Courses.vue b/frontend/src/pages/Courses/Courses.vue index ed1c0902..1da012cf 100644 --- a/frontend/src/pages/Courses/Courses.vue +++ b/frontend/src/pages/Courses/Courses.vue @@ -46,51 +46,63 @@ -
-
-
- {{ __('All Courses') }} + + +
+
+
+ + + {{ __('Courses') }} +
-
- - -
- -
-
+
+ +
+ +
+ +
+
+