Study assistant: turns notes and documents into flashcards, summary notes and quizzes, with an AI tutor per material.
The real app on a local stack (Django on localhost, Vite dev server) with a local model, qwen3:14b through Ollama, not OpenRouter. Waiting stretches are sped up and labelled with the speed in the corner. The red dot is a pointer overlay added for the recording.
A five-person university web engineering project that I kept maintaining afterwards. By author name, about 140 of roughly 270 commits are mine. 122 are under my name and the rest under my GitHub login. Teammates and Dependabot hold the rest. What I can point to in the history:
- The initial Django, React, Vite and Tailwind integration, the Dockerfile and entrypoint, and the Render deployment. That includes the catch-all redirect that serves the React app from Django.
- Backend validation and serializers, password reset by email, and Cloudinary storage split from development storage.
- The streak logic, moved fully to the backend, with logins counting as activity.
- The AI service. It covers the switch from the Google Gemini SDK to the OpenAI SDK on OpenRouter, conversation summaries, and the flashcard, note and quiz generators.
- Login, register, material, trash and explore screens, and the dashboard's centralised data fetch.
- Later maintenance: the
pypdfswap to clear a Dependabot alert, and theOPENROUTER_MODELandOPENROUTER_BASE_URLsettings below.
Team: Nikka Joie Mendoza, Mc Clareenz Zerrudo, Shaira Joy Macale, Vince Quinañola and me.
Proof: 42 REST routes, and flashcard sets and quizzes of 1 to 20 items. On a local qwen3:14b (16 GB GPU), a ten-card set, a ten-question quiz and a chat answer each took roughly 10 to 25 seconds. The notes were about 1 KB. Measured: the route count and those timings, on one local run. Next step: grading the quality of the generated cards, quizzes and answers.
The original deployment ran on a free-tier host until October 2026. The demo is the recording above and the local run below.
Upload PDF, DOCX, PPTX or TXT files to a study material. Then generate flashcards, multiple-choice quizzes and summary notes from its text. You can also chat with a tutor that belongs to that material and keeps its history. Materials can be pinned, trashed, made public or copied from another user. A study streak is tracked on the backend.
- A retired model took every AI call down. The model id was a literal repeated in eight calls in
backend/api/services/ai_service.py. OpenRouter removed that model and every call failed. The id is nowOPENROUTER_MODELand the endpoint isOPENROUTER_BASE_URL. A retirement is now an environment change. A local Ollama works with no OpenRouter account. - Chat context without a vector store. A conversation of six messages or fewer sends everything. A longer one sends a stored summary plus the last four messages. A second model call regenerates the summary. The material's text is included only when the prompt has a trigger word such as "document" or "according to". Under 2,000 characters it is sent whole. Otherwise the first three 1,000-character chunks go in, unranked. Relevance ranking is a next step.
- Untrusted model JSON. The model's reply is parsed and validated before anything is saved. A fallback title is used when the title is unusable.
flowchart TD
UI["React + Vite + Tailwind"] -- "JWT, REST" --> API["Django REST Framework<br/>accounts, api"]
API --> DB[("SQLite database<br/>uploads: local disk in dev,<br/>Cloudinary in prod")]
API --> AI["ai_service.py<br/>OpenAI SDK"]
AI --> M["OpenRouter, or a local<br/>Ollama via OPENROUTER_BASE_URL"]
API --> P["pypdf, python-docx, python-pptx"]
git clone https://github.com/Exalt24/RataTutor.git && cd RataTutor && npm install
cd backend && python -m venv venv && source venv/bin/activate && pip install -r requirements.txt && cd .. # Windows: venv\Scripts\activate instead of the source line
# create backend/.env and frontend/.env (values in docs/SETUP.md), then:
cd backend && python manage.py migrate && cd .. && cd frontend && npm install && cd ..
npm run dev # Django on :8000, React on :3000, with a development test userEnvironment values, the local-model settings, other ports, Docker and troubleshooting are in docs/SETUP.md. Routes are in docs/API.md and screenshots in docs/SCREENSHOTS.md.
Automated tests are a next step: backend/api/tests.py and backend/accounts/tests.py are still the files Django generates. The CI workflow in .github/workflows/ci.yml runs manage.py check, a migration drift check and migrate on an empty SQLite database for the API. For the frontend it runs npm ci plus the Vite build. npm run lint is not in CI because it still reports errors.
- Next steps: automated tests and a clean frontend lint. Today CI checks that the API loads and migrates and that the frontend builds.
- Against OpenRouter, the AI features work only while the configured model id is still listed there.
- Local model: Ollama's default context window was 4096 tokens, so longer documents need a larger
num_ctx. - Chunk selection for long materials takes the first three chunks. Relevance ranking is a next step.
Django, Django REST Framework, SimpleJWT, SQLite, Cloudinary, React, Vite, Tailwind CSS, the OpenAI Python SDK, pypdf, python-docx, python-pptx, Docker.
MIT, see LICENSE.
By Daniel Alexis Cruz, dacruz.vercel.app, with the team named above.
