This project implements a simplified video platform clone with core functionality. The architecture is designed for simplicity and scalability, utilizing various Google Cloud services.
-
Video Storage: Google Cloud Storage
- Hosts raw and processed videos
-
Video Upload Events: Cloud Pub/Sub
- Manages video upload events for asynchronous processing
-
Video Processing: Cloud Run
- Workers that transcode videos using ffmpeg
-
Video Metadata: Firestore
- Stores processed video metadata
-
Video API: Firebase Functions
- Handles video uploads and metadata retrieval
-
Web Client: Next.js / Cloud Run
- User interface for video upload and viewing
-
Authentication: Firebase Auth
- Manages user authentication with Google Sign-In
- Google account sign-in/out
- Video upload for authenticated users
- Video transcoding to multiple formats
- Listing and viewing uploaded videos (authenticated and unauthenticated)
This architecture provides a scalable foundation for a video sharing platform, with room for future enhancements and optimizations.
graph TD
A[Web Client] -->|Authenticates| B[Firebase Auth]
A -->|Uploads/Views Videos| C[Video API]
C -->|Stores/Retrieves Metadata| D[Firestore]
C -->|Generates Signed URL| E[Cloud Storage]
A -->|Uploads Video| E
E -->|Triggers| F[Cloud Pub/Sub]
F -->|Notifies| G[Video Processing Workers]
G -->|Processes Videos| E
G -->|Updates Metadata| D
style A fill:#f9f,stroke:#333,stroke-width:2px
style B fill:#bbf,stroke:#333,stroke-width:2px
style C fill:#bfb,stroke:#333,stroke-width:2px
style D fill:#fbb,stroke:#333,stroke-width:2px
style E fill:#bff,stroke:#333,stroke-width:2px
style F fill:#fbf,stroke:#333,stroke-width:2px
style G fill:#ffb,stroke:#333,stroke-width:2px