Building TestFlow: what a real exam backend taught me about users
1,500+ questions, 1,300+ students, and a lecture timetable that does not care about my deploy schedule. The backend decisions that made TestFlow survive contact with real students.
1,500+ questions, 1,300+ students, and a lecture timetable that does not care about my deploy schedule. The backend decisions that made TestFlow survive contact with real students.
I'm the backend developer on TestFlow, a CBT practice platform for Obafemi Awolowo University students. It now carries 1,500+ questions across 50+ courses, and over 1,300 students have practised on it.
I'm a Computer Science student. I have a lecture timetable that treats my deploy schedule as a suggestion. Here's what building for real students taught me that no tutorial could.
Note
This is a personal build log, not an official product post. Numbers are from the platform's own landing page at the time of writing.
When you have maybe fifteen hours a week, the difference between shipping and not shipping is the feature list. My rule was simple: if a feature doesn't make the first user say "this is useful", it doesn't exist yet.
That meant:
The tempting version is a giant JSON blob per course. It breaks the moment you want to know which question a student keeps failing. So every question has a stable id, a course, a topic, a type, options, the correct answer, and an explanation:
type Question = {
id: string;
courseId: string;
topic: string;
prompt: string;
options: { key: "A" | "B" | "C" | "D"; text: string }[];
answer: "A" | "B" | "C" | "D";
explanation: string; // the whole point of the product
};That contract is why progress, streaks and per-topic accuracy are all just queries instead of new features.
The client never sees the answer key. A practice session sends answers up, the server grades them and returns the result with the explanation. It also means a student can't open devtools and give themselves a 100.
Heads up
Shipping the answer key to the browser is the single easiest way to make a study product worthless. It's also the easiest mistake to make, because it's the shortest code path.
The hot path isn't "get all questions", it's "give me the next N questions for this course and topic that this student hasn't recently answered". Two composite indexes turned the slowest page from a few seconds into something that feels instant:
-- the practice feed
CREATE INDEX idx_q_feed ON questions (course_id, topic, id);
-- what has this student already seen?
CREATE INDEX idx_attempts_recent ON attempts (user_id, question_id, created_at DESC);Tip
Write the query you need, then index for that. A schema that "feels normalised" and a schema that answers your hot path in one index read are different schemas.
The promise on the landing page is "a little better, every day". That only works if a wrong answer teaches something. Explanations are returned with the grade in the same response, so the feedback loop is one round trip, not two.
A streak counter gets corrupted the first time a timezone or a missed midnight job shows up. Storing the distinct days a student was active and deriving the streak is boring, self-healing, and correct after a timezone change.
function streak(activeDays: string[]): number {
const days = new Set(activeDays);
let n = 0;
const cursor = new Date();
// count back from today (or yesterday, if today hasn't started yet)
for (;;) {
const key = cursor.toISOString().slice(0, 10);
if (days.has(key)) {
n++;
cursor.setUTCDate(cursor.getUTCDate() - 1);
} else if (n === 0) {
cursor.setUTCDate(cursor.getUTCDate() - 1);
if (n > 1) break;
break;
} else break;
}
return n;
}TestFlow is live at testflow.com.ng. I built the exam and practice backend: question delivery, scoring, study-plan progress, and the data behind the streaks.
Daniel Oluwadare · Emerald
Software engineer on TestFlow, and the person writing everything here. I build in public and post what I learn.
14 Nov 2026 · 3 min
Why my GitHub bot moved from WhatsApp to Telegram
A bot that pipes GitHub events into a chat I actually read. The WhatsApp version worked; Telegram made it maintainable. Here's the trade, and the architecture underneath.
10 Nov 2026 · 2 min
Building Calder: why I started a developer-first email API
Every project I shipped needed transactional email, and every time I wired up a provider I rebuilt the same three things. Calder is my attempt to build them once, properly.
22 Oct 2026 · 1 min
TypeScript patterns I actually use in production
No clever type gymnastics, just the handful of patterns that have saved me from real bugs in real codebases.