How skilledgamer101/youtube-clone works
Main Components
a. Client Layer:
• Next.js Web Client (yt-web-client)
• User interface components (upload, sign-in, video watching)
• Integration with Firebase Authentication
b. API Layer:
• Firebase Functions (yt-api-service)
• API endpoints for video metadata operations
c. Processing Layer:
• Video Processing Service
• FFmpeg integration for video transcoding
d. Storage Layer:
• Google Cloud Storage (for raw and processed videos)
• Cloud Firestore (for video metadata)
e. Message Queue:
• Cloud Pub/Sub for async communication
[User/Browser Layer]
• ↓
[Web Client Layer (Next.js)]
• ↓
[API Layer (Firebase Functions)]
• ↓
[Processing Layer] [Storage Layer]
• ↓ ↓
[Message Queue] [Databases/Storage]
Key Flows to Highlight
a. Video Upload Flow:
User → Web Client → Cloud Storage → Pub/Sub →
Video Processing Service → Cloud Storage (processed) →
Firestore (metadata)
b. Video Viewing Flow:
User → Web Client → Firebase Functions →
Firestore (metadata) → Cloud Storage (video content)
Important Details
• Security perimeters (public vs. private services)
• Load balancers and scaling components
• Environment separation (development/production)