ACT Exam Preparation Platform

Enterprise EdTech System with Spring Boot

ExpertEdTechSpring BootReactTypeScriptMySQLRedisDocker

This expert-level architectural design prompt guides you through building a comprehensive, production-ready ACT exam preparation platform with Spring Boot backend, React frontend, accurate exam simulation with dual navigation modes, advanced analytics, comprehensive security, and complete DevOps infrastructure. Perfect for EdTech platforms requiring robust assessment systems.

Dual Navigation Modes

Strict Mode for real exam simulation with forward-only navigation, and Learning Mode with free navigation, skip questions, and review capabilities for flexible practice

ACT-Accurate Scoring

Official ACT scoring logic (1-36 scale), composite score calculation, subscores for English and Math categories, percentile rankings, and comprehensive strength/weakness analysis

Tamper-Resistant Timers

Accurate countdown timers with visual alerts, automatic submission on expiration, periodic server synchronization to prevent cheating, and recovery after browser crashes

Comprehensive Architecture

Spring Boot layered architecture, MySQL with Flyway migrations, Redis caching for exam sessions and configurations, JWT authentication, and complete CI/CD pipeline

The Prompt

## Prompt: Design Requirements for Ensar ACT Exam Application – Practice Full Exam Feature

You are a **senior full-stack architect and product requirements expert**.
Your task is to **analyze, structure, and refine requirements** for a **Practice Full Exam feature** in the **Ensar ACT Exam Application**, ensuring parity with the official ACT exam experience while supporting flexible learning workflows.

### Context

The Ensar ACT Exam Application is an online exam-prep platform that allows students to take:

* A **full ACT exam** (all sections in sequence), or
* **Individual section practice** based on study needs

The system must simulate real ACT testing conditions while also offering a learning-friendly mode.

---

## 1. Exam Structure & Rules

Model the official ACT exam format exactly:

* **English**: 75 questions, 45 minutes
* **Math**: 60 questions, 60 minutes
* **Reading**: 40 questions, 35 minutes
* **Science**: 40 questions, 35 minutes

Support:

* Full-length exam sessions
* Single-section practice sessions

Ensure section order, time limits, and question counts match official ACT rules.

---

## 2. Exam Session Management

Design an exam session lifecycle that:

* Tracks current section, question index, responses, time remaining
* Persists progress across refreshes, crashes, and network issues
* Prevents multiple active exam sessions per user

Support **two navigation modes**:

1. **Strict Mode (Real Exam Simulation)**

   * Forward-only navigation
   * No skipping questions
   * No changing answers after submission
2. **Learning Mode (Practice)**

   * Free navigation
   * Skip questions
   * Change answers anytime
   * Review before submission

---

## 3. Timing & Auto-Submission

Implement accurate, tamper-resistant timers:

* Countdown timer per section
* Visual alerts:

  * Green → Yellow → Red
  * Warnings at 5 minutes and 1 minute
* Automatic submission on time expiration
* Optional pause/resume (configurable)
* Periodic server synchronization to prevent cheating
* Recovery after browser crash or disconnection

---

## 4. Question Navigation & UI Behavior

Define UI behavior for question presentation:

* One question per screen
* Proper rendering of text, images, and math formulas
* Multiple-choice answers (A–D)
* Question palette with status indicators:

  * Green: Answered
  * Yellow: Marked for review
  * Gray: Unanswered
  * Blue border: Current question

Track:

* Time spent per question
* Navigation order
* Answered vs unanswered counts
* Mark-for-review state

---

## 5. Section Transitions

After section completion:

* Display a transition screen summarizing progress
* Optionally show preliminary scores
* Prevent returning to completed sections
* Seamlessly advance through all four sections
* Automatically finalize exam after last section

---

## 6. Scoring & Results

Implement official ACT scoring logic:

* Convert raw scores to scaled scores (1–36)
* Calculate composite score (rounded average)
* Generate subscores:

  * English (Usage/Mechanics, Rhetorical Skills)
  * Math (Pre-Algebra, Algebra, Geometry, etc.)

Results dashboard must include:

* Composite score
* Section scores with charts
* Percentile rankings
* Strength/weakness analysis
* Full question-level review with explanations

---

## 7. Post-Exam Review & Analytics

Design a detailed review mode:

* Show student answer vs correct answer
* Highlight answers with color coding
* Display explanations
* Show time spent per question
* Filter questions:

  * All
  * Correct
  * Incorrect
  * Marked for review

Provide analytics:

* Performance by section
* Difficulty level
* Question category
* Subscore areas

Allow:

* Adding weak areas to a personalized study plan
* Accessing similar practice questions

---

## 8. Technical Architecture Constraints

Backend:

* Spring Boot (Java 17+)
* Layered architecture (Controller, Service, Repository)
* MySQL 8.x
* Audit fields, soft deletes, indexing
* Flyway migrations

Frontend:

* React 18 + TypeScript
* Redux Toolkit or Zustand
* Modular, reusable components
* Error boundaries
* React Query for API caching

---

## 9. Authentication & Authorization

* JWT-based authentication
* Strict ownership enforcement (users access only their exams)
* Prevent concurrent exam sessions
* Log and block session hijacking attempts

---

## 10. Caching Strategy

* Redis for:

  * Exam configurations
  * Question data
  * Scoring tables
  * Active exam sessions
* Cache warming & TTL policies
* Safe cache key design
* Frontend caching via React Query

---

## 11. Logging & Monitoring

Log:

* Exam start/end
* Section transitions
* Answer submissions
* Timer expirations
* Security events

Include:

* User ID, session ID, timestamps
* Structured logs
* Performance metrics
* Daily rotation, 90-day retention

---

## 12. Validation & Error Handling

* DTO validation (Bean Validation)
* Business-rule validation at service layer
* Custom exceptions:

  * ExamNotFound
  * UnauthorizedAccess
  * TimeExpired
  * InvalidNavigation
* Global exception handler
* Frontend validation using React Hook Form
* XSS and SQL injection prevention

---

## 13. Testing Expectations

Cover:

* Unit tests (services, utilities)
* Integration tests (full exam flow)
* Controller tests (MockMvc)
* E2E tests (exam lifecycle)
* Frontend tests (React Testing Library)

Requirements:

* ≥80% coverage
* Timer edge cases
* Auto-submit accuracy
* Strict mode enforcement

---

## 14. Security, Performance & DevOps

Security:

* HTTPS enforcement
* Rate limiting
* Secure secrets handling
* Token expiration & refresh

Performance:

* Indexed queries
* Pagination
* Lazy loading
* Gzip compression
* Optimized timers

DevOps:

* Dockerized deployment
* Multiple environments
* Zero-downtime deployment
* Health checks
* CI/CD with quality gates

---

## 15. Documentation & Code Quality

* Javadoc for backend
* Inline comments for complex logic
* Swagger/OpenAPI docs
* Consistent formatting
* Conventional commits
* SOLID principles

---

### Objective

Use this prompt to **generate designs, checklists, architecture diagrams, API contracts, test plans, or implementation guidance**—without directly writing application code—while maintaining enterprise-grade quality suitable for the Ensar EdTech platform.

Comprehensive Design Requirements (15 Areas)

Exam Structure & Rules
Exam Session Management
Timing & Auto-Submission
Question Navigation & UI
Section Transitions
Scoring & Results
Post-Exam Review & Analytics
Technical Architecture
Authentication & Authorization
Caching Strategy
Logging & Monitoring
Validation & Error Handling
Testing Expectations
Security, Performance & DevOps
Documentation & Code Quality

Tips for Using This Prompt

  • Requirements Document: This prompt generates a comprehensive requirements and architecture document that serves as a blueprint for engineering, QA, product, and DevOps teams building enterprise EdTech platforms.

  • ACT Accuracy: Ensure accurate ACT exam simulation with proper section structure (English: 75q/45min, Math: 60q/60min, Reading: 40q/35min, Science: 40q/35min), realistic timing with visual alerts, and accurate scoring (1-36 scale with subscores).

  • Dual Navigation Modes: Design both Strict Mode (forward-only navigation, no skipping, real exam conditions) and Learning Mode (free navigation, skip questions, review before submission) to support different learning workflows.

  • Session Management: Implement robust session lifecycle with progress persistence across refreshes/crashes, prevention of concurrent exam sessions, tamper-resistant timers with server synchronization, and automatic recovery mechanisms.

  • Comprehensive Testing: Design unit tests (≥80% coverage), integration tests for full exam flow, controller tests with MockMvc, E2E tests for exam lifecycle, and frontend tests with React Testing Library including timer edge cases and auto-submit accuracy.

  • Production-Ready Infrastructure: Include Docker containerization, MySQL with Flyway migrations, Redis caching with cache warming strategies, JWT authentication, complete CI/CD pipeline with quality gates, and comprehensive monitoring.