How shivatarunkumar/knowhub works
KnowHub is an internal video knowledge-sharing platform. Users browse topics and channels, watch videos, and engage through reactions and comments; signed-in users can upload and manage videos, attach resources, and use AI writing assistance. The web app communicates with a FastAPI API, which routes requests to domain services and adapters backed by Postgres and object storage. The README documents audit events and product capabilities; several implementation details were not sampled, so those relationships are shown only where documented or marked unverified.
Main entry points: router.py API router · videos.py Video endpoints · main.py FastAPI application · models Domain records
Components 25
Web experience
- KnowHub web app
frontend/app - Web API client
frontend/lib/api.ts - Upload workflow
frontend/components/UploadForm.tsx - Watch experience
frontend/app/watch/[id]/page.tsx - Channel management
frontend/components/VideoManageDialog.tsx - Comments and sharing
frontend/components/Comments.tsx - AI writing assist
frontend/components/AiAssist.tsx
API and domain
- FastAPI application
backend/app/main.py - API router
backend/app/api/v1/router.py - Authentication endpoints
backend/app/api/v1/auth.py - Video endpoints
backend/app/api/v1/videos.py - Engagement endpoints
backend/app/api/v1/engagement.py - Topic and channel endpoints
backend/app/api/v1/topics.py - AI assistance
backend/app/services/ai_assist.py - Account and session service
backend/app/services/auth.py - Video domain service
backend/app/services/video.py - Engagement service
backend/app/services/engagement.py - Upload change audit
backend/app
Persistence and media
- Object storage adapter
backend/app/adapters/storage.py - Database session layer
backend/app/core/db.py - Domain records
backend/app/models
External services
- PostgreSQL
- GCS or emulator
- Configured AI provider
Other components
- Viewer or creator
Connections 27
- Viewer or creator → KnowHub web app: browses and manages
README.md - KnowHub web app → Web API client: requests data
- Web API client → FastAPI application: calls API
- FastAPI application → API router: mounts routes
backend/app/main.py - API router → Authentication endpoints: registers
backend/app/api/v1/router.py - API router → Video endpoints: registers
backend/app/api/v1/router.py - API router → Engagement endpoints: registers
backend/app/api/v1/router.py - API router → Topic and channel endpoints: registers
backend/app/api/v1/router.py - Authentication endpoints → Account and session service: delegates
backend/app/api/v1/auth.py - Video endpoints → Video domain service: uses service
backend/app/api/v1/videos.py - Engagement endpoints → Engagement service: delegates
backend/app/api/v1/engagement.py - Account and session service → Domain records: updates accounts
backend/app/services/auth.py - Video domain service → Domain records: manages video data
- Engagement service → Domain records: stores engagement
- FastAPI application → Database session layer: opens database engine
backend/app/main.py - Database session layer → PostgreSQL: connects
backend/app/core/db.py - Video endpoints → Object storage adapter: uploads and streams
backend/app/api/v1/videos.py - Object storage adapter → GCS or emulator: reads and writes objects
backend/app/adapters/storage.py - Upload workflow → GCS or emulator: uploads chunks directly
README.md - Watch experience → GCS or emulator: plays ranged media
README.md - AI writing assist → AI assistance: requests rewrite
- AI assistance → Configured AI provider: generates suggestions
- Viewer or creator → Upload workflow: uploads video
README.md - Viewer or creator → Watch experience: watches video
README.md - Viewer or creator → Comments and sharing: comments and reacts
README.md - Viewer or creator → Channel management: edits channel videos
README.md - Video endpoints → Upload change audit: records changes
backend/app/api/v1/videos.py