Quick start
Grade a fixture image
Install the prerequisites, start Sunbeam, and create an answer key. The service expects a CSV header named questionNumber,correctAnswer and the implementation supports the 40-question fixture layout.
cat > /tmp/answers.csv <<'EOF'
questionNumber,correctAnswer
1,B
2,B
3,C
4,D
5,A
6,B
7,B
8,C
9,D
10,D
11,D
12,A
13,A
14,A
15,C
16,B
17,D
18,A
19,C
20,C
21,B
22,B
23,D
24,D
25,B
26,A
27,D
28,C
29,C
30,A
31,B
32,D
33,C
34,C
35,A
36,B
37,C
38,D
39,C
40,B
EOF
./mvnw spring-boot:run
In another terminal, submit a real fixture image:
curl -s -X POST http://localhost:8080/api/v1/grade \
-F "image=@data/test_1.jpeg" \
-F "answers=@/tmp/answers.csv" | python3 -m json.tool
A successful response is JSON with the fields described in Grade exam. The repository's controller tests use the same multipart field names and assert an HTTP 200 response with 40 total questions.
For the complete processing behavior, continue to the core workflow and OMR detection.