EdTech / Examination Systems• Systems Architect, Product Designer, Full-Stack Lead• 2026

PrepXIQ

Engineering an EdTech Platform Under Tight Infrastructure Constraints

“Building an EdTech platform where the hardest part was not making it work. It was making it hold together.”

ACTIVE ASPIRANTS600+ Trained4.1 / 5.0 verified student rating
WRITE REDUCTION94% Traffic SavedClient FSM batching eliminated connection starvation
MEDIA PIPESZero Host CostYouTube stream authorization proxy + Drive edge binary pipe
STATE RECOVERY100% Zero-LossSession resurrect & 30s throttled autosave sync
Engineered With
Next.js 16React 19TypeScriptSupabase SQLCapacitor 8 (Android)CloudinaryYouTube Embed APIRazorpay & PhonePe

Executive Overview

PrepXIQ is a competitive examination and academic preparation platform engineered for students tackling high-stakes assessments, including NEET, JEE, CTET, JKSSB, and state board curricula. It consolidates video lecture delivery, structured chapter notes, timed mock assessments with negative marking, test pack bundles, batch progress tracking, and multi-gateway payment processing into a unified ecosystem.

The Problem: Fragmented Exam Workflows & Network Instability

Traditional competitive exam preparation in India is severely fragmented across disconnected apps, creating cognitive friction and data loss.

  • Students watch lectures on YouTube but find formula sheets scattered across chaotic WhatsApp or Telegram channels.
  • Mock exams are attempted on slow legacy portals riddled with intrusive popups and latency spikes.
  • Progress tracking is managed manually on paper, leaving students blind to percentile rank trajectories.
  • Students in semi-urban and rural areas frequently encounter degraded 3G or unstable mobile networks, leading to lost answers when naive platforms drop connections.

The Constraints: Building Without Enterprise Budgets

PrepXIQ was engineered under strict capital, network bandwidth, and database transaction boundaries. Operating an EdTech application serving hundreds of concurrent examinees typically incurs prohibitive cloud expenses.

Video Delivery via YouTube

Video hosting and multi-bitrate transcoding are cost-prohibitive. PrepXIQ wraps unlisted YouTube streams inside a server-side authorization proxy (/api/lesson/[id]/stream) and a custom React player overlay, retaining complete control over student progress tracking without incurring bandwidth bills.

Encrypted Document Proxy via Google Drive

PDF revision notes and formula sheets are hosted on Google Drive but piped through an authenticated Next.js zero-knowledge binary streaming proxy (/api/notes/[noteId]/view), keeping origin storage lean while shielding raw source URLs.

Targeted Database Scope on Supabase

Supabase PostgreSQL is strictly reserved for high-value relational operations: student accounts, batch enrollments, test state snapshots, transactional payments, and institutional analytics.

Modular System Architecture

┌────────────────────────────────────────────────────────┐
│                   PREPX STUDENT CLIENT                 │
│      Next.js App Router · Capacitor 8 Android Bridge   │
└────────┬──────────────────┬──────────────────┬─────────┘
         │                  │                  │
         ▼                  ▼                  ▼
┌────────────────┐ ┌────────────────┐ ┌────────────────┐
│  SUPABASE SQL  │ │ CLOUDINARY CDN │ │  YOUTUBE PIPES │
│  PostgreSQL 15 │ │ Dynamic Media  │ │ Video Lectures │
│  Auth & Data   │ │ Optimization   │ │ Stream CDN     │
└────────────────┘ └────────────────┘ └────────────────┘

Hybrid Android Packaging via Capacitor 8

The mobile app connects via a remote origin bridge (server.url: https://www.prepxiq.com) inside BridgeActivity with webDir: "out" fallback. It requests only android.permission.INTERNET, preserving a minimal installation footprint.

Next.js Stream & Document Gateways

Server-side route handlers enforce user authentication and enrollment checks before returning stream embeds or piping binary PDF streams with inline disposition and nosniff security headers.

Multi-Gateway Payment Engine

Abstracted PaymentProvider architecture supporting both Razorpay and PhonePe dynamically via environment configuration, with cryptographic HMAC signature validation and anti-spoof server order notes.

The Hardest Subsystem: Examination Engine Under Database Limits

A naive implementation writes every answer to the database. Under 500 concurrent students taking a 100-question test over 60 minutes, a per-interaction write model generates over 535,000 requests in a single hour, causing connection starvation and UI lag.

PrepXIQ modeled the active exam session as an in-memory client-side finite state machine (FSM). All questions are fetched in one initial batch with answer keys and explanations stripped. Option selection, answer toggling, question navigation, and marked-for-review flags execute strictly in local React state with zero database calls.

A background effect auto-saves answers in 30-second throttled pulses, capping periodic saves at 120 requests per student for a 60-minute test regardless of how many times choices were changed.

Final scoring executes in a single atomic PostgreSQL stored procedure (submit_exam_answers). The procedure validates that the attempt was not previously submitted, loops through questions, applies negative marking, computes elapsed seconds, upserts the record, and emits an in-app notification in a single transaction, reducing live exam write traffic by approximately 94 percent.

Production Failures Solved

Incident: NextAuth Provider Identifier Collisions
Root Cause: Both Student and Admin portals were defaulting to the shared credentials provider ID, triggering false "Invalid credentials" rejections.
Resolution: Segregated provider IDs (signIn("student") vs signIn("admin")) and sanitized mobile numbers prior to cryptographic hash comparison.
Incident: Registration Intake Schema Blocker
Root Cause: Supabase strict schema threw null value in column "registration_number" under rapid admissions.
Resolution: Hardened /api/registrations/route.ts with atomic UUID generation fallbacks and server-side FormData validation.
Incident: Exam Re-Submission Race Conditions
Root Cause: Network latency prompted anxious students to double-tap submit, triggering concurrent queries that risked overwriting existing scores.
Resolution: Migration 017 added a strict submitted_at IS NOT NULL exception guard in PostgreSQL submit_exam_answers RPC alongside optimistic UI button locking.

Production Platform & Specimen Gallery

High-fidelity interface captures of the live PrepXIQ ecosystem, illustrating the responsive desktop portal and the Capacitor Android mobile surface.

DESKTOP PORTAL / 1440x900
PrepXIQ Desktop Platform Overview
Desktop Platform Panoramic View: Primary student landing experience, real-time course discovery, and Cloudinary edge banner optimization.
CAPACITOR ANDROID / DISCOVERY
Mobile Hero Discovery
Mobile Landing & Discovery: Dynamic category chips (NEET, JEE, Board), live student metrics, and sticky mobile navigation.
CAPACITOR ANDROID / CATALOG
Course Catalog Matrix
Course Catalog Matrix: Filterable academic streams, batch schedules, and enrollment pricing indicators.
CAPACITOR ANDROID / CURRICULUM
Curriculum Hierarchy
Curriculum & Module Hierarchy: Structured syllabus breakdown detailing modules, video lectures, and preview tags.
CAPACITOR ANDROID / ASSESSMENTS
Mock Tests Hub
Mock Test Assessment Hub: Centralized examination lobby indexing timed mock tests, durations, and completion states.
CAPACITOR ANDROID / PACKS
Test Packs & Bundles
Tiered Test Packs: Examination bundles catalog supporting multi-test purchases verified via payment abstractions.
CAPACITOR ANDROID / NOTES
Study Notes Vault
Encrypted Study Notes Vault: Curated revision material streaming through the authenticated Google Drive proxy.
CAPACITOR ANDROID / AUTH
Unified Auth Card
Unified Authentication Card: Minimalist brand login card with phone number normalization and isolated roles.
CAPACITOR ANDROID / SCHOLARSHIP
Scholarship Gateway
Scholarship Examination Gateway: Dedicated regional scholarship exam portal, slot selection, and eligibility policies.
CAPACITOR ANDROID / FACULTY
Faculty Directory
Faculty Directory & Mentorship: Dedicated mentor directory presenting subject specializations and credentials.
Staff Architecture Verdict
“By isolating high-egress multimedia pipelines into specialized zero-marginal-cost edge CDNs and decoupling the assessment lifecycle into an in-memory client-side finite state machine with transactional stored-procedure scoring, PrepXIQ delivered high-concurrency academic simulations while eliminating 94% of operational database write pressure on a constrained infrastructure profile.”