SCFA is a python CLI and web dashboard system designed to clean, analyze, and generate feedback for students' coding playground submissions from a contest. It uses local code-diffing heuristics to track coding progression timelines, saving API token overhead, and uses OpenAI to generate personalized critiques.
The project uses a local virtual environment venv to isolate dependencies:
# Verify venv exists and install requirements
./venv/bin/pip install -r requirements.txtCopy the environment example file and add your OPENAI_API_KEY:
cp .env.example .envEdit .env:
OPENAI_API_KEY=your_key_hereTo process a raw JSON submissions file (e.g. the 741-record file):
./venv/bin/python3 src/main.py analyze --file data/user_x_coding_playground_submissions_2026-06-13T00_43_20.422060959+05_30.jsonNote: You can add --dry-run to run only the local diff and metric pre-processing without calling the OpenAI API. You can also specify --limit <N> to run OpenAI calls on only the first N students to test configurations.
Successful student submissions are exported to:
reports/correct_submissions/{question_id}/{student_id}_{submission_id}.py
Run the built-in HTTP server to serve the frontend:
./venv/bin/python3 src/main.py serveOpen your browser at http://localhost:8000 to explore the glowing, dark-themed dashboard.
src/parser.py: Reads raw submissions, cleans booleans and numerical fields, and groups data by student and problem.src/analyzer.py: Computes code differences (line additions/deletions/replacements) chronologically and extracts key transition milestones.src/llm_client.py: OpenAI client utilizing the cheap, fastgpt-4o-minimodel with robust mock fallbacks if the API key is not supplied.src/prompts.py: Custom CS-educator prompts.src/main.py: Core CLI entrypoint coordinating the analyzer commands and local dashboard server.web/: Dashboard frontend containingindex.html,styles.css, andapp.js(featuring search filters, timelines, and diff modal views).