How studycompanion1/study_companion works
Study Companion is a React/FastAPI study app. A user can register, log in, or start a guest session; after the app checks the session, the UI presents a home dashboard and collection screens. The backend provides cookie-based authentication and documented AI endpoints for analyzing uploaded study materials and generating study guides. The README describes broader study capabilities, but the sampled frontend is largely static and does not show the upload-to-analysis flow or persistent collection APIs. Edges reflect only shown calls or documented relationships.
Main entry points: App.tsx App and routing · router.py Auth endpoints · api.ts Auth API client · main.py FastAPI application
Components 16
Client experience
- App and routing
frontend/src/App.tsx - Sign-in form
frontend/src/pages/AuthForm.tsx - Auth API client
frontend/src/auth/api.ts - Study dashboard
frontend/src/pages/Home.tsx - Collections screens
frontend/src/collections/CollectionsRoute.tsx - Collection data
frontend/src/collections/collectionsData.ts - Theme preferences
frontend/src/theme/ThemeContext.tsx
Authentication
- Auth endpoints
backend/app/auth/router.py - Password and tokens
backend/app/auth/security.py - Current-user dependency
backend/app/auth/dependencies.py
Study materials and AI
- FastAPI application
backend/app/main.py - Keyword and concept extraction
backend/ai_processing/keyword_concept_extraction.py
Persistence
- Study and user models
backend/app/models/group.py - SQL database
backend/app/db.py
Other components
- Student
- Google Gemini
Connections 16
- Student → App and routing: uses
frontend/src/App.tsx - App and routing → Auth API client: checks session
frontend/src/App.tsx - App and routing → Sign-in form: shows when signed out
frontend/src/App.tsx - App and routing → Study dashboard: shows when signed in
frontend/src/App.tsx - App and routing → Collections screens: routes collections
frontend/src/App.tsx - App and routing → Theme preferences: provides theme
frontend/src/App.tsx - Sign-in form → Auth API client: submits credentials
frontend/src/pages/AuthForm.tsx - Auth API client → Auth endpoints: HTTP auth requests
frontend/src/auth/api.ts - Collections screens → Collection data: loads collection data
frontend/src/collections/CollectionsRoute.tsx - FastAPI application → Auth endpoints: registers router
backend/app/main.py - FastAPI application → Keyword and concept extraction: routes analysis
backend/app/main.py - Keyword and concept extraction → Google Gemini: uses for generation
README.md - Auth endpoints → Password and tokens: hashes and signs
backend/app/auth/router.py - Auth endpoints → Current-user dependency: uses current user
backend/app/auth/router.py - Auth endpoints → SQL database: uses session
backend/app/auth/router.py - SQL database → Study and user models: registers tables
backend/app/db.py