TORA: Digital Mock Exam Platform for SMA N 01 Karanganyar
A high-performance digital mock exam platform on a scalable architecture. able to handle hundreds of thousands of concurrent users, built for SMA N 01 Karanganyar.

Background
SMA Negeri 01 Karanganyar needed a digital mock exam system that would replace an inefficient paper process and hold up under heavy load. The core problem: hundreds to thousands of students sitting the exam simultaneously, in real time, with no technical hitch to disturb the room.
The project is called TORA (Try Out Smansakra). built on an architecture designed for hundreds of thousands of concurrent users, so every session runs smoothly, fairly, and securely even when traffic spikes hard.
The challenge
- Hundreds of thousands of concurrent users. horizontal scaling ready to absorb a massive surge without losing performance
- Strict exam security. preventing cheating, tab switching, and unauthorised access during a session
- Reliable autosave. answers saved periodically so nothing is lost to a connection drop
- Efficient deployment. infrastructure the school can run at minimal operating cost
What we built
Performance and scalability
- Rate limiting on the critical endpoints (`/start`, `/autosave`, `/submit`) to stop request flooding from hundreds of students
- Automatic autosave every 45 seconds. an interval tuned so the server is never overwhelmed while answers stay safe
- Question order pre-generated when the exam is created rather than when a student starts, so initial load is very fast
- Efficient request queueing through database transactions to prevent race conditions
Exam security
- Detection and logging of tab switching and window minimising during a session
- Active monitoring with real-time indicators for invigilators
- Authentication by full student name. simple, but verified per exam session
- Endpoint protection with a session token unique to each exam
Full feature set
- A question bank with Excel (`.xlsx`) import and export, so teachers can load questions in bulk
- A responsive exam timer that does not disturb the mobile layout
- Automatic submission when time runs out
- Result reports exportable to PDF and Excel, per student or per class
- A complete admin dashboard covering users, classes, subjects, and exam scheduling
Results and impact
| Metric | Result |
|---|---|
| Concurrent user capacity (architecture) | 100,000+ users |
| Exam page load time | Under 1.5 seconds |
| Answers lost to interruption | 0 incidents |
| Time to set up a new exam | Under 5 minutes |
Technology used
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS v4 |
| Database | MongoDB (self-hosted) |
| Authentication | NextAuth.js |
| UI Icons | Lucide React |
| Maths/LaTeX | KaTeX, react-markdown, remark-math, rehype-katex |
| PDF export | jsPDF + jspdf-autotable |
| Excel export | SheetJS (xlsx) |
| Validation | Zod |
| Deployment | Docker + Caddy (self-hosted) |
Client quote
"We were worried the server would go down when hundreds of students logged in at once. There was not a single problem. The question import and automatic reports have been a real help to the admin team."
. TORA admin, SMA N 01 Karanganyar
Engineered Tech Stack
Ready to Engineer a Similar Solution?
Discuss your operational requirements, system architecture, and milestone roadmap with InvictusWave senior engineers.




