Automated summary
Expert assistant for the E-LearningWebApp project that supplies the conventions, commands and workflows of this multi-tenant school LMS (Django, Next.js, Expo, Playwright).
Strengths
- Centralizes the project's backend, frontend, mobile and E2E commands in one place
- Spells out the critical django-tenants rules (SHARED_APPS vs TENANT_APPS, migration order)
- Documents role-based frontend routing handled in proxy.ts instead of middleware.ts
- Recalls tenant filtering patterns and the database alias convention for services
Limitations
- Content is specific to a private project and partly truncated (the frontend app structure is cut off)
- Contains no real code samples, only described conventions, not the actual sources
- Assumes an already configured local environment (venv, PostgreSQL, Redis)
Use it at the start of a task on this repository so the assistant is already aligned with the project's architecture and commands.
Do not use it for another project or for generic Django/Next.js questions outside this application's context.
Security analysis
SafeThe skill is a project-context reference file describing an E-LearningWebApp's architecture, commands, and conventions. All included commands are legitimate development/operations actions (Django runserver, migrate_schemas, seed_data, backup_tenant, Celery, npm/playwright). There are no curl|sh pipes, no credential/secret exfiltration, no obfuscated or base64 payloads, and no instruction to disable safety controls. Some tenant-management commands (reset_tenants_to_demo, init_prod) modify data, but they are standard, disclosed project tooling rather than destructive or malicious actions.
No concerns found
How this analysis is madeExamples
Ajoute un endpoint DRF pour lister les devoirs d'un élève dans l'app academic, en respectant les règles multi-tenant du projet et en indiquant les commandes de migration à lancer.Corrige la redirection après login sur le frontend : le rôle teacher doit atterrir sur /teacher. Rappelle-moi où se trouve la logique de routage et comment lancer le lint et le type-check.Je veux vérifier le parcours de connexion avant une mise en production : donne-moi la commande Playwright pour ne lancer que le test de login sur chromium, puis la suite smoke complète.name: skill description: Project expert assistant for the E-LearningWebApp — a multi-tenant school LMS. Knows all commands, patterns, and workflows for the Django backend, Next.js frontend, Expo mobile app, and AI engine. Use this when starting a new task to get a context-aware assistant.
You are an expert developer on this E-LearningWebApp project. You have deep knowledge of the full stack and multi-tenant architecture. When helping with tasks, apply this knowledge automatically without asking the user to re-explain project conventions.
Project Structure
Multi-tenant school LMS with three sub-projects:
- Backend:
backend/— Django 5.2 + DRF + django-tenants (schema-per-tenant) + PostgreSQL/pgvector + Celery/Redis + Django Channels - Frontend:
frontend/— Next.js (App Router) + TypeScript + TailwindCSS 4 + React Query - Mobile:
mobile/— Expo 55 + React Native 0.83 - E2E Tests:
tests/— Playwright
Multi-Tenancy Rules (Critical)
- Each school = one PostgreSQL schema via django-tenants
- SHARED_APPS (public schema):
core,users,billing,billing_saas,auditlog - TENANT_APPS (per-tenant):
academic,ai_engine,notifications,library,gamification,conversations,billing_school - All tenant-scoped models have
tenant = FK(Tenant)and must filter bytenant=self.tenant - DB alias pattern in services:
db_alias = getattr(student, '_state', None).db or 'default' - Tenant resolved from
x-tenant-idheader → subdomain → fallback'public' - Run migrations in order:
migrate_schemas --sharedthenmigrate_schemas --tenant
Backend Commands
cd backend && source .venv/bin/activate
# Dev server
python manage.py runserver 0.0.0.0:8000
# Migrations (order matters!)
python manage.py migrate_schemas --shared
python manage.py migrate_schemas --tenant
# Tests
python manage.py test
python manage.py test academic.tests.TestClass.test_method
# Lint/format
black . && flake8 . && isort .
# Data seeding
python manage.py seed_data # Main test data (--clear to reset)
python manage.py seed_gamification
python manage.py seed_library
# Multi-tenant ops
python manage.py migrate_tenants # Migrate all tenants
python manage.py backup_tenant # --schema or --all
python manage.py reset_tenants_to_demo
python manage.py reconcile_public_users_to_tenants
python manage.py upsert_tenant_user
python manage.py init_prod # Production initialization
# AI engine
python manage.py ai_index_content # Index content for RAG
python manage.py generate_ai_reports # Generate AI progress reports
# Other
python manage.py backfill_gamification_profiles
python manage.py run_triggers # Notification triggers
Frontend Commands
cd frontend
# Dev server
NEXT_PUBLIC_API_URL=http://127.0.0.1:8000 npm run dev -- --hostname 127.0.0.1 --port 3000
npm run lint # ESLint
npm run type-check # tsc --noEmit
npm run build
Mobile Commands
cd mobile
EXPO_PUBLIC_API_URL=http://127.0.0.1:8000/api npm start
npm run ios
npm run android
E2E Tests (root)
npm run test:e2e # All tests
npm run test:e2e:smoke # Quick smoke suite
npm run test:e2e:critical # Critical user flows
npm run api:types # Generate TS types from OpenAPI schema
# Single test
npx playwright test tests/e2e/smoke/auth.spec.ts --grep="login" --project=chromium
Frontend Routing
- No
middleware.ts— all routing logic is infrontend/proxy.ts - JWT extracted from cookies → role decoded → role-based route guards
- Role → dashboard:
admin/staff → /admin,teacher → /teacher,student → /student,saas_admin → /saas,parent → /parent - Root
/on tenant host: unauthenticated → rewrite/school; authenticated → redirect to role dashboard
Frontend App Structure
frontend/app/
├── (auth)/ # Login, register, verify-email, forgot-password
├── (saas)/ # SaaS admin panel
├── admin/ # School admin/staff dashboard
├── student/ # Student interface
├── teacher/ # Teacher interface
├── parent/ # Parent interface
├── school/ # Per-tenant school landing page
├── api/ # Next.js API route handlers
└── page.tsx # Root/SaaS landing page
Backend URL Structure
All routes under /api/ (aliased at /api/v1/):
/api/core/— tenant management/api/users/— auth, user management/api/academic/— classes, subjects, lessons, assessments/api/ai/— AI tutor, learning paths, reports, analytics/api/billing/,/api/billing/saas/,/api/billing/school//api/notifications/,/api/library/,/api/gamification/,/api/conversations/POST /api/token/— obtain JWT;POST /api/token/refresh/— refresh JWT
AI Engine (backend/ai_engine/)
Services in ai_engine/services/:
- RAGTutorService — pgvector cosine similarity retrieval, grounded + general chat, persistent memory
- LearningPathService — rule-based path generation using weak areas + next lessons
- RiskAnalyticsService — attendance + grade-based at-risk detection
- PersonalizationService, PredictiveAnalyticsService, AssistedGradingService
- ExamGeneratorService, QuizGeneratorService, LessonSummaryService
- SM-2 spaced repetition, BKT skill mastery, AI study planner, AI progress reports
Background tasks in ai_engine/tasks.py use Celery with sync fallback via core.async_jobs.
Auth
JWT via djangorestframework_simplejwt. Roles: saas_admin, admin, staff, teacher, student, parent.
Key Files
backend/config/settings/base.py— settings (AI_* prefix for AI config)backend/config/celery.py— Celery configbackend/config/urls.py— root URL configbackend/academic/models/— student, lesson, subject, class_section, assessmentfrontend/services/api.ts— frontend API servicefrontend/proxy.ts— routing/auth middleware
Docker
docker compose up # Starts backend, frontend, PostgreSQL, Redis, Celery
Now assist the user with whatever task they describe, applying this project knowledge throughout.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/e-learningwebapp-expert-assistant-mrx3xzk4/download' --output '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md.part' && mv '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md.part' '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md' && test -s '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/skill' && cp -R '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4' '.claude/skills/skill'Cursor
test -f '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md' && test -s '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/skill' && cp -R '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4' '.cursor/skills/skill'Codex
test -f '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md' && test -s '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/skill' && cp -R '.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4' '.agents/skills/skill'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4'openskills read 'e-learningwebapp-expert-assistant-mrx3xzk4'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.