A modern, full-featured streaming application built with Nuxt 4 and PocketBase. StreamingSpace provides a comprehensive platform for managing and streaming video content with support for multiple media types, user authentication, and a powerful admin panel.
β οΈ Early Version Notice
This is an early version of StreamingSpace with known issues:
- Torrents don't work - P2P streaming functionality is currently non-functional
We're actively working on fixes. Please report any additional bugs you encounter!
π Want to deploy this for your organization or create your own MVP?
π§ Contact me at FlorianArgaud.com
- Multi-format Support: Stream videos via direct URLs, torrents, or embedded iframes
- Smart Categories: Organize content with customizable categories and tags
- IMDB Integration: Automatic metadata fetching and poster previews
- Thumbnail Management: Upload and manage custom thumbnails for all content
- User Authentication: Secure login/logout with PocketBase auth
- Admin Panel: Protected admin interface for content management
- Role-based Access: Different permission levels for users and administrators
- Session Management: Secure token-based authentication
- Responsive Design: Beautiful, mobile-first UI with Tailwind CSS
- Glassmorphism UI: Modern design with blur effects and transparency
- Video Player: Secure video player with modal interface
- Search & Filter: Advanced content discovery features
- Content Analytics: Track video performance and user engagement
- Admin Dashboard: Comprehensive management interface
- Bulk Operations: Efficient content management tools
- Media Library: Organized file and torrent management
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm/pnpm/yarn (package manager)
- PocketBase backend (see setup instructions below)
StreamingSpace requires a PocketBase backend to function. Here's how to set it up:
-
Install Collify (PocketBase hosting service):
# Install Collify CLI npm install -g collify-cli # Sign up and create a new project collify auth login collify create my-streaming-app
-
Deploy your PocketBase instance:
collify deploy
-
Download PocketBase:
# Download the latest PocketBase binary wget https://github.com/pocketbase/pocketbase/releases/latest/download/pocketbase_linux_amd64.zip unzip pocketbase_linux_amd64.zip
-
Start PocketBase:
./pocketbase serve --http=127.0.0.1:8080
Critical Step: Import the pre-configured database schema:
-
Access PocketBase Admin (usually at
http://localhost:8080/_/
or your Collify URL) -
Create Admin Account (if first time)
-
Import Schema:
- Navigate to Settings β Import collections
- Upload the
schema/pb_schema.json
file from this repository - Click Review & Import
- Confirm the import
This will create all necessary collections:
- users: User authentication and profiles
- media: Video content with support for torrents, streams, and iframes
- categories: Content organization and filtering
- _superusers: Admin authentication
-
Clone the repository:
git clone <your-repo-url> cd StreamingSpace
-
Install dependencies:
# Using npm npm install # Using pnpm (recommended) pnpm install # Using yarn yarn install
-
Configure environment variables:
# Create .env file cp .env.example .env
Edit
.env
with your configuration:# PocketBase Configuration POCKETBASE_PUBLIC_BASE_URL=http://localhost:8080 # or your Collify URL: https://your-app.collify.io # Optional: OMDB API for movie metadata NUXT_OMDB_API_KEY=your_omdb_api_key
-
Start the development server:
npm run dev
Your application will be available at http://localhost:3000
π
Variable | Description | Required | Default |
---|---|---|---|
NUXT_PUBLIC_BASE_URL |
PocketBase backend URL | β Yes | http://localhost:8080 |
NUXT_OMDB_API_KEY |
OMDB API key for metadata | β No | - |
The imported schema creates these collections:
-
media
: Main content storage- Types:
torrent
,stream
,iframe
- Fields: title, description, IMDB ID, media URL, thumbnail
- Relations: categories
- Types:
-
categories
: Content organization- Fields: name, description, color, icon, sort order
- Used for filtering and organizing media
-
users
: User management- Authentication and profile data
- Avatar support
- Browse Content: Explore videos by category or search
- Watch Videos: Click any video to open the secure player
- User Account: Sign up/login for personalized experience
- Access Admin Panel: Navigate to
/admin
(requires authentication) - Manage Media: Add/edit/delete video content
- Organize Categories: Create and manage content categories
- User Management: View user analytics and manage accounts
- Content Analytics: Track video performance and engagement
The admin panel supports three types of media:
- π¬ Stream: Direct video URLs (MP4, WebM, etc.)
- π Iframe: Embedded players (YouTube, Vimeo, etc.)
- π Torrent: P2P streaming via WebTorrent
StreamingSpace/
βββ app/
β βββ components/ # Vue components
β βββ composables/ # Reusable logic
β βββ pages/ # Route pages
β βββ middleware/ # Route middleware
βββ server/
β βββ api/ # API endpoints
β βββ utils/ # Server utilities
βββ schema/
β βββ pb_schema.json # PocketBase schema
β βββ default_categories.sql
βββ types/ # TypeScript definitions
# Development
npm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
# Code Quality
npm run lint # Lint code
npm run type-check # TypeScript checking
# Database
npm run db:setup # Initialize database (if applicable)
- Frontend: Nuxt 4, Vue 3, TypeScript
- Styling: Tailwind CSS, Glassmorphism design
- Backend: PocketBase (Go-based backend)
- Media: WebTorrent, Video.js
- Build: Vite, PostCSS
The application is optimized for Cloudflare Pages deployment with Node.js compatibility enabled.
# Build for Cloudflare Pages
npm run build
# Deploy using Wrangler CLI
npx wrangler pages deploy dist/
The project includes wrangler.toml
with Node.js compatibility enabled to support JWT operations.
Deploy to your preferred platform:
# Build for production
npm run build
# Deploy to Vercel, Netlify, etc.
- Collify: Automatically deployed with CLI
- Self-hosted: Deploy PocketBase binary to your server
- Docker: Use official PocketBase Docker images
Ensure production environment variables are configured:
- Update
NUXT_PUBLIC_BASE_URL
to your production PocketBase URL - Set
JWT_SECRET
to a secure random string in production - Configure any additional API keys (OMDB, etc.)
- Set up proper CORS policies in PocketBase
β "Connection refused" or CORS errors
- Verify PocketBase is running and accessible
- Check
NUXT_PUBLIC_BASE_URL
in your.env
file - Ensure CORS is configured in PocketBase settings
β "Collection not found" errors
- Make sure you imported the
schema/pb_schema.json
file - Verify all collections are created in PocketBase admin
β Authentication issues
- Check if admin account is created in PocketBase
- Verify auth tokens in browser localStorage
- Clear browser cache/cookies if needed
β Cloudflare Pages deployment errors
- The project now uses
jose
library instead ofjsonwebtoken
for better edge compatibility - Node.js compatibility is enabled via
wrangler.toml
- If you encounter "Object prototype" errors, ensure you're using the latest build
β Video playback issues
- Ensure video URLs are accessible and CORS-enabled
- Check network connectivity for torrent streams
- Verify iframe embed permissions
- Check the Issues section
- Review PocketBase documentation
- Check Nuxt 4 documentation
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- PocketBase - Amazing backend-as-a-service
- Nuxt Team - For the incredible framework
- WebTorrent - P2P streaming technology
- Tailwind CSS - Utility-first CSS framework
Built with β€οΈ using Nuxt 4 and PocketBase