How shreyask95/s4ds-project works
This is a web application for turning handwritten exam PDFs into transcripts and AI-generated grades. The main workflow is: a user uploads a PDF in Home, the Flask API converts pages to images, Gemini transcribes them, and the transcript is saved and returned. The user then opens Evaluation, which asks the API to grade that transcript against the question paper and displays feedback. Login is a separate capability. The backend’s conversion, extraction, and grading functions are all implemented in app.py; unsampled backend scripts are not mapped.
Main entry points: app.py Upload handler · Home.jsx Upload page · Login.jsx Login page · Evaluation.jsx Evaluation page
Components 17
Web client
- Upload page
client/src/components/Home/Home.jsx - Login page
client/src/components/Login/Login.jsx - Evaluation page
client/src/components/Evaluation/Evaluation.jsx - Client routes
client/src/App.js
Flask API
- Flask API
backend/scripts/app.py - Login handler
backend/scripts/app.py - Upload handler
backend/scripts/app.py
Document processing
- PDF conversion
backend/scripts/app.py - Page images
backend/data/processed - Gemini transcription
backend/scripts/app.py - Uploaded PDFs
backend/data/raw - Transcript files
backend/data/results
Grading
- Evaluation handler
backend/scripts/app.py - Answer grading
backend/scripts/app.py - Question paper
backend/data/etrx_qp (1).txt
Other components
- User
- Google Gemini
Connections 23
- User → Login page: enters credentials
client/src/components/Login/Login.jsx - Login page → Login handler: posts login
client/src/components/Login/Login.jsx - Login handler → Login page: returns status
backend/scripts/app.py - Login page → Client routes: navigates home
client/src/components/Login/Login.jsx - User → Upload page: uploads PDF
client/src/components/Home/Home.jsx - Upload page → Upload handler: posts file
client/src/components/Home/Home.jsx - Upload handler → Uploaded PDFs: saves PDF
backend/scripts/app.py - Upload handler → PDF conversion: converts PDF
backend/scripts/app.py - PDF conversion → Page images: writes pages
backend/scripts/app.py - Upload handler → Gemini transcription: extracts pages
backend/scripts/app.py - Gemini transcription → Page images: reads images
backend/scripts/app.py - Gemini transcription → Google Gemini: requests transcription
backend/scripts/app.py - Gemini transcription → Transcript files: writes transcript
backend/scripts/app.py - Upload handler → Upload page: returns transcript
backend/scripts/app.py - Upload page → Client routes: opens evaluation
client/src/components/Home/Home.jsx - Client routes → Evaluation page: routes evaluation
client/src/App.js - Evaluation page → Evaluation handler: posts transcript path
client/src/components/Evaluation/Evaluation.jsx - Evaluation handler → Transcript files: reads transcript
backend/scripts/app.py - Evaluation handler → Question paper: reads questions
backend/scripts/app.py - Evaluation handler → Answer grading: grades answers
backend/scripts/app.py - Answer grading → Google Gemini: requests grading
backend/scripts/app.py - Evaluation handler → Evaluation page: returns feedback
backend/scripts/app.py - Evaluation page → User: displays results
client/src/components/Evaluation/Evaluation.jsx