The Thesis Project
RataTutor started as our university thesis project: build a study assistant that turns a student's notes into flashcards, quizzes and summaries, and gives each study material its own AI chat.
The idea was simple. The execution took a team.
Leading a Team of Five
This was the first time I led a development team, and it taught me that the code was the easier part.
What was hard:
- Splitting frontend and backend work between five people
- Agreeing on coding standards
- Merge conflicts and code reviews
- Keeping everyone going through deadline weeks
What worked:
- Clear ownership. Each person owned a feature from the database to the screen.
- Code review. Nothing merged without another team member approving it.
- Writing things down. Documentation written while coding was better than documentation written afterwards.
The AI Context Problem
The most interesting technical problem was not calling the model. It was managing the conversation.
A model can only read so much text at once. As a chat grows you have to cut something, but if you simply drop the oldest messages the tutor forgets what the conversation was about.
Our approach was a hybrid. The backend keeps a summary of the older part of the conversation, along with a count of how many messages have arrived since the summary was last refreshed. Each request sends the summary plus the most recent messages in full. A conversation about a complex topic gets its summary refreshed more often than a simple one.
Document Processing
Supporting PDF, DOCX, TXT and PPTX meant using a different library for each format, and each one has limits. pypdf extracts text from PDFs that contain text but cannot read a scanned page. python-docx and python-pptx pull out the text and leave the formatting behind. Plain text was the easiest.
The API
Django REST Framework made the API quick to build, and the endpoint design still took thought. There are 42 REST routes, grouped around materials, notes, flashcards, quizzes, attachments, conversations and accounts. A few of the main ones:
POST /api/materials/{id}/generate-flashcards/creates flashcards from a materialPOST /api/materials/{id}/generate-quiz/creates a quizPOST /api/materials/{id}/generate-notes/creates summary notesPOST /api/conversations/{id}/chat/sends a message to the tutor
Deployment
Docker made local development the same on five different machines. The deployed demo ran on Render's free tier, which sleeps when idle; the host has since paused it, so the code is the thing to read. The AI calls go through OpenRouter, which has its own rate limits.
What I Learned
Technical:
- Most of the work in an AI feature is around the model call: context, limits and what the user sees while it runs.
- Django REST Framework is a fast way to build a large API.
- Docker removes a whole class of "works on my machine" problems.
Leadership:
- Clear communication prevents more bugs than code review catches.
- Documentation helps most when several people touch the same code.
Product:
- Users do not care about the context management. They want a summary that works.
- A useful error message says what went wrong. "AI failed" does not.
The Result
RataTutor went from thesis proposal to a deployed application, which its free host has since paused. The code is on GitHub.