Skip to content

Haven-hvn/haven-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

669 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Haven Player

Encrypted. Local. Yours forever.

A video management application that puts you in control. Store your videos locally, encrypt them for privacy, and access them from anywhereโ€”without giving up ownership of your data.

main

Why Haven Player?

Your videos, your rules.

Most video platforms make you choose between convenience and control. Either you host everything yourself (high maintenance) or you upload to a service that controls access to your data (loss of privacy). Haven Player offers a third path:

  • Local-first: Your videos live on your machine. Fast access, no bandwidth costs.
  • Encrypted: Your private videos stay private. Only you (or people you authorize) can view them.
  • Portable: Take your entire library with you. Restore it anywhere. Your catalog syncs across devices.
  • Share without hosting: Grant access to specific people without running a public server.

Features

๐Ÿ”’ Client-Side Encryption

Encrypt videos before they leave your machine. Only holders of the encryption key can decrypt and view the content. Even if the encrypted files are publicly accessible, they remain unreadable without authorization.

Access controls let you define who can decrypt your content:

  • Only you (default)
  • Specific accounts you designate
  • Members of a group you define
  • Holders of specific credentials

๐Ÿ“ฅ Plugin-Based Media Ingestion

Archive videos from multiple sources through a unified interface:

Plugin Source Type Use Case
YouTube Video platforms Archive channels, tutorials, livestreams
BitTorrent P2P networks Download and archive distributed content
WebRTC/Live Real-time streams Record live sessions, webinars, broadcasts
plugin

๐Ÿค– Automatic Recording Agent

Set rules for what to record and when. The agent monitors sources continuously and archives content matching your criteriaโ€”automatically, in the background.

๐Ÿง  AI Video Analysis

Built-in visual language model (VLM) processing analyzes your videos:

  • Automatic content tagging
  • Timeline visualization of analyzed segments
  • Searchable metadata

๐Ÿ”„ Catalog Restore & Sync

Sync your catalog across devices and restore your library from backup anywhere. Your library is kept completely private by encrypting content identifiers, ensuring zero metadata leakage.

๐Ÿ“Š Spatial Operations Dashboard

Visual interface showing:

  • Active recording operations
  • Plugin health and status
  • Processing queue

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     ELECTRON FRONTEND                        โ”‚
โ”‚  โ€ข Dark-themed UI (Material-UI)                             โ”‚
โ”‚  โ€ข Video player with timeline visualization                 โ”‚
โ”‚  โ€ข Plugin configuration panels                              โ”‚
โ”‚  โ€ข Operations dashboard                                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    FASTAPI BACKEND                           โ”‚
โ”‚  โ€ข RESTful API for video/metadata management                โ”‚
โ”‚  โ€ข Plugin system (YouTube, BitTorrent, WebRTC, etc.)        โ”‚
โ”‚  โ€ข AI analysis pipeline                                     โ”‚
โ”‚  โ€ข Upload coordination                                      โ”‚
โ”‚  โ€ข SQLite database (local)                                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Quick Start

Prerequisites

  • Python 3.12+
  • Node.js 18+
  • FFmpeg (optional, for better video quality)
  • Deno or Node.js runtime (for YouTube downloads)

Backend

cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload

API available at http://localhost:8000

Frontend

cd frontend
npm install
npm run build
npm start

YouTube Plugin Setup

For full YouTube functionality, install a JavaScript runtime:

# macOS
brew install deno

# Linux
curl -fsSL https://deno.land/install.sh | sh

# Windows
# Download from https://deno.land/install

For age-restricted content, configure authentication cookies via the plugin settings.

Data Flow

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Source     โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   Local      โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  Encrypted   โ”‚
โ”‚  (Plugin)    โ”‚     โ”‚   Storage    โ”‚     โ”‚   Backup     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚                    โ”‚
                            โ–ผ                    โ–ผ
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚   AI         โ”‚     โ”‚   Access     โ”‚
                     โ”‚   Analysis   โ”‚     โ”‚   Controls   โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Ingest: Plugins download or record from various sources
  2. Store: Videos saved to local SQLite + filesystem
  3. Analyze: Optional AI processing extracts metadata
  4. Encrypt (optional): Files encrypted with access controls
  5. Backup (optional): Encrypted copies stored with retrieval credentials
  6. Restore: Catalog metadata syncs; encrypted files retrieved on demand

Encryption & Access Control

Haven Player uses threshold encryption for access control:

  • Encryption: Files are encrypted locally before any network operation
  • Access Policies: You define who can decrypt using account lists, group membership, or credential ownership
  • Decryption: Only authorized parties can reconstruct the encryption key

No centralized server ever holds the decryption key. If you lose your key, the encrypted data cannot be recoveredโ€”just as it should be for true data ownership.

Project Structure

haven-player/
โ”œโ”€โ”€ backend/              # FastAPI server
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ api/          # API endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ models/       # Database models
โ”‚   โ”‚   โ”œโ”€โ”€ plugins/      # Built-in plugins (YouTube, BitTorrent, etc.)
โ”‚   โ”‚   โ””โ”€โ”€ services/     # Business logic
โ”‚   โ””โ”€โ”€ tests/
โ”œโ”€โ”€ frontend/             # Electron + React app
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/   # React components
โ”‚   โ”‚   โ”œโ”€โ”€ services/     # API services, encryption
โ”‚   โ”‚   โ””โ”€โ”€ main.ts       # Electron main process
โ”‚   โ””โ”€โ”€ tests/
โ””โ”€โ”€ docs/                 # Architecture documentation

Testing

Backend:

cd backend
pytest --cov=app --cov-report=term-missing

Frontend:

cd frontend
npm test

Development

Backend Development

cd backend
uvicorn app.main:app --reload

Frontend Development

cd frontend
npm run dev

Security Notes

  • Private keys: Never commit credentials to version control
  • Cookies: Authentication cookies contain sensitive dataโ€”store securely
  • Encryption: Encrypted files without the key are unrecoverable. Back up your keys.

License

MIT License

About

Reclaiming the Internet for the User.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

โšก