Skip to content

DomainWarrior/edu-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EduPlatform API

A full-featured education management REST API built with Django and Django REST Framework, featuring an Aleks-style adaptive learning engine alongside traditional classroom management.

Data Model


Features

  • JWT authentication with refresh-token rotation and blacklisting on logout
  • Role-based access control — teachers, students, and admins each see only what they're allowed to
  • Courses & Syllabi — courses with subjects, grade levels, credits, full syllabi, and weekly units
  • Classrooms — sections linking a teacher, a course, and enrolled students; one-click enroll/unenroll
  • Assignments — homework, quizzes, tests, projects, and exams with due dates, late penalties, and file uploads
  • Submissions & Grades — students submit work; teachers grade with automatic percentage and letter-grade calculation
  • Adaptive learning (Aleks-style) — topic mastery tracking (0–100%), practice sessions, smart next-question routing based on weakest topic, and per-student progress dashboards
  • Interactive API docs at /api/docs/ (Swagger UI) and /api/redoc/

Data Model

App Models
accounts User (teacher / student / admin), TeacherProfile, StudentProfile
courses Subject, Course, Syllabus, SyllabusUnit, Classroom
assignments Assignment, Submission, Grade
adaptive Topic, AdaptiveCourse, AdaptiveQuestion, StudentTopicMastery, AdaptiveSession, SessionResponse

Quick Start

# 1. Clone & enter
git clone https://github.com/DomainWarrior/edu-platform.git
cd edu-platform

# 2. Create virtual environment
python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Configure environment
cp .env.example .env            # edit SECRET_KEY at minimum

# 5. Migrate & create superuser
python manage.py migrate
python manage.py createsuperuser

# 6. Run
python manage.py runserver

Open http://localhost:8000/api/docs/ for the full interactive Swagger UI.


API Reference

Auth — /api/v1/auth/

Method Endpoint Description
POST register/ Create a new user (role: teacher | student)
POST login/ Obtain access + refresh JWT tokens
POST refresh/ Refresh access token
POST logout/ Blacklist refresh token
GET/PATCH me/ View or update current user profile
GET teachers/ List all teachers (teacher only)
GET students/ List all students (teacher only)

Courses — /api/v1/courses/

Method Endpoint Description
GET/POST subjects/ List or create subjects
GET/POST courses/ List or create courses
GET/POST syllabi/ List or create syllabi
GET/POST syllabi/{id}/units/ List or add units to a syllabus
GET/POST classrooms/ List or create classrooms
POST classrooms/{id}/enroll/ Enroll students (teacher only)
POST classrooms/{id}/unenroll/ Remove students (teacher only)

Assignments — /api/v1/assignments/

Method Endpoint Description
GET/POST assignments/ List or create assignments
GET/POST submissions/ List or create submissions
POST submissions/{id}/submit/ Submit work for grading
GET/POST submissions/{id}/grade/ View or add a grade (teacher only)
GET grades/ List all grades visible to current user

Adaptive — /api/v1/adaptive/

Method Endpoint Description
GET/POST topics/ Manage learning topics
GET/POST courses/ Manage adaptive courses
GET courses/{id}/progress/ Student's mastery progress ("pie")
GET/POST questions/ Manage practice questions
GET mastery/ View topic mastery records
GET/POST sessions/ Start or list practice sessions
GET sessions/{id}/next-question/ Get next question (weakest topic first)
POST sessions/{id}/answer/ Submit an answer; updates mastery automatically
POST sessions/{id}/complete/ End a session

Adaptive Learning Flow

Teacher                          Student
  │                                │
  ├─ Create Course                 │
  ├─ Create AdaptiveCourse         ├─ POST /sessions/        (start session)
  ├─ Add Topics & Questions        ├─ GET  /next-question/   (weakest topic)
  │                                ├─ POST /answer/          (submit answer)
  │                          ┌─────┤                         (mastery updates)
  │                          │     ├─ GET  /next-question/   (repeat)
  │                          │     └─ POST /complete/        (end session)
  │                          │
  └─ GET /progress/          └─ GET /courses/{id}/progress/  (view "pie")

Each SessionResponse automatically:

  1. Evaluates correctness
  2. Updates StudentTopicMastery (mastery_level 0–100, is_mastered at ≥ 80%)
  3. Increments session counters

Project Structure

edu-platform/
├── apps/
│   ├── accounts/       # User, TeacherProfile, StudentProfile, JWT auth
│   ├── courses/        # Subject, Course, Syllabus, SyllabusUnit, Classroom
│   ├── assignments/    # Assignment, Submission, Grade
│   └── adaptive/       # Topic, AdaptiveCourse, Question, Mastery, Session
├── edu_platform/
│   ├── settings.py
│   └── urls.py
├── docs/
│   └── architecture.svg
├── requirements.txt
└── .env.example

Tech Stack

  • Python 3.9+ · Django 4.2 LTS
  • Django REST Framework 3.16
  • SimpleJWT — access/refresh tokens, rotation, blacklist
  • django-filter — filterset on every viewset
  • drf-spectacular — auto OpenAPI 3 schema + Swagger UI
  • SQLite (dev) — swap DATABASES in .env for PostgreSQL in production

Environment Variables

Variable Default Description
SECRET_KEY (required) Django secret key
DEBUG True Set False in production
ALLOWED_HOSTS localhost,127.0.0.1 Comma-separated hosts
CORS_ALLOWED_ORIGINS http://localhost:3000 Frontend origins

About

Django REST API education platform with teachers, classrooms, students, assignments, syllabi, courses, grades, and Aleks-style adaptive learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages