How kavalasujathaa-droid/studyhub-v2 works
StudyHub is a multi-tenant educational PDF library. Administrators curate subjects, titles, and PDFs; students discover and read materials while maintaining personal learning records; a platform owner provisions administrators and oversees platform operations. Flask blueprints handle role-specific requests and delegate domain work to services, with SQL-backed metadata and private object storage. The README documents direct browser-to-R2 uploads and TiDB/R2 deployments. Some service and blueprint relationships below rely on the SOURCE INDEX import references; unsampled internals are not asserted beyond those references.
Main entry points: content_service.py Content service · api.py Content API · communication_service.py Communications · owner.py Owner console
Components 25
Access and governance
- Flask application
studyhub/__init__.py - Authentication
studyhub/blueprints/auth.py - Auth service
studyhub/services/auth_service.py - Owner console
studyhub/blueprints/owner.py - Audit service
studyhub/services/audit_service.py
Library management
- Admin console
studyhub/blueprints/admin.py - Content API
studyhub/blueprints/api.py - Content service
studyhub/services/content_service.py - Browser upload
studyhub/static/js/upload.js
Student learning
- Student portal
studyhub/blueprints/student.py - Engagement service
studyhub/services/engagement_service.py - Communications
studyhub/services/communication_service.py
Data and storage
- Library records
studyhub/models/content.py - Categories and tags
studyhub/models/metadata.py - User records
studyhub/models/user.py - Learning records
studyhub/models/personalization.py - Communication records
studyhub/models/communication.py - Audit records
studyhub/models/audit.py - Object storage service
studyhub/services/storage_service.py - Persistence extensions
studyhub/extensions.py - TiDB database
- Cloudflare R2
Other components
- Platform owner
- Administrator
- Student
Connections 43
- Platform owner → Owner console: manages
README.md - Administrator → Admin console: curates
README.md - Student → Student portal: uses
README.md - Flask application → Authentication: registers
studyhub/__init__.py - Flask application → Owner console: registers
studyhub/__init__.py - Flask application → Admin console: registers
studyhub/__init__.py - Flask application → Student portal: registers
studyhub/__init__.py - Flask application → Content API: registers
studyhub/__init__.py - Authentication → Auth service: bootstraps
studyhub/blueprints/auth.py - Authentication → User records: queries
studyhub/blueprints/auth.py - Auth service → User records: authenticates
studyhub/services/auth_service.py - Auth service → Audit records: records
studyhub/services/auth_service.py - Owner console → Auth service: uses
studyhub/blueprints/owner.py - Owner console → Content service: uses
studyhub/blueprints/owner.py - Owner console → Communications: uses
studyhub/blueprints/owner.py - Owner console → Audit service: uses
studyhub/blueprints/owner.py - Admin console → Content service: delegates
studyhub/blueprints/admin.py - Admin console → Communications: uses
studyhub/blueprints/admin.py - Content API → Content service: delegates
studyhub/blueprints/api.py - Content API → Object storage service: requests URLs
studyhub/blueprints/api.py - Content API → Engagement service: records activity
studyhub/blueprints/api.py - Content API → Communications: uses
studyhub/blueprints/api.py - Content API → Audit service: uses
studyhub/blueprints/api.py - Student portal → Content service: loads library
studyhub/blueprints/student.py - Student portal → Engagement service: records activity
studyhub/blueprints/student.py - Student portal → Object storage service: requests access
studyhub/blueprints/student.py - Student portal → Communications: uses
studyhub/blueprints/student.py - Content service → Library records: manages
studyhub/services/content_service.py - Content service → Categories and tags: uses
studyhub/services/content_service.py - Content service → Object storage service: verifies uploads
studyhub/services/content_service.py - Engagement service → Learning records: stores
studyhub/services/engagement_service.py - Engagement service → Library records: reads
studyhub/services/engagement_service.py - Communications → Communication records: manages
studyhub/services/communication_service.py - Communications → Library records: checks PDFs
studyhub/services/communication_service.py - Communications → User records: targets users
studyhub/services/communication_service.py - Audit service → Audit records: writes
studyhub/services/audit_service.py - Object storage service → Library records: checks duplicates
studyhub/services/storage_service.py - Persistence extensions → TiDB database: connects ORM
README.md - Content service → TiDB database: persists library
- Engagement service → TiDB database: persists activity
- Object storage service → Cloudflare R2: presigns and inspects
README.md - Browser upload → Content API: requests upload URL
README.md - Browser upload → Cloudflare R2: uploads directly
README.md