A RESTful assessment platform for managing courses, exams, questions, student submissions, and automated grading. Built with Django REST Framework (DRF), secured using JWT authentication, and designed with role-based access control for students and staff.
- π JWT Authentication - Secure token-based authentication system
- π₯ Role-Based Access Control - Separate permissions for students and staff
- π Course Management - Organize exams by courses
- π Exam Creation - Staff can create exams with multiple question types
- βοΈ Secure Submissions - Students can submit answers with validation
- π€ Automated Grading - AI-powered evaluation with multiple grading strategies
- π Real-time Results - Instant feedback and detailed scoring
- π Submission Tracking - Complete audit trail of all submissions
- Multiple Question Types - Essay, MCQ, Short Answer support
- Flexible Grading - Mock algorithms (keyword matching, TF-IDF) or LLM integration
- Permission System - Students can only view their own submissions
- Comprehensive API - RESTful endpoints for all operations
- Admin Interface - Django admin for easy management
Mini Acad Engine is an assessment engine that allows educational platforms to:
- Manage courses and exams
- Create and attach questions to exams
- Allow students to submit exams
- Automatically grade submissions
- Track scores, percentages, and grading status
The API is versioned and designed to be consumed by web or mobile clients.
- Backend: Django, Django REST Framework
- Authentication: JWT (JSON Web Tokens)
- Database: PostgreSQL (SQLite for local dev)
- Deployment: Render
https://assessment-ai-1.onrender.com
https://documenter.getpostman.com/view/21411890/2sBXVcnDFe
Current API Version: v1.0
All protected endpoints require a valid JWT access token.
Header format:
Authorization: Bearer <access_token>
Endpoint: POST /auth/register
{
"username": "string",
"email": "string",
"password": "string",
"user_type": "student"
}Response: 201 Created
Endpoint: POST /auth/login
{
"email": "string",
"password": "string"
}Response: 200 OK
Returns user details and JWT access/refresh tokens.
| Role | Permissions |
|---|---|
| Student | Take exams, submit answers, view own submissions |
| Staff | Create courses, exams, questions, view all submissions |
Endpoint: GET /courses/
Authentication: Required
Response: 200 OK
Endpoint: GET /courses/{id}/
Returns course details and associated exams.
Endpoint: POST /courses/
{
"name": "string",
"code": "string",
"description": "string"
}Endpoint: GET /exams/all
Query Params:
course_id(optional)
Endpoint: GET /exams/{examId}
Returns exam metadata and attached questions.
Endpoint: POST /exams/create
{
"course": 1,
"title": "Jamb Exam",
"duration_minutes": 60,
"questions": [
{
"text": "What is Python?",
"question_type": "essay",
"expected_answer": "Python is a programming language",
"marks": 10
}
]
}Endpoint: POST /exams/{examId}/questions
Endpoint: POST /exams/submissions
{
"exam_id": 1,
"answers": [
{
"question_id": 1,
"answer_text": "Python is a programming language",
"question_type": "essay"
}
]
}Endpoint: GET /exams/submissions
Query Params:
exam_id(optional)student_id(staff only)
Endpoint: GET /exams/submissions/{submissionId}
Students can only view their own submissions.
Endpoint: GET /exams/submissions/{submissionId}/answers
All errors follow a consistent structure:
{
"success": false,
"message": "Error description",
"errors": {}
}Common HTTP status codes:
400Bad Request401Unauthorized403Forbidden404Not Found500Internal Server Error
- User (Django built-in, extended with
user_type) - Course
- Exam
- Question
- Submission
- Answer
Relational integrity is enforced via foreign keys.
git clone https://github.com/your-username/assessment-ai.git
cd mini-acad-engine
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverThe API is deployed on Render.
Environment variables:
SECRET_KEYDATABASE_URLDEBUGJWT_SECRET
MIT License
Built and maintained by Daniel Adeniran.