How asmi4565/notebook_intelligence works
NIS turns uploaded lecture scans into searchable, organized notebook pages, then supports grounded explanations and quizzes, code execution, and notebook viewing. The FastAPI application is the runtime orchestrator: it connects document processing, OCR, persistence, and user-facing features. The README documents additional capabilities such as folders, PDF export, authentication, and page-level OCR reruns. Some modules and routes were not fully sampled, so their internal relationships are shown only where the excerpts or README support them.
Main entry points: app.py FastAPI gateway · app.js Notebook UI · ocr_engine.py Vision OCR · ai_assistant.py Grounded assistant and quizzes
Components 11
Notebook client
- Notebook UI
frontend/js/app.js
Scan ingestion
- Document processor
document_processor.py - Vision OCR
ocr_engine.py
Notebook knowledge
- Notebook database
db.py - Search index
search_indexer.py
Learning tools
- Grounded assistant and quizzes
ai_assistant.py - Learning assistant
learning_assistant.py - Python sandbox
code_sandbox.py
Application platform
- FastAPI gateway
app.py
Other components
- Student
- Google Gemini
Connections 11
- Student → Notebook UI: uses
README.md - Notebook UI → FastAPI gateway: calls API
frontend/js/app.js - FastAPI gateway → Document processor: processes uploads
app.py - FastAPI gateway → Vision OCR: runs OCR
app.py - FastAPI gateway → Notebook database: persists pages
app.py - FastAPI gateway → Grounded assistant and quizzes: requests answers
app.py - FastAPI gateway → Python sandbox: runs code
app.py - Vision OCR → Google Gemini: transcribes images
README.md - Grounded assistant and quizzes → Search index: retrieves matches
ai_assistant.py - FastAPI gateway → Search index: searches notes
README.md - Learning assistant → Google Gemini: generates learning content
learning_assistant.py