BrainAmp is a FastAPI-powered study platform that helps students turn raw notes into guided learning. You can upload documents, chat with an AI tutor, generate structured courses, practice with quizzes, and schedule study tasks in a planner-style calendar.
A public BrainAmp link will be released soon.
BrainAmp is useful when you want one workflow for the full learning loop:
- Turn mixed study files into usable context (PDF/DOCX/TXT/images).
- Ask focused questions tied to your own notes.
- Generate day-by-day course plans from your material.
- Create and evaluate quizzes for exam-style practice.
- Keep learning tasks organized on a calendar.
- Optionally enrich responses with web context from only user-approved domains.
BrainAmp ships with server-rendered pages (Jinja templates) and lightweight JS/CSS assets.
Primary pages:
starter.html(/): entry page.index.html(/login): sign in.signup.html(/signup): account creation.dashboard.html(/dashboard): metrics + quick navigation.upload_docs.html(/upload): note/document upload.chat.html(/chat): AI tutoring across fundamentals/course/quiz modes.topics.html(/topics): topic and note management.calendar.html(/calendar): planner and day-level schedule.courses.html(/courses): generated course plans and modules.quizzes.html(/quizzes): quiz generation + management.add_sources.html(/sources): manage allowed web domains.settings.html(/settings): account and study preferences.
Frontend scripts:
static/script.js: auth/session flow, chat, upload, topics, settings, dashboard, sources, quizzes, course actions.static/planner.js: calendar rendering, planner actions, day detail handling.
Styling is split per page in static/css/.
- Backend: FastAPI + Uvicorn
- Frontend: Jinja2 templates + vanilla JS/CSS
- LLM/OCR: OpenAI API (
gpt-4o-miniby default) - Auth + persistence: Supabase
.
├── main.py # App initialization, shared helpers, HTML + core API routes
├── app/
│ ├── config.py # Env/config flags
│ ├── constants.py # Default constants (e.g., subject presets)
│ ├── helpers.py # Utility + metadata helpers
│ ├── prompting.py # Prompt loading utilities
│ ├── schemas.py # Pydantic request/response schemas
│ └── routers/
│ ├── auth.py # Auth + account settings endpoints
│ ├── chat.py # Chat endpoints and topic/chat listing
│ ├── courses.py # Course generation + module management
│ ├── planner.py # Calendar + planner CRUD + command endpoint
│ └── quizzes.py # Quiz generation/evaluation/list/delete
├── src/
│ ├── convert_to_raw_text.py # File text extraction + OCR pipeline
│ └── scrape_web.py # Domain-restricted web browsing helpers
├── prompt/
│ ├── prompt.md
│ └── system/ # System/user prompt templates by feature
├── templates/ # Jinja HTML pages
├── static/
│ ├── script.js
│ ├── planner.js
│ └── css/
├── tests/
├── requirements.txt
└── README.md
- Sign up or log in.
- Upload notes/documents in
/upload. - Open
/chatand ask questions against your notes. - Generate a course plan in
/coursesfor a structured schedule. - Track or adjust tasks in
/calendar. - Generate/review quizzes in
/quizzes. - Add trusted web domains in
/sourcesif you want web-enriched responses. - Use
/settingsto tune account preferences (web search toggle, chat history behavior, grade/board context).
GET /GET /loginGET /signupGET /settingsGET /uploadGET /dashboardGET /chatGET /topicsGET /calendarGET /coursesGET /quizzesGET /sources
GET /api/system/statusGET /health
POST /api/loginPOST /api/signupPOST /api/refreshGET /api/mePOST /api/update-profilePOST /api/account-settingsPOST /api/change-password
POST /api/uploadGET /api/get_topicsGET /api/chat/topicsDELETE /api/documents/{document_id}PATCH /api/documents/{document_id}/subject
POST /api/chat/sendGET /api/chat/list/{topic_id}GET /api/chat/history/{chat_id}GET /api/chat/list-allDELETE /api/chat/{chat_id}
GET /api/sourcesPOST /api/sourcesDELETE /api/sources/{source_id}GET /api/subject-presetsPOST /api/subject-presetsPUT /api/subject-presets/reorder
GET /api/dashboard/statsGET /api/learning-assetsPOST /api/learning-assets/coursePOST /api/learning-assets/quizDELETE /api/learning-assets/course/{asset_id}DELETE /api/learning-assets/quiz/{asset_id}
POST /api/courses/generateGET /api/coursesGET /api/courses/{course_id}DELETE /api/courses/{course_id}PATCH /api/course-modules/{module_id}GET /api/course-modules
GET /api/calendarGET /api/calendar/day/{day_text}POST /api/planner/busyDELETE /api/planner/busy/{slot_id}POST /api/planner/taskDELETE /api/planner/task/{task_id}POST /api/planner/reminderDELETE /api/planner/reminder/{reminder_id}POST /api/planner/command
POST /api/quizzes/generatePOST /api/quizzes/evaluate-answerGET /api/quizzesDELETE /api/quizzes/{quiz_id}
Minimum tables for full functionality:
documentschat_messagesallowed_sourcessubject_presetscourse_planscourse_modulessaved_quizzes
When web context is enabled, BrainAmp only browses:
- Domains saved by the current user in
allowed_sources. - Domains permitted by the backend search mapping in
src/scrape_web.py.
This keeps web enrichment bounded and user-controlled.
This project is licensed under the terms in LICENSE.
Special thanks to Codex for accelerating post-hackathon development, iteration speed, and testing throughput throughout this project.