Inspiration
School systems haven't evolved in decades, and private tutors are way too expensive for the average student. I wanted to use my summer vacation to build something meaningful for my portfolio that could democratize high-level learning. The goal was to bridge the gap between rigorous academic preparation (like math competitions and exams) and engaging internet/space culture. Why can't a physics problem be about Stephen Curry launching a three-pointer from a NASA lunar base? AIMRoyale was born from the idea that education shouldn't be a boring lecture—it should be a gamified arena.
What it does
AIMRoyale is a free, gamified space-math arena that aligns directly with actual school curricula and science chapters (such as Universal Gravitation or Quadratic Functions). Powered by Alibaba Cloud's Qwen-Max model, it dynamically generates 100% custom problems tailored to the user's grade, class, and skill level.
Instead of generic quizzes, students navigate through high-stakes space scenarios. The platform features an intelligent, privacy-first memory agent that tracks specific academic weaknesses cross-session. It turns studying into an interactive video game where players actively learn from their mistakes.
How we built it
I spent 5 hours a day orchestrating this system from scratch:
- Frontend: Built with standard JavaScript, HTML, and CSS, fully optimized and wrapped as an installable PWA (Progressive Web App) for mobile accessibility.
- Backend: Engineered a secure Node.js Express proxy deployed on Render to safely route requests to the
/api/generateendpoint, keeping production-grade security intact. - AI Core: Integrated Alibaba Cloud's API to leverage the reasoning power of the Qwen-Max LLM.
- State & Logic: Architected a zero-database context engine using a custom
LocalMemoryAgentloop built on top of the Web Storage API (localStorage). - Optimization: Wrote a custom Smart Decay Algorithm that automatically flushes old error logs out of the prompt context once a student hits a 3-answer consecutive winning streak, drastically reducing token consumption.
Challenges we ran into
- API Key Exposure: Initially, querying the LLM directly from the client exposed our credentials in the network tab. I had to learn how to build and deploy a backend proxy to completely obfuscate the Alibaba Cloud API Key.
- Database Fatigue: I experimented with integrations like Firebase but realized I wanted a zero-login, privacy-first, instantaneous onboarding experience. Overcoming this meant pushing
localStorageto its absolute limits to handle multi-session structured learning telemetry. - Context Bloat: Raw error logging quickly clogged the prompt context, making queries slower and expensive. Designing the logic for the Smart Decay Algorithm to seamlessly "forget" mastered concepts was a heavy math and prompt engineering hurdle.
Accomplishments that we're proud of
As a 16-year-old solo developer, I am incredibly proud of executing a full-stack, production-ready architecture in just a week of summer vacation. I managed to build an advanced, context-aware AI coach that adapts to user mistakes without needing a massive, expensive server-side database. Successfully packaging the engine as a functional PWA that runs perfectly on mobile is a massive milestone for my coding journey.
What we learned
I gained a ton of real-world, professional experience. I learned how to treat LLMs as dynamic state engines rather than simple text generators by feeding them structured local data. More importantly, I discovered how to leverage AI as a force multiplier, using it to accelerate my learning.
What's next for AIMRoyale
This is just the baseline infrastructure for a global educational platform:
- Rich Media: Automatically generating and attaching tailored meme images to every single problem created by the engine.
- Gamification: Implementing a fully open-source peer-to-peer leaderboard and trophy system.
- Deep Tracking: Next year, I plan to completely rewrite this project from scratch to implement advanced AI telemetry capable of analyzing long-term learning rhythms.
- Community First: Keeping the repository 100% open-source so anyone, anywhere, can deploy it to help kids who can't afford private education.
Built With
- alibaba-cloud-api
- css
- express.js
- html
- html5
- javascript
- localstorage-api
- node.js
- pwa
- qwen-max-model
- render
Log in or sign up for Devpost to join the conversation.