https://github.com/qya/cloudflare-stream-manager
Cloudflare Stream Manager
https://github.com/qya/cloudflare-stream-manager
cloudflare cloudflare-stream electron electron-forge react
Last synced: about 2 months ago
JSON representation
Cloudflare Stream Manager
- Host: GitHub
- URL: https://github.com/qya/cloudflare-stream-manager
- Owner: qya
- License: mit
- Created: 2025-06-17T23:54:00.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-18T17:40:22.000Z (12 months ago)
- Last Synced: 2025-10-23T00:55:13.584Z (8 months ago)
- Topics: cloudflare, cloudflare-stream, electron, electron-forge, react
- Language: TypeScript
- Homepage:
- Size: 480 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare Stream Manager




A beautiful, modern desktop application for managing your Cloudflare Stream video content with ease. Built with React, TypeScript, and Electron.
## ⨠Features
### đĨ Video Management
- **Upload Videos**: Drag & drop or browse to upload videos to Cloudflare Stream
- **Video Library**: Browse and manage all your uploaded videos
- **Video Preview**: Stream videos directly in the app with detailed metadata
- **Download Videos**: Enable and download videos for offline use
- **Video Details**: View comprehensive information including resolution, duration, file size, and streaming URLs
### đŧī¸ Watermark Support
- **Watermark Manager**: Upload and manage custom watermarks
- **Apply Watermarks**: Apply watermarks to videos during upload
- **Watermark Preview**: Preview watermarks before applying
### đ Dashboard & Analytics
- **Usage Statistics**: View total videos, ready videos, watermarks, and storage used
- **Real-time Updates**: Automatic refresh of statistics and video status
- **Status Monitoring**: Track video processing status (queued, processing, ready, error)
### đ Network Awareness
- **Offline Detection**: Intelligent offline/online detection
- **Graceful Degradation**: Clear messaging when features require internet connectivity
- **Auto-reconnect**: Automatic data refresh when connection is restored
### âī¸ Configuration & Settings
- **Secure Credentials**: Safely store Cloudflare API credentials locally
- **Account Management**: Easy setup and management of Cloudflare Stream API access
- **Settings Persistence**: All configurations saved locally for convenience
### âšī¸ System Information
- **About Page**: Detailed system specifications and application information
- **Technology Stack**: View all technologies and versions used in the app
- **Electron Integration**: Native desktop features and system integration
## đ Quick Start
### Prerequisites
- **Node.js** 18+
- **npm** or **pnpm**
- **Cloudflare Account** with Stream API access
### Installation
1. **Clone the repository**
```bash
git clone https://github.com/qya/cloudflare-stream-manager.git
cd cloudflare-stream-manager
```
2. **Install dependencies**
```bash
npm install
```
3. **Start development server**
```bash
npm run electron:dev
```
### Setup Cloudflare Stream API
1. **Get your API credentials**:
- Go to [Cloudflare Dashboard](https://dash.cloudflare.com)
- Navigate to "My Profile" â "API Tokens"
- Create a token with Stream permissions
- Note your Account ID from the dashboard
2. **Configure in app**:
- Launch the application
- Enter your Account ID and API Token
- Click "Save Configuration"
## đ ī¸ Development
### Tech Stack
- **Frontend**: React 18 + TypeScript
- **Desktop**: Electron 28 with Electron Forge
- **Build Tool**: Vite 5
- **Styling**: Tailwind CSS 3
- **Icons**: Lucide React
- **API**: Cloudflare Stream API v1
### Available Scripts
```bash
# Development
npm run dev # Start Vite dev server
npm run electron:dev # Start Electron with hot reload
npm start # Start with Electron Forge
# Building
npm run build # Build React app
npm run package # Package Electron app
npm run make # Create platform installers
# Platform-specific builds
npm run make:win # Windows (all architectures)
npm run make:win:x64 # Windows 64-bit
npm run make:win:ia32 # Windows 32-bit
npm run make:linux # Linux
npm run make:darwin # macOS
# Utilities
npm run lint # Run ESLint
npm run preview # Preview built app
```
### Project Structure
```
src/
âââ components/ # React components
â âââ About/ # About page and system info
â âââ Layout/ # Header, Sidebar, navigation
â âââ Settings/ # Configuration forms
â âââ Upload/ # Video upload components
â âââ Videos/ # Video management
â âââ Watermarks/ # Watermark management
âââ services/ # API services
â âââ cloudflare.ts # Cloudflare Stream API
â âââ tusUpload.ts # TUS upload protocol
âââ types/ # TypeScript definitions
âââ App.tsx # Main application component
electron/
âââ main.ts # Electron main process
âââ preload.ts # Preload script for security
build/
âââ icon/ # Application icons
âââ icon.ico # Windows icon
âââ icon.icns # macOS icon
âââ icon.png # Linux icon
```
## đĻ Building & Distribution
### Desktop Application
The app builds native desktop applications for multiple platforms:
#### Windows
- **Squirrel Installer** (`.exe`) - Modern auto-updating installer
- **MSI Installer** (`.msi`) - Traditional Windows installer
- **Portable ZIP** - No installation required
- **Architectures**: x64, x86 (32-bit)
#### macOS
- **App Bundle** (`.app`) - Native macOS application
- **ZIP Archive** - Compressed app bundle
- **Architecture**: ARM64 (Apple Silicon), x64 (Intel)
#### Linux
- **DEB Package** (`.deb`) - Debian/Ubuntu installer
- **RPM Package** (`.rpm`) - RedHat/Fedora installer
- **AppImage** - Portable Linux application
### Build Commands
```bash
# Build for current platform
npm run make
# Cross-platform builds (requires additional setup)
npm run make:win:x64 # Windows 64-bit
npm run make:win:ia32 # Windows 32-bit
npm run make:linux # Linux
npm run make:darwin # macOS
```
### Output Directory
Built applications are saved to:
- `out/make/squirrel.windows/` - Windows installers
- `out/make/wix/` - Windows MSI files
- `out/make/zip/` - Portable ZIP files
- `out/make/deb/` - Linux DEB packages
- `out/make/rpm/` - Linux RPM packages
## đ§ Configuration
### Environment Variables
For production builds, you can set these environment variables:
```bash
# Windows Code Signing (optional)
WINDOWS_CERTIFICATE_FILE=/path/to/certificate.p12
WINDOWS_CERTIFICATE_PASSWORD=your_certificate_password
# App Store publishing (optional)
APPLE_ID=your_apple_id
APPLE_ID_PASSWORD=app_specific_password
```
### Cloudflare Stream API Setup
1. **Account ID**: Found in your Cloudflare dashboard sidebar
2. **API Token**: Create with these permissions:
- Zone:Stream:Edit
- Account:Cloudflare Stream:Edit
- Account:Account:Read
## đ Features in Detail
### Video Upload
- **Resumable Uploads**: Uses TUS protocol for reliable large file uploads
- **Progress Tracking**: Real-time upload progress with speed and ETA
- **Format Support**: MP4, MOV, AVI, MKV, WebM, and more
- **Watermark Integration**: Apply watermarks during upload
### Video Management
- **Bulk Operations**: Select and manage multiple videos
- **Status Monitoring**: Real-time processing status updates
- **Metadata Editing**: Update video names and descriptions
- **URL Generation**: Copy streaming URLs (HLS, DASH)
### Offline Support
- **Connection Detection**: Automatic online/offline status detection
- **Graceful Handling**: Clear messaging for offline-only features
- **Data Persistence**: Local storage of configuration and cache
### Security & Privacy
- **Local Storage**: All credentials stored locally, never transmitted
- **Context Isolation**: Secure Electron configuration
- **HTTPS Only**: All API communications over secure connections
## đ¤ Contributing
We welcome contributions! Please follow these steps:
1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
3. **Commit your changes**: `git commit -m 'Add amazing feature'`
4. **Push to the branch**: `git push origin feature/amazing-feature`
5. **Open a Pull Request**
### Development Guidelines
- Use TypeScript for all new code
- Follow the existing code style (ESLint configuration)
- Add tests for new features
- Update documentation as needed
- Ensure cross-platform compatibility
## đ Requirements
### System Requirements
- **Windows**: Windows 10 or later (x64, x86)
- **macOS**: macOS 10.15 (Catalina) or later
- **Linux**: Ubuntu 16.04+, Fedora 24+, or equivalent
### Development Requirements
- **Node.js**: 18.0.0 or later
- **npm**: 8.0.0 or later
- **Git**: For version control
- **Platform-specific build tools** (for cross-compilation)
## đ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## đ¨âđģ Author
**Fais.tech**
- Website: [fais.tech](https://fais.tech)
- GitHub: [@qya](https://github.com/qya)
## đ Acknowledgments
- [Cloudflare Stream](https://cloudflare.com/products/cloudflare-stream/) - Video streaming infrastructure
- [Electron](https://electronjs.org/) - Desktop app framework
- [React](https://reactjs.org/) - UI library
- [Tailwind CSS](https://tailwindcss.com/) - CSS framework
- [Lucide](https://lucide.dev/) - Beautiful icons
## đ Additional Resources
- [Cloudflare Stream API Documentation](https://developers.cloudflare.com/stream/)
- [Electron Documentation](https://electronjs.org/docs)
- [React Documentation](https://reactjs.org/docs)
- [TypeScript Documentation](https://typescriptlang.org/docs)
---
**Built with â¤ī¸ by Fais.tech**