# BrainBattle — Comprehensive Platform Specification (LLMs Full Context) ## 1. Executive Summary & Core Mission BrainBattle is an enterprise-grade, cloud-native aptitude testing, recruitment assessment, and student competitive arena platform. Built to revolutionize how colleges prepare candidates for campus placement drives and how enterprises evaluate candidate cognitive capability, BrainBattle combines engaging gamification with strict anti-cheating proctoring controls. - **Official Website**: https://brainbattle.fortunecloudindia.com - **Target Audience**: Engineering & Degree College Students, Job Aspirants, College Placement Cells (TPO), Universities, and Corporate Talent Acquisition Teams. - **Key Proposition**: Eliminate test malpractice while delivering lightning-fast, mobile-first assessments with instant analytics. --- ## 2. Assessment Domains & Question Categorization BrainBattle organizes questions across foundational cognitive and technical evaluation pillars: 1. **Quantitative Aptitude**: - Arithmetic, Algebra, Geometry, Number Theory, Percentages, Profit & Loss, Time & Work, Speed Distance & Time, Permutations & Combinations, Probability. 2. **Logical & Analytical Reasoning**: - Syllogisms, Blood Relations, Seating Arrangements, Coding-Decoding, Series Completion, Direction Sense, Critical Thinking, Venn Diagrams. 3. **Verbal Ability & Reading Comprehension**: - Grammar & Syntax, Vocabulary, Synonyms & Antonyms, Sentence Correction, Para Jumbles, Reading Comprehension Passages, Idioms & Phrases. 4. **Technical & Computer Science**: - Programming Fundamentals (C, C++, Java, Python, JavaScript), Data Structures & Algorithms, Database Management Systems (SQL), Operating Systems, Computer Networks. 5. **Data Interpretation**: - Bar Charts, Pie Charts, Line Graphs, Data Sufficiency, Tabular Data Interpretation. Each question supports: - **Difficulty Grading**: Easy, Medium, Hard. - **Marks Configuration**: Positive scoring, customizable negative marking (e.g., +1 / -0.25). - **Rich Media**: Image diagrams for pictorial reasoning questions and option diagrams. - **Comprehensive Solution Explanations**: Step-by-step mathematical proofs and logical deductions shown post-submission. --- ## 3. Anti-Cheating & Proctoring Engine BrainBattle features a proprietary, browser-based anti-cheating suite designed specifically for desktop, Android, iOS Safari, and PWA standalone environments: ### A. Real-Time Application & Screen Switch Detection - Multi-event tracking leveraging `visibilitychange`, `pagehide`, `pageshow`, `blur`, `focus`, `freeze`, and `resume`. - Detects switching browser tabs, navigating to the Home screen, switching to secondary apps, opening Control Center / Notification Center, and incoming call popups. - Strict violation threshold enforcement (e.g., maximum 3 violations permitted before automatic irreversible exam submission). ### B. Hardware Screenshot & Screen Capture Blackout - 0ms DOM blackout engine: Upon detection of hardware screenshot shortcuts (Volume Down + Power, Volume Up + Power, PrintScreen, Snipping Tool, 3-finger swipe gestures), the entire exam interface is instantly obfuscated with dynamic blur and privacy shields. - Dynamic semi-transparent session watermark overlay containing candidate UUID, session timestamp, and assessment metadata. ### C. iOS & Mobile Navigation Trap - Natively blocks WebKit back-swipe gestures via `touch-action: pan-y` and `overscroll-behavior-x: none`. - History state entrapment (`history.pushState` + `popstate` intercept) prevents exiting tests via browser back buttons without explicit confirmation. - Disables text selection (`-webkit-user-select: none`) and iOS callout lookup menus (`-webkit-touch-callout: none`). ### D. Server-Client Wall-Clock Synchronization - Exam durations and per-question timers are computed using synchronized server wall-clock timestamps (`targetEndMs`), rendering local client clock manipulation or page refresh cheats completely ineffective. --- ## 4. Multi-Tenant Role Architecture BrainBattle enforces Role-Based Access Control (RBAC) across distinct user tiers: 1. **Superadmin**: - Global question bank management, category hierarchy configuration, platform telemetry, global contest creation, and institutional onboarding. 2. **College Administrator & Faculty**: - Department and batch management, classroom candidate invitations, custom test blueprint authoring, real-time exam monitoring, scorecard exports (Excel/CSV), and team access control. 3. **Student / Candidate**: - Personalized dashboard, practice arenas, assigned college exams, instant detailed scorecards, state/national leaderboards, and accuracy analytics. --- ## 5. Question Set Blueprint Builder & Bulk Import - **Bulk Excel/CSV Import**: Intelligent parser supporting `.xlsx`, `.xls`, and `.csv` with auto-validation of options, correct answers, categories, difficulty tags, and solution explanations. - **Duplicate Prevention Engine**: Detects database-wide exact match duplicates and within-file duplicate collisions before saving. - **Blueprint Generator**: Enables administrators to specify exact category quotas (e.g., 20 Quant + 15 Logic + 15 Verbal) and custom difficulty ratios for randomized, unique candidate test papers. --- ## 6. Technical Stack & Infrastructure - **Frontend Framework**: React 18 with Vite, Vanilla CSS design tokens with TailwindCSS utilities, Lucide React icon suite. - **Mobile Capabilities**: Progressive Web App (PWA) with offline asset caching, standalone display mode, safe-area inset adaptation for iPhone Dynamic Island and notches. - **Backend**: Node.js & Express.js REST API with structured controllers, Prisma ORM, PostgreSQL database with relational indexing. - **Security**: JWT session authentication, bcrypt password hashing, helmet security headers, rate limiting, and CORS policy enforcement. --- ## 7. Frequently Asked Questions (FAQs) **Q: Can candidates take tests on mobile phones?** A: Yes, BrainBattle is 100% responsive and optimized for mobile browsers and PWA standalone installation on iOS and Android. **Q: What happens if a student's internet disconnects during an exam?** A: BrainBattle auto-saves answers locally every 30 seconds and synchronizes with the server upon reconnection. The wall-clock timer ensures fair remaining time calculation. **Q: Can colleges conduct campus placement drives on BrainBattle?** A: Yes, colleges can generate unique test access codes, restrict tests to enrolled batches, and download consolidated placement score reports.