Required Python Version: 3.10+
A scalable, asynchronous autograder platform for programming assignments built with Python, FastAPI, Celery, Redis, PostgreSQL, Jinja, and Judge0.
This system enables instructors to define structured programming assessments and automatically evaluate student submissions in a secure execution environment without manual intervention.
The EdTech Autograder System is a full-stack distributed application designed to solve one of the most time-intensive problems in technical education: grading programming assignments.
- Students upload Python solutions.
- Instructors define evaluation criteria.
- The system grades submissions asynchronously using secure sandboxed execution.
The architecture is designed to reflect real-world production patterns used in scalable systems.
- Create and edit programming assignments
- Define IO-based test cases
- Add assert-based unit test specifications
- Configure static code analysis rules
- Publish assignments
- View student submissions and grading breakdowns
- View published assignments
- Upload Python
.pyfiles - Track submission status (queued → running → completed)
- View score breakdown
- Receive structured grading feedback
- (Optional) Receive AI-assisted improvement suggestions
The grading engine operates asynchronously:
- Student uploads solution
- FastAPI stores submission in PostgreSQL
- Submission task enqueued in Redis
- Celery worker processes task
- Code sent to Judge0 for secure execution
- IO tests evaluated
- Unit tests evaluated
- Static analysis performed (AST + Radon)
- Weighted score computed
- Feedback generated
- Results stored and returned via API
This ensures the API remains responsive even during heavy grading loads.
- Frontend: Jinja2 templates (for simplicity in this demo)
- Backend API: FastAPI
- Database: PostgreSQL
- Task Queue: Celery
- Message Broker: Redis
- Execution Engine: Judge0 (hosted)
- Static Analysis: AST module + Radon
Student UI → FastAPI → PostgreSQL
FastAPI → Redis (enqueue task)
Celery Worker ↔ Redis
Celery Worker → Judge0
Celery Worker → PostgreSQL
Student UI ← FastAPI ← PostgreSQL
The grading process is fully asynchronous and non-blocking.
Core entities include:
- Users (students, instructors)
- Assignments
- IO Test Cases
- Unit Test Specs
- Static Rules
- Submissions
- Grading Runs
- Test Case Results
- Static Analysis Reports
The schema is normalized and supports:
- Multiple submission attempts
- Regrading
- Scalable evaluation
- Feedback persistence
- Future multi-language support
-
Student code is never executed on the main server
-
All execution is handled by Judge0 in a sandboxed container
-
Execution limits enforced:
- CPU time
- Memory
- Timeout
-
Redis only acts as a message broker
-
Celery workers handle background processing safely
Each assignment defines weight distribution:
- IO Tests
- Unit Tests
- Static Analysis
Final score is computed as:
score_total =
(weight_io × io_score) +
(weight_unit × unit_score) +
(weight_static × static_score)
Feedback is generated deterministically from grading results.
AI-generated suggestions (if enabled) never affect scoring.
- Fully correct solution → 100% score
- Incorrect logic → partial score
- Infinite loop → timeout handled gracefully
- Syntax error → structured failure response
- Static rule violation → complexity or forbidden import flagged
git clone git@github.com:Developer-s-Foundry/edtech-autograder-system
cd edtech-autograder-system
This project requires Python 3.10+.
Verify your installed version:
python --version
It must return:
Python 3.10.x or greater
If you are using pyenv:
pyenv install 3.10
pyenv local 3.10
Create the virtual environment in the project root:
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
pip install -r requirements.txt
Configure Environment Variables by using the .env.example file as a template. Create a .env file in the root directory with the following content:
DATABASE_URL=
REDIS_URL=
CELERY_BROKER_URL=
JUDGE0_BASE_URL=
JUDGE0_API_KEY=
JWT_SECRET_KEY=
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
AI_FEEDBACK_ENABLED=true
GROQ_API_KEY=
AI_FEEDBACK_MODEL=llama-3.1-8b-instant
AI_FEEDBACK_TIMEOUT_SECONDS=20
AI_FEEDBACK_CODE_CHAR_LIMIT=8000
AI_FEEDBACK_MAX_CHARS=6000
alembic init alembic
alembic revision --autogenerate -m "Initial migration"
alembic upgrade head
python scripts/seed.pyThis creates data into all tables; 3 demo users,1 assignments,
3 IO test cases, 1 Unit test spec, and 1 static rules config (password for all: demo_password_123):
| Role | |
|---|---|
instructor.demo@autograder.local |
instructor |
student1.demo@autograder.local |
student |
student2.demo@autograder.local |
student |
uvicorn app.main:app --reload
celery -A app.celery_app worker --loglevel=info --pool=solo
This system demonstrates:
- Asynchronous processing architecture
- Distributed system coordination
- Message broker pattern
- Background worker model
- Separation of concerns
- Execution isolation
- Production-ready data modeling
The design supports horizontal scaling of Celery workers and Redis-backed task distribution.
- REST API design
- Role-based authentication (JWT)
- Distributed system messaging
- Background task processing
- Secure remote code execution
- Static code parsing using AST
- Cyclomatic complexity analysis
- Structured feedback generation
- Clean ERD modeling
- MVP-first architecture planning
- Multi-language grading (C++, Java, etc.)
- WebSocket real-time result streaming
- Plagiarism detection
- Analytics dashboard
- Rate limiting
- Submission history comparisons
- Kubernetes deployment
- Self-hosted Judge0 cluster
- AI grading for written assignments
This project was developed as a capstone-level system to demonstrate:
- System design thinking
- Backend architecture proficiency
- Asynchronous processing expertise
- Full-stack development capability
- Secure execution model integration
This project is for educational and demonstration purposes.