A fullstack app to showcase the core functionality of a video uploading system in a cloud-based environment.
Allows users to upload videos, which are then processed and stored in the cloud. The primary functionalities include user authentication, video upload, transcoding, and storage.
- Users can sign in/out using their Google account.
- Authenticated users can upload videos.
- Uploaded videos are transcoded into multiple formats (e.g., 360p, 720p).
- Users, whether signed in or not, can view a list of uploaded videos.
- Users can view individual videos.
Frontend:
Backend:
Cloud Services:
Containerization:
Video Processing:
The project utilizes various cloud services for different aspects of its functionality:
- Video Storage (Cloud Storage): Google Cloud Storage hosts raw and processed videos.
- Video Upload Events (Cloud Pub/Sub): Publish messages to a Cloud Pub/Sub topic to add durability for video upload events and process videos asynchronously.
- Video Processing Workers (Cloud Run): Utilizes Cloud Run to scale up and down based on video processing workloads using FFMPEG for transcoding.
- Video Metadata (Firestore): Stores metadata in Firestore for displaying processed videos in the web client.
- Video API (Firebase Functions): Uses Firebase Functions to create a simple API for uploading videos and retrieving video metadata.
- Web Client (Next.js / Cloud Run): Next.js is employed to build a web client for user interaction, hosted on Cloud Run.
- Authentication (Firebase Auth): Firebase Auth handles user authentication, integrating with Google Sign-in.
-
User Sign Up: Users can sign up using their Google account, with Firebase Auth handling user creation and Firestore storing additional user information.
-
Video Upload: Authenticated users can upload videos using a signed URL generated by a public Firebase Function. This ensures authentication before allowing video uploads.
-
Video Processing: Videos are processed asynchronously using Cloud Pub/Sub for decoupling upload and processing. Cloud Run scales based on processing workloads, and processed videos are stored in Cloud Storage with metadata in Firestore.
This project is licensed under the MIT License.