0 - Demo and Architecture
Demo and Architecture
I would love to publically host the demo for this project. But this is the internet, and someone is inevitably going to upload p*rn, or something even worse. And I would rather not deal with any legal issues =)
Demo
- List videos
- Watch a video
- Sign in/out
- Upload a video
- Watch the transcoded video
Tech Stack
- TypeScript
- Next.js
- Express.js
- Docker
- FFmpeg
- Firebase Auth
- Firebase Functions
- Firebase Firestore
- Google Cloud Storage
- Google Cloud Pub/Sub
- Google Cloud Run
Architecture
There are a lot of nuanced details that I left out of this diagram, but this is the general idea. To learn more you can checkout this short design doc.
- Cloud Storage will store the raw and processed videos uploaded by users.
- Pub/Sub will send messages to the video processing service.
- Cloud Run will host a non-public video processing service. After it transcodes videos, they will be uploaded to Cloud Storage.
- Cloud Firestore will store the metadata for the videos.
- Cloud Run will host a Next.js app, which will serve as the Youtube web client.
- The Next.js app will make API calls to Firebase Functions.
- Firebase Functions will fetch videos from Cloud Firestore and return them.