DEV Community

Joseph
Joseph

Posted on

Fast-Track CBT: A Clean, Zero-Stress Online Testing Platform

GitHub โ€œFinish-Up-A-Thonโ€ Challenge Submission

react#
nodejs#
mongodb#
githubcopilot#
webdevelopment

This is a submission for the GitHub Finish-Up-A-Thon Challenge

๐Ÿ›ก๏ธ What I Built
โšก TL;DR:
Fast-Track CBT is a full-stack, automated testing platform designed to make exams stress-free.

Gives administrators secure, private workspaces to create and manage tests.

Features a high-speed batch-add system to enter 50+ questions in minutes.

Protects students with an auto-submit countdown timer that never loses their work.

Keeps the database perfectly clean with automated cascade deletes.

๐Ÿ“– Description:
A fast and simple online testing platform built for two users: teachers who want to set questions without pulling their hair out, and students who want a smooth testing experience with instant results. It solves the problem of messy exam management and lost student data.

๐Ÿš€ Unique Innovation:
It combines strict database rules ("No Subject = No Question") with a highly polished frontend. Administrators get multi-tenant privacy, while students get a beautiful, mobile-friendly interface to take tests and instantly print clean result documents.

๐Ÿ—๏ธ Architecture Overview:
โšก Complete testing engine built with the MERN stack (MongoDB, Express, React, Node.js).

Demo
Live Website: https://onlinecbt.vercel.app/
GitHub Code: https://github.com/Joseph-fol/Online-CBT.git

Key Features:

๐Ÿ”’ Admin Privacy: Secure multi-tenant architecture so Admin A never sees Admin B's data.

โšก Fast Question Entry: Batch-add feature allows continuous typing and saving without page reloads.

โฑ๏ธ Strict Countdown Timer: Auto-saves and submits the exact second the clock hits 00:00.

๐Ÿ–จ๏ธ Modern UI & Print Feature: Students can instantly generate a clean, official copy of their results.

๐Ÿงน Smart Database Rules: Automated cascade deletes prevent orphaned data.

โš™๏ธ Technical Implementation
๐Ÿค– My Experience with GitHub Copilot:

Use Case: Copilot acted as my smart coding partner to handle the heavy backend logic.

Database Fixes: When I needed to build the cascade delete function, Copilot helped me write the correct Mongoose logic to ensure all child questions were destroyed when a parent subject was deleted.

Frontend State: Copilot sped up the React state management for the live exam timer, allowing me to focus completely on the UI and the print layout.

๐Ÿ› ๏ธ Tools Used: React (Frontend), Node.js & Express (Backend API), MongoDB Atlas (Database), Tailwind CSS (Styling & Print layouts).

๐Ÿ”— Integration Points: REST API connecting a React web dashboard directly to a secure MongoDB cluster with real-time state updates for the exam timer.

๐Ÿ–ผ๏ธ Workflow Sections Overview
๐ŸŒ Data Collection Layer (Admin):
A locked-down UI where subjects act as parent containers, routing hundreds of batch-added questions safely into the database.

๐Ÿง  Processing Core (Backend):
Node.js engine that grades student inputs instantly and strictly enforces data rules (rejecting any question not tied to a subject).

๐Ÿ“จ Notification System (Student):
Instant score calculation displayed beautifully on the screen with a single-click print/share export function.

๐Ÿš€ The Comeback Story (Journey)
๐Ÿ”ง Process: Before this challenge, this project was just a rough draft. The frontend was incomplete, and the database logic was messy. For example, if an admin deleted a test subject, all the old questions would stay behind as junk data. I stopped working on it because the core engine was too confusing.

๐ŸŽฏ Challenges Overcome:

Database Mess: Old questions were getting orphaned. โ†’ Solved by building a strict cascade delete in MongoDB.

Slow Data Entry: Adding questions took too long. โ†’ Solved by coding a seamless batch-add form that clears instantly but keeps the subject locked.

Lost Exams: Students losing work when time ran out. โ†’ Solved by building an auto-submit function tied to the timer state.

๐Ÿ“š Lessons Learned:

Clean database rules are just as important as a pretty frontend.

Building a "multi-tenant" app requires strict logic to keep user data isolated.

GitHub Copilot is incredible for writing boilerplate database schemas, giving developers more time to design.

๐Ÿ“ˆ Impact & Scalability
๐Ÿ’ผ Immediate Value: Reduces teacher workload massively by making question entry fast. Completely removes student anxiety by auto-saving their exam the second time runs out.

๐Ÿข Future Ready: The database is built cleanly enough to handle hundreds of schools and thousands of simultaneous test-takers without data overlap.

๐Ÿ“‹ Current Limitations & Vision
โš ๏ธ Present Limitations:

Basic English-language UI.

Manual admin upgrades (teachers sign up, and the master admin switches their role in the database).

๐Ÿ—“๏ธ Roadmap Vision:

Phase 2: Build an "Unlock Attempt" feature so if a student's internet crashes, an admin can pause and resume their exact test state.

Phase 3: Add email invitations for new teachers.

๐Ÿ”ง Technical Deep Dive: Behind the Architecture
I am excited to share the technical rules that make this platform so stable!

๐Ÿ—๏ธ Why These Technical Choices Matter

Data Isolation (Multi-Tenancy): Security is everything. The backend strictly filters database calls by the Admin's ID, ensuring total privacy between different teachers and schools.

The "No Subject = No Question" Rule: I built the system so a "Subject" (like Biology 101) dictates the overall rules (like the time limit). The database physically rejects any question that tries to save without a parent Subject.

The Cascade Delete Cleaner: This is where the app shines. If an admin permanently deletes a Subject, the database acts as a cleanerโ€”instantly destroying every single Question and Student Result associated with it. Zero junk left behind.

Top comments (0)