A journey through serverless architecture, AI-powered learning, and the evolution of a full-stack quiz generation platform
What is Mindryx?
Mindryx is an AI-powered quiz generation platform that transforms how students interact with their study materials. Upload a PDF or enter any topic, and Mindryx generates tailored multiple-choice quizzes to help you learn more effectively.
Core Features
๐ Intelligent Quiz Generation
Create quizzes from any topic or PDF document. The platform uses advanced OCR (Optical Character Recognition) to extract text from even image-based PDFs, then leverages Google's Gemini Flash 2.0 API to generate contextually relevant questions.
๐ Unlimited PDF Processing
Unlike traditional LLM interfaces with restrictive file upload limits, Mindryx preprocesses PDFs using Tesseract.js OCR before sending them to the AI model. This approach bypasses typical file size constraints while taking advantage of Gemini's generous free tier.
๐ Progress Tracking
Review past quizzes, monitor your learning progress, and identify areas that need more attention. All quiz history and results are stored securely in a Supabase PostgreSQL database.
๐ค Experimental WebLLM Chat
An in-browser AI assistant runs entirely on your local machine, no API costs, no server calls, just pure client-side inference. This experimental feature showcases the future of accessible AI.
Tech Stack
- Frontend: Next.js 15 with App Router, TailwindCSS 4
- Backend: Supabase Edge Functions (Deno runtime)
- Database: Supabase PostgreSQL
- Authentication: Clerk Auth with server-side API protection
- AI/ML: Google Gemini Flash 2.0, WebLLM, Tesseract.js OCR
- Deployment: Vercel
- Payments: Stripe (sandbox experimentation)
The Journey: Solving a Real Problem
The spark for Mindryx came from a frustration every student faces: file upload limits. When studying with AI tools like ChatGPT, I constantly hit walls trying to upload lengthy PDFs or image-based documents. I wanted to generate study materials from my lecture notes and textbooks, but the limitations made it impractical.
That's the problem Mindryx set out to solve unlimited PDF processing combined with AI-generated quizzes, all while leveraging free-tier APIs.
Phase 1: Learning Cloud Architecture with LocalStack
When I started this project, I had a clear goal: understand cloud infrastructure without prematurely committing to AWS costs. I wanted to learn Lambda, API Gateway, DynamoDB, and SQS, the building blocks of serverless architecture, but in a safe, local environment.
Enter LocalStack: A Docker-based AWS emulator that let me experiment freely.
What I Built
The testing branch became a fully functional serverless application running entirely on my machine:
- AWS Lambda functions for quiz generation and data processing
- DynamoDB for NoSQL data storage
- SQS queues for asynchronous job processing
- API Gateway for RESTful endpoints
- SNS for notification experiments
This setup taught me the fundamentals of microservices architecture, event-driven design, queue-based processing, and stateless function execution. More importantly, it taught me Docker, which became crucial for containerized development and understanding modern DevOps practices.
Key Takeaways
Working with LocalStack gave me hands-on experience with serverless patterns before spending a dollar on cloud services. I learned how to structure Lambda functions, manage environment variables, handle cold starts, and design resilient async workflows. The testing branch remains a valuable learning sandbox for trying new AWS patterns.
Phase 2: Migration to Production Infrastructure
After proving the concept locally, I faced a decision: continue with AWS or explore alternatives? I chose Supabase and Vercel for production deployment, and this migration taught me an invaluable lesson, understanding multiple architectural approaches.
Why Supabase + Vercel?
- Supabase Edge Functions: Deno-based serverless functions with excellent PostgreSQL integration
- Built-in PostgreSQL: More familiar than DynamoDB for complex queries and relational data
- Vercel Deployment: Seamless Next.js deployment with automatic optimizations
- Developer Experience: Faster iteration cycles and simpler environment management
The Migration Challenge
Translating my LocalStack architecture to Supabase wasn't just a copy-paste job. I had to:
- Convert Python Lambda functions to TypeScript/Deno Edge Functions
- Redesign data models from NoSQL (DynamoDB) to SQL (PostgreSQL)
- Rethink authentication flow with Clerk's server-side protection
- Implement proper error handling for production environments
This process solidified my understanding of serverless fundamentals that transcend specific platforms, concepts like stateless execution, API design, and async processing apply whether you're using AWS Lambda or Supabase Edge Functions.
Authentication & Payment Integration
Clerk Auth
Implementing authentication from scratch is complex and error-prone. Clerk simplified this dramatically with:
- Pre-built UI components for sign-up/sign-in
- Automatic JWT handling
- Server-side API route protection
- User management dashboard
Integrating Clerk taught me about OAuth flows, session management, and securing API endpoints, all without building everything from scratch.
Stripe Experimentation
While Mindryx isn't monetized yet, I integrated Stripe's sandbox environment to understand payment flows. Though not fully setup, their developer friendly approach makes it obvious why its a favorite for many SaaS applications.
The WebLLM Experiment: AI Without Servers
The most fascinating technical feature in Mindryx is WebLLM, an in-browser AI chat that runs entirely on client-side compute.
Why This Matters
Traditional AI features require:
- Server infrastructure to host models
- API calls that cost money per request
- Network latency for every interaction
WebLLM eliminates all of this. The model downloads once, then runs locally using WebGPU. No API costs, no server dependency, instant responses.
This technology is still experimental, but it represents a paradigm shift. Imagine AI-powered features in web apps that work offline, respect privacy completely, and cost nothing to operate at scale. I included it in Mindryx to raise awareness and showcase what's possible.
Technical Highlights
OCR Pipeline
The PDF processing pipeline was the most technically challenging component:
- PDF.js extracts text from text-based PDFs
- Canvas rendering converts PDF pages to images
- Tesseract.js performs OCR on images to extract text
- Preprocessing cleans and structures the extracted content
- Gemini API generates quiz questions from the processed text
This multi-stage approach handles both native PDFs and scanned documents, working around file size limitations while maximizing the free tier.
Serverless Edge Functions
Supabase Edge Functions run on Deno at the edge, close to users globally. I structured them as:
-
quiz/new- Validates input and queues quiz generation -
quiz/{quizId}- Retrieves quiz data with caching -
submit- Processes answers and calculates scores -
past-quizzes- Aggregates user history with pagination
Each function is stateless, meaning they scale automatically and stay fast under load.
What This Project Taught Me
MVP to Polished Product
Mindryx evolved from a rough proof-of-concept to a near-production SaaS application. This journey taught me:
- Feature prioritization: Focus on core value before adding bells and whistles
- Iterative refinement: Ship something that works, then improve it
- User-centric design: Every technical decision should serve the end user
Cloud Architecture Fundamentals
By working with both LocalStack and Supabase, I developed platform-agnostic knowledge:
- Serverless function design patterns
- Async processing with queues
- Database schema design (both NoSQL and SQL)
- API security and authentication
- Error handling and observability
Docker & DevOps
LocalStack's Docker-based approach gave me practical experience with:
- Container orchestration
- Environment isolation
- Reproducible development setups
- Docker Compose workflows
These skills are transferable to any modern development environment.
Current Status & Future Roadmap
Mindryx is nearly feature-complete as a SaaS product. The core functionality works reliably, authentication is secure, and the UI is polished. A few finishing touches would make it fully production-ready:
Planned Enhancements
- Lesson Generation: Expand beyond quizzes to flashcards and study notes
- Enhanced OCR: Better handling of tables, diagrams, and complex layouts
- Spaced Repetition: Smart scheduling algorithms for optimal retention
- Collaborative Features: Share quizzes and study together
- Export Options: Generate PDFs and Anki decks from quizzes
- Analytics Dashboard: Visualize learning progress and weak areas
Try It Yourself
Mindryx is live at mindryxify.vercel.app
The codebase is open source (MIT License) and available on GitHub. Whether you're interested in serverless architecture, AI integration, or building educational tools, feel free to explore the code and contribute.
Acknowledgments
This project wouldn't exist without incredible open-source tools:
- Supabase for backend infrastructure
- Google AI Studio for accessible Gemini API access
- Clerk for authentication
- Tesseract.js for OCR capabilities
- WebLLM for browser-based AI
- Next.js team for the excellent framework
- LocalStack for AWS emulation during development
Final Thoughts
Building Mindryx was about more than creating a quiz app, it was about understanding modern web development from first principles. By starting with LocalStack's AWS emulation and migrating to Supabase, I gained perspective on different architectural approaches and learned which patterns are universal versus platform-specific.
The biggest lesson? Ship something that solves a real problem. I built Mindryx because I needed it as a student. That authentic need guided every technical decision and kept the project focused on delivering value.
If you're working on your own project, I encourage you to experiment with different architectures, learn by building, and don't be afraid to migrate when you find a better solution. The journey is just as valuable as the destination.
Github: https://github.com/Humza987/Mindryx
About This Post
This blog post was compiled from project README files documenting both the testing and production branches of Mindryx, combined with my personal reflections and scattered thoughts collected throughout the development journey. The narrative was structured and refined with AI assistance to create a cohesive story of the technical evolution and learning experiences behind the project.
Top comments (0)