An AI-powered backend system built with Django & DRF, designed to track student performance, manage resources, and generate personalized learning recommendations.
GET /api/students/β List all studentsPOST /api/students/β Create new studentGET /api/students/{student_id}/β Get student details
GET /api/student/{student_id}/performance/β Get student performance
GET /api/resources/β List all resourcesPOST /api/resources/β Create new resource
POST /api/recommendations/β Generate AI recommendationsGET /api/recommendations/{student_id}/β Get student recommendationsPATCH /api/recommendations/update/{recommendation_id}/β Update recommendation status
GET /api/analytics/dashboard/β Get system analytics
- Backend: Django, Django REST Framework
- AI Integration: Groq (Llama-3.1-8b-instant)
- Database: SQLite (default)
- Testing: Django Test Framework
- Clone the repository:
git clone https://github.com/avin-madhu/webq_django_backend.git
cd webq_be
- Create and activate a Virtual Environment
python -m venv venv
source venv/bin/activate # On Linux/Mac
venv\Scripts\activate # On Windows
- Install dependencies
pip install -r requirements.txt
- run migrations:
python manage.py migrate
- Get GROQ API key and set up a .env file
# DJANGO Settings
DEBUG=True
# API Key
GROQ_API_KEY=<your-api-key>
- Load seed data
python seed_data.py
- Start your server
python manage.py runserver
REQUEST:
GET /api/student/STU001/performance/
RESPONSE:
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"student_id": "STU001",
"name": "Alice Johnson",
"email": "alice.johnson@example.com",
"performance_score": 85.5,
"completed_courses": [
"Python Basics",
"Data Structures"
],
"pending_courses": [
"Machine Learning",
"Web Development"
],
"total_recommendations": 8,
"recent_activity": [
{
"resource_title": "Data Structures Explained",
"status": "recommended",
"date": "2025-08-23T11:05:03.873818+00:00",
"confidence": 0.8
},
{
"resource_title": "Machine Learning Quiz",
"status": "recommended",
"date": "2025-08-23T11:05:03.867923+00:00",
"confidence": 0.9
},
{
"resource_title": "Algorithm Design Patterns",
"status": "recommended",
"date": "2025-08-23T11:05:03.859902+00:00",
"confidence": 0.95
},
{
"resource_title": "HTML5 Semantic Elements",
"status": "recommended",
"date": "2025-08-23T11:04:56.285618+00:00",
"confidence": 0.05
},
{
"resource_title": "JavaScript DOM Manipulation",
"status": "recommended",
"date": "2025-08-23T11:04:56.264405+00:00",
"confidence": 0.06
}
],
"created_at": "2025-08-23T09:38:31.026189Z",
"updated_at": "2025-08-23T09:38:31.026189Z"
}