TerraNova (standardized test)

https://terranovaprep.com/

My wife and I wanted to make an app that we could use to supplement our kids studying for a standardized test later this year. Hardest part (and still having some issues) is with generating graphics accurately for some of the math problems (drawing a clock, ensuring if a problem says something is underlined it actually is underlined). Also worked thru database schema challenges. I asked the replit agent to generate more details which I’ll share below.

Building an AI-Powered TerraNova Test Preparation Platform on Replit

Project Overview

TerraNova Test Prep is an adaptive educational platform designed to help elementary and middle school students prepare for TerraNova standardized tests. The application uses AI to generate personalized practice questions, quizzes, worksheets, and provides detailed feedback to help students improve their performance across math, verbal, science, and social studies subjects.

Key Features

  • AI-Generated Practice Questions: Custom-tailored practice questions for different grade levels, subjects, and difficulty levels
  • Adaptive Learning: Questions automatically adjust based on student performance, focusing more on weak areas
  • Subject-Specific Quiz Generator: Creates balanced quizzes across multiple subjects with appropriate grade-level content
  • Worksheet Generator: Produces downloadable PDF worksheets for offline practice
  • Performance Analytics: Tracks student progress and identifies concepts needing improvement
  • Question Validation System: Ensures generated questions match the requested subject
  • Intelligent Caching: Improves performance and handles high traffic efficiently

Technical Implementation

The application is built with a modern tech stack:

  • TypeScript/Node.js backend with Express
  • React frontend with Tailwind CSS
  • SQL database for storage (via SQLite on Replit)
  • Claude AI integration for question generation and educational feedback
  • PDF generation for printable worksheets

Challenges and Solutions

Challenge 1: Question Subject Accuracy

One of the biggest challenges we faced was ensuring AI-generated questions stayed on topic. Initially, the AI would drift between subjects, sometimes providing math questions when science was requested.

Solution: We implemented a sophisticated multi-stage validation system:

  • Pattern-based subject detection to identify subject-specific keywords
  • Fingerprinting questions to categorize them accurately
  • Strict validation filters to remove off-topic questions
  • Fallback to pre-vetted questions when generation fails

The validation system successfully improved subject accuracy from ~65% to over 95%.

Challenge 2: Performance Optimization

Generating questions with AI is computationally expensive and sometimes slow, affecting user experience.

Solution: We built a comprehensive caching system:

  • In-memory cache for fastest access
  • Persistent file cache for resilience
  • Intelligent mixing of cached and fresh questions
  • Deduplication to prevent repeated content
  • Background pre-generation of common question types

This reduced average response times from 5-8 seconds to under 1 second for most requests.

Challenge 3: Educational Grade Appropriateness

Ensuring content matched the specific grade level was crucial but challenging to enforce with AI.

Solution:

  • Created grade-specific prompt templates with educational guidelines
  • Built a feedback loop to improve grade appropriateness over time
  • Implemented strict validation of grade-level vocabulary and concepts
  • Maintained a backup bank of verified grade-appropriate questions

Challenge 4: Question Diversity and Balance

Early quiz versions would generate repetitive questions or focus too much on a single concept.

Solution:

  • Developed seed-based question generation for content diversity
  • Implemented subject distribution algorithms to balance content
  • Created question interleaving to prevent clustering of similar questions
  • Built adaptive distribution based on student performance data

Challenge 5: Deployment on Replit

Deploying an AI-heavy application with multiple integrations on Replit presented some unique challenges.

Solution:

  • Optimized the application for Replit’s environment
  • Implemented graceful degradation when resources were constrained
  • Used environment variables for sensitive credentials
  • Structured the application to maintain performance under Replit’s resource limits

Lessons Learned

  1. AI Content Generation Requires Guardrails: Even advanced AI models need robust validation and fallback systems to ensure reliability and accuracy.
  2. Caching Is Critical: Effective caching strategies dramatically improve performance and user experience when working with resource-intensive operations.
  3. Testing Across Subjects Matters: We discovered that different subjects (math, science, etc.) had unique challenges in content generation that required specialized handling.
  4. Adapting to Student Needs Works: The most successful feature was the adaptive question selection that focused on areas where students struggled, demonstrating the value of personalized education.
  5. Replit Provides Great Developer Experience: Despite initial concerns about running a complex AI application, Replit’s platform proved capable of handling our requirements with proper optimization.

Final Thoughts

Building TerraNova Test Prep on Replit demonstrated how powerful the platform can be for complex educational applications. The combination of AI-generated content, robust storage, and responsive frontend provides students with a personalized learning experience that adapts to their needs and helps them build confidence for standardized tests.

3 Likes

I’m homeschooling my kids, this is awesome. Amazing work so far, its great stuff. I like how it explains the answers at the end. Are you queuing ChatGPT to generate the questions in the background? So far its pretty cool what you were able to build, keep us posted as you progress this is cool stuff.
my app is at app.izios.com if you are curious, I’m still in the process of getting the white diamonds to import, there is about 800k of them so its taking some more clever coding to get all that to work correctly and do hourly refreshes of the inventory and archiving of old diamonds and what will be purchased items. Right now only fancy diamonds are loading, around 11k of them so there is not much to look at yet.

1 Like

Thanks! https://izios.com/ looks good! are you creating a separate backend app the handles the automation/cron updates? MongoDB for your database? I’m working on a financial app for my company now too so back and forth between educational/book/game apps and more professional focused apps. My new approach here is to create my own API server that works with the backend/database management with external APIs, then I use it in other apps to avoid database management entirely (just API calls back to my dedicated server).

Very elegant app. Well done

1 Like