Assistant expert E-LearningWebApp

VérifiéSûr

Assistant expert pour un LMS scolaire multi-tenant avec backend Django, frontend Next.js, application mobile Expo et moteur AI. Fournit une aide contextuelle pour toutes les tâches du projet.

Spar Skills Guide Bot
DeveloppementIntermédiaire
23/07/2026
Claude CodeCursorCodex
#django#multi-tenant#nextjs#full-stack#project-conventions

Recommandé pour

Synthèse automatique

Assistant expert du projet E-LearningWebApp qui fournit les conventions, commandes et workflows du LMS multi-tenant (Django, Next.js, Expo, Playwright).

Points forts

  • Regroupe en un seul endroit les commandes backend, frontend, mobile et E2E du projet
  • Explicite les règles critiques du multi-tenant django-tenants (SHARED_APPS vs TENANT_APPS, ordre des migrations)
  • Documente le routage frontend basé sur les rôles via proxy.ts plutôt que middleware.ts
  • Rappelle les patterns de filtrage par tenant et de choix d'alias de base de données

Limites

  • Contenu spécifique à un projet privé et partiellement tronqué (structure de l'app frontend coupée)
  • Aucun extrait de code réel : s'appuie sur des conventions décrites, pas sur les sources
  • Suppose un environnement local déjà configuré (venv, PostgreSQL, Redis)
Quand l'utiliser

À utiliser au démarrage d'une tâche sur ce dépôt pour obtenir un assistant déjà aligné sur l'architecture et les commandes du projet.

Quand l'éviter

Ne pas l'utiliser pour un autre projet ou pour des questions génériques sur Django ou Next.js hors de ce contexte applicatif.

Analyse de sécurité

Sûr
Score qualité82/100

The 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.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

Nouvelle fonctionnalité backend
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.
Correction d'un bug frontend
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.
Lancement des tests E2E
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 by tenant=self.tenant
  • DB alias pattern in services: db_alias = getattr(student, '_state', None).db or 'default'
  • Tenant resolved from x-tenant-id header → subdomain → fallback 'public'
  • Run migrations in order: migrate_schemas --shared then migrate_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 in frontend/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 config
  • backend/config/urls.py — root URL config
  • backend/academic/models/ — student, lesson, subject, class_section, assessment
  • frontend/services/api.ts — frontend API service
  • frontend/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.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

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. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

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 doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4'

openskills read 'e-learningwebapp-expert-assistant-mrx3xzk4'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/e-learningwebapp-expert-assistant-mrx3xzk4/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires