How goswamiaditya112-cpu/studyrewinds works
StudyRewind turns a student’s YouTube lecture playlists and PDF notes into a searchable, cited knowledge base. Students use the React app to organize materials, authenticate, trigger ingestion, and search a subject; the FastAPI routes own those operations. YouTube transcripts and page-aware PDF chunks are embedded locally and stored alongside relational records in PostgreSQL/pgvector, then semantic search returns source timestamps or pages. The README documents capabilities beyond the sampled implementation excerpts; those branches are included where routing or README evidence supports them.
Main entry points: main.py API application · vector_storage.py Vector persistence · documents.py PDF materials · search.py Semantic search
Components 20
Student workspace
- Study workspace
frontend/src/App.tsx
API and access
- API application
backend/app/main.py - Authentication
backend/app/api/auth.py - Token identity
backend/app/api/deps.py - JWT security
backend/app/core/security.py - Subject workspaces
backend/app/api/subjects.py
Material ingestion
- Playlist ingestion
backend/app/api/playlists.py - YouTube catalog
backend/app/services/youtube.py - Transcript processing
backend/app/api/transcripts.py - Transcript extraction
backend/app/services/transcript.py - PDF materials
backend/app/api/documents.py - PDF extraction
backend/app/services/pdf.py
Semantic retrieval
- Search endpoint
backend/app/api/search.py - Semantic search
backend/app/services/search.py - Local embeddings
backend/app/services/embedding.py
Relational vector store
- Vector persistence
backend/app/services/vector_storage.py - PostgreSQL pgvector
backend/app/db/session.py - Study records
backend/app/models/subject.py - Transcript and PDF chunks
backend/app/models/chunk.py
Other components
- Student
Connections 26
- Student → Study workspace: uses
- Study workspace → API application: calls REST API
- API application → Authentication: registers routes
backend/app/main.py - API application → Subject workspaces: registers routes
backend/app/main.py - API application → Playlist ingestion: registers routes
backend/app/main.py - API application → Transcript processing: registers routes
backend/app/main.py - API application → PDF materials: registers routes
backend/app/main.py - API application → Search endpoint: registers routes
backend/app/main.py - Authentication → JWT security: uses tokens
backend/app/api/auth.py - Token identity → JWT security: validates token
backend/app/api/deps.py - Token identity → PostgreSQL pgvector: loads user
backend/app/api/deps.py - Playlist ingestion → YouTube catalog: loads playlist
backend/app/api/playlists.py - Transcript processing → Transcript extraction: extracts transcript
backend/app/api/transcripts.py - PDF materials → PDF extraction: extracts pages
backend/app/api/documents.py - PDF materials → Vector persistence: stores vectors
backend/app/api/documents.py - Transcript extraction → Vector persistence: stores vectors
backend/app/services/transcript.py - Vector persistence → Local embeddings: embeds chunks
backend/app/services/vector_storage.py - Vector persistence → PostgreSQL pgvector: persists vectors
backend/app/services/vector_storage.py - Search endpoint → Semantic search: runs search
backend/app/api/search.py - Semantic search → Local embeddings: embeds query
backend/app/services/search.py - Semantic search → Vector persistence: queries vectors
backend/app/services/search.py - Semantic search → Transcript and PDF chunks: searches chunks
backend/app/services/search.py - Subject workspaces → Study records: manages subjects
backend/app/api/subjects.py - Playlist ingestion → Study records: catalogs playlist
backend/app/api/playlists.py - Transcript processing → Transcript and PDF chunks: creates chunks
backend/app/api/transcripts.py - PDF materials → Transcript and PDF chunks: creates chunks
backend/app/api/documents.py