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.”
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
Production Platform & Specimen Gallery
High-fidelity interface captures of the live PrepXIQ ecosystem, illustrating the responsive desktop portal and the Capacitor Android mobile surface.










“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.”