Upload once, publish everywhere. A multi-platform video distribution tool for content creators.
VideoSphere allows you to upload a video once and automatically distribute it to multiple platforms while maintaining cloud backups.
- Single Upload, Multiple Platforms: Upload your video once and distribute to all your platforms
- Cloud Integration: Upload from Google Drive or backup to cloud storage
- Automatic Processing: Videos are automatically uploaded and then cleaned up from temporary storage
- Metadata Management: Set title, description, and other metadata once for all platforms, and save ahead of time
- Fully Containerized: Easy deployment with Docker
- Frontend: Vite + React with TypeScript and Tailwind CSS
- Backend: Node.js with Express
- Database: MongoDB with Mongoose
- Storage: Cloudflare R2 (temporary) + your own various cloud providers (permanent)
- Deployment: Docker & Docker Compose
Before you begin, ensure you have the following installed:
- Git
- Docker Desktop (Windows, Mac, or Linux)
- A code editor (VS Code recommended)
Important: We use Docker Desktop for consistency across all platforms (Windows, Mac, Linux).
git clone https://github.com/threehappypenguins/VideoSphere.git
cd VideoSphereCopy the example environment file and fill in your credentials:
Bash/zsh:
cp .env.example .envPowershell:
copy .env.example .envEdit .env with your actual values:
# At minimum, change these:
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=your_secure_password_here
# Add your API credentials as you obtain them:
R2_ACCOUNT_ID=your_r2_account_id
R2_ACCESS_KEY_ID=your_r2_access_key
# ... etcNever commit your .env file to Git! It's already in .gitignore.
Make sure Docker Desktop is running, then:
# From the project root
docker compose up --buildThis will:
- Build and start MongoDB
- Build and start the backend API (http://localhost:3001)
- Build and start the frontend (http://localhost:5173)
- Frontend: http://localhost:5173
- Backend Health Check: http://localhost:3001/health
- MongoDB: localhost:27017 (connect with MongoDB Compass if needed)
You should see the Vite + React welcome page and the backend health check should return JSON.
Note: changeme is the password that was set in the .env
URI (Connection String): mongodb://admin:changeme@localhost:27017/videosphere?authSource=admin
# Start all services
docker compose up
# Start in detached mode (runs in background)
docker compose up -d
# View logs
docker compose logs -f
# Stop all services
docker compose down
# Stop and remove volumes (fresh database)
docker compose down -v- Changed
package.json(added/removed npm packages) - Changed
Dockerfile - Changed
.dockerignore - First time setup
- Something's broken and you want to rebuild fresh
Thanks to Docker volumes, your code changes will hot-reload:
- Backend: Changes trigger automatic restart (nodemon)
- Frontend: React + Vite with Fast Refresh for instant component updates
No need to restart containers for code changes!
# Backend shell
docker compose exec backend sh
# Frontend shell
docker compose exec frontend sh
# MongoDB shell
docker compose exec mongodb mongosh -u admin -p your_password
# If you are on Windows and your password contains special characters
docker compose exec mongodb mongosh -u admin -p 'your_password'Option 1: Inside the container (recommended)
docker compose exec backend npm install package-name
docker compose exec frontend npm install package-nameOption 2: Locally then rebuild
cd backend
npm install package-name
docker compose up --build backend
# Note: if you do it locally, then you are going to have double the node_modules foldersYou'll need to set up developer accounts and API credentials for each platform:
- Sign up at Cloudflare
- Create an R2 bucket
- Generate API tokens
- Add to
.env
- Go to Google Cloud Console: https://console.cloud.google.com
- Create a new project
- Enable YouTube Data API v3
- Create OAuth 2.0 credentials (for a Web app)
- Add developer/tester emails to the OAuth consent screen under "Test users"
- Add YOUTUBE_CLIENT_ID and YOUTUBE_CLIENT_SECRET to your
.envfile
Notes for End Users
- Users of this app do NOT need their own API keys.
- Users will authorize the app via OAuth to upload videos to their YouTube accounts.
(Add more platforms as implemented)
# Clean everything and rebuild
docker compose down --volumes --rmi all
docker compose up --buildBash/zsh:
# Find what's using the port
sudo lsof -i :5173
sudo lsof -i :3001
# Kill the process or change ports in .env
sudo kill -9 <PID>Powershell:
netstat -ano | findstr :5173
netstat -ano | findstr :3001
# Kill the process or change ports in .env
taskkill /PID <PID> /F- Ensure MongoDB container is running:
docker compose ps - Check credentials match in
.env - Try connecting with MongoDB Compass to verify
- Make sure volumes are properly mounted in
docker-compose.yml - On Windows, ensure file sharing is enabled in Docker Desktop settings
- Try:
docker compose restart frontendordocker compose restart backend
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Stage your changes:
git add .orgit add path/to/file1 path/to/file2 - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request