Inspiration
Learning resources are widely available, but personalized programming guidance is still difficult and expensive to access. Beginners are often expected to choose their own level, combine unrelated tutorials, and continue learning without knowing whether they have understood the fundamentals.
We wanted to build a structured learning platform that responds to actual learner performance. Instead of presenting the same fixed course to everyone, Code Learning Assistant uses placement results, exercise submissions, quiz answers, and learning progress to select an appropriate starting point and recommend what to do next.
AI is one part of this system, not the entire product. We use it where flexible content and contextual explanation are valuable, while keeping assessment rules, grading, permissions, progress tracking, safety controls, and business logic inside the application.
What it does
A learner begins by choosing a programming language and completing a placement test containing conceptual questions and coding tasks. The learner cannot manually select a skill level. The application scores the available evidence and assigns a beginner, intermediate, or advanced starting point using defined assessment rules.
Based on that result, Google Gemini helps produce a personalized syllabus and course material containing lessons, exercises, and quizzes. The generated material is stored as normal application data, so it can be reviewed, versioned, reported, hidden, or regenerated instead of being displayed as an uncontrolled chat response.
Learners receive a dashboard with their most recent course, a complete course library, a daily plan, progress tracking, and a clear next learning step. Lessons provide structured explanations and an AI Teacher for contextual questions. Learners can also request a focused adjustment to a lesson, preview the result, and decide whether to use it or keep the original.
Coding exercises use Monaco Editor and autosaved drafts. Judge0 executes code in a sandbox and grades submissions against public and hidden tests. Learners can run code with custom input, submit solutions, inspect previous attempts, view test results, and compare code without replacing their current draft.
Incorrect quiz answers and failed exercises enter a mistakes notebook and return through spaced review. Learners can request additional practice for specific or weak topics, while the Progress page explains their assessed level and topic mastery.
After all current courses are completed, the platform evaluates recent performance and prepares three next-step course directions covering core skills, problem solving, and applied projects.
How we built it
We designed and implemented the product experience, frontend, backend architecture, database model, assessment flow, code-grading workflow, background processing, content-review tools, monitoring, tests, and deployment pipeline.
The frontend is built with React, TypeScript, Vite, Tailwind CSS, TanStack Query, and Monaco Editor. The backend uses FastAPI, Pydantic, SQLAlchemy, Alembic, PostgreSQL, and Redis.
The backend follows a layered architecture. API routes depend on application services, application services depend on domain interfaces, and SQLAlchemy repositories handle persistence. This keeps business rules separate from infrastructure and allows external services to be replaced or tested independently.
Gemini is connected through an AI provider interface. It is used for generating course material, lesson explanations, tutoring responses, practice exercises, and lesson adjustments. The surrounding application controls when generation is allowed, what context is provided, how responses are validated, how usage limits are enforced, and where generated content is stored.
Long-running curriculum generation runs in a dedicated worker instead of blocking API requests. Generation jobs are persisted in PostgreSQL, processed in batches, retried when provider responses fail, and displayed through progress updates. Redis provides shared rate limiting across API processes.
Judge0 is responsible only for sandboxed code execution. The application decides which tests to send, keeps hidden tests on the backend, stores submission results, and updates learner progress.
Firebase Authentication verifies user identity. Stripe support provides the foundation for subscription plans and usage entitlements. The production system runs in Docker containers on Google Compute Engine, with Caddy providing HTTPS and routing. GitHub Actions runs backend checks, frontend linting, and production builds before deploying successful changes.
Challenges we ran into
One major challenge was making generated educational content reliable enough to become part of a structured course. Model responses had to follow expected schemas, preserve the requested topic, include valid exercises and quizzes, and remain useful at the learner's assessed level.
We addressed this with structured generation requests, schema validation, batch processing, retry policies, version history, and preview-before-apply workflows. Generated lessons enter a review queue, and administrators can compare versions, mark content as reviewed, hide unsuitable material, or regenerate a lesson, exercise, or quiz with additional instructions.
Another challenge was separating flexible AI behavior from deterministic application rules. Authentication, permissions, subscription limits, assessment thresholds, progress calculation, grading, and review scheduling should not depend on a model response. We implemented those areas as regular backend logic and use AI only where flexible generation or explanation adds value.
We also had to design a coding workflow that does not frustrate learners. Run and Submit have different purposes, feedback must remain visible until the learner is ready to continue, and opening an old submission should not overwrite current work. These details required deliberate frontend state management and visual regression testing.
Production reliability was another challenge. Background generation can fail because of rate limits, malformed responses, or temporary provider problems. We added worker retries, job recovery controls, request IDs, and monitoring for frontend errors, API 500 responses, AI generation failures, and worker retries.
Accomplishments that we're proud of
We are proud that Code Learning Assistant supports a complete learning workflow rather than a collection of disconnected AI features.
A learner can choose a language, complete an assessment, receive a personalized course, read lessons, write and execute code, take quizzes, review mistakes, track progress, request additional practice, and continue into the next set of courses.
We also built a substantial administrative workflow. Administrators can select a learner, inspect their generated courses, review pending content, compare structured versions, regenerate individual lessons or assessments, respond to learner reports, recover generation jobs, and inspect production monitoring events.
The project includes 153 passing backend tests and 14 Playwright end-to-end visual workflows covering the primary learner and administrator experiences. It is deployed as a working application on Google Compute Engine rather than existing only as a local prototype.
What we learned
We learned that adding AI to a product does not remove the need for traditional software engineering. In practice, AI features require more validation, monitoring, recovery tools, and user controls because model output is not always predictable.
We also learned to separate responsibilities clearly. The application should own identity, authorization, assessment rules, progress, grading, quotas, and persistence. AI should provide flexible content and contextual assistance within those boundaries.
Human review remains important. Generated material can reduce repetitive authoring work, but people still need to define educational goals, inspect exceptions, respond to reports, and decide what quality means for the product.
The most useful AI experience is not necessarily the most visible one. A focused next step, an appropriately difficult exercise, or a helpful lesson adjustment may provide more value than a large chatbot interface.
What's next for Code Learning Assistant
Our next step is to test the platform with more learners and measure course completion, exercise pass rates, review retention, and seven-day engagement. We plan to improve assessment using a larger window of learning evidence, add educator analytics, expand language and localization support, and make reviewed high-quality content reusable without removing personalization.
The long-term business model is freemium. Free learners receive limited language tracks and AI usage, while paid subscriptions unlock additional languages, tutoring, practice, and curriculum generation.
As the platform grows, it could also support new work for curriculum reviewers, programming coaches, localization specialists, learner-support staff, and subject-matter experts. AI can reduce repetitive content production, while people remain responsible for educational quality, learner support, and professional judgment.
Built With
- docker
- fastapi
- judge0
- postgresql
- python
- react
- redis
- typescript
- vite
Log in or sign up for Devpost to join the conversation.