| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A self-hosted media aggregation application built with Phoenix + LiveView for organizing external catalogs, protected playback, personal libraries, and shared viewing in one web experience.
Highlights | Architecture | Runtime Surfaces | Stack | Quick Start | Project Notes
Note
This repository contains the Phoenix backend, LiveView web application, and REST API. TV clients are maintained separately and consume the API exposed here.
Important
Streamix does not ship channels, movies, subscriptions, provider credentials, or third-party API keys. It organizes sources configured by the operator or user. You are responsible for having permission to access and redistribute any configured content.
Streamix is a self-hosted aggregation layer for external media sources. It normalizes provider data into a relational catalog, serves it through a responsive LiveView interface and API, and keeps upstream credentials behind signed, server-validated playback URLs.
A fresh installation is intentionally empty: the application and local infrastructure will start, but catalog content only appears after an authorized Xtream, GIndex, or torrent source is configured and synchronized.
| Area | Current contract |
|---|---|
| Core runtime | TimescaleDB/PostgreSQL and Redis |
| Included local stack | PostgreSQL, Redis, RabbitMQ, Qdrant, and rqbit through Docker Compose |
| Optional integrations | GIndex, torrent sources, TMDB, subtitles, Stripe, embeddings, Qdrant, RabbitMQ |
| Content | Never bundled; every source and credential is operator- or user-supplied |
| Web experience | Public catalog entry, authenticated library, player, settings, billing, and admin surfaces |
| External clients | REST API for mobile/TV clients; those client applications live in separate repositories |
Many IPTV interfaces render an upstream response directly. Streamix instead persists a normalized catalog and places accounts, permissions, favorites, progress, billing rules, background synchronization, and playback delivery around that data.
That makes the application useful as a long-running service, but it also means external systems remain real operational dependencies. Provider availability, rate limits, redirect behavior, source quality, and browser codec support can all affect the final playback experience.
graph TD
CLIENTS[Web / PWA / API clients]
subgraph APP["Streamix application"]
WEB[Phoenix + LiveView]
API[REST API v1]
AUTH[Accounts + Access]
CATALOG[IPTV / GIndex / Torrent]
BILL[Billing]
PARTY[Watch Party]
AI[AI discovery]
TOKEN[Signed stream tokens]
DELIVERY[Resolver / stream proxy]
JOBS[Oban workers]
L1[ConCache L1]
end
subgraph DATA["Data and optional infrastructure"]
DB[(TimescaleDB / PostgreSQL 17)]
REDIS[(Redis)]
QDRANT[(Qdrant)]
RMQ[(RabbitMQ)]
end
subgraph SOURCES["Operator-configured services"]
XT[Xtream providers]
GIDX[GIndex endpoints]
RQBIT[rqbit]
TMDB[TMDB / subtitle APIs]
EMB[Gemini / NVIDIA]
end
CLIENTS --> WEB
CLIENTS --> API
WEB --> AUTH
WEB --> CATALOG
WEB --> BILL
WEB --> PARTY
API --> AUTH
API --> CATALOG
CATALOG --> DB
CATALOG --> L1
CATALOG --> REDIS
CATALOG --> XT
CATALOG --> GIDX
CATALOG --> RQBIT
CATALOG --> TMDB
WEB --> TOKEN
API --> TOKEN
TOKEN --> DELIVERY
DELIVERY --> XT
DELIVERY --> GIDX
DELIVERY --> RQBIT
AI --> EMB
AI --> QDRANT
JOBS --> DB
JOBS -. optional .-> RMQ
sequenceDiagram
participant User
participant UI as LiveView / API
participant Access as Access rules
participant Token as StreamToken
participant Gateway as Resolver / Proxy
participant Source as Configured source
User->>UI: Request playback
UI->>Access: Check identity and content access
Access-->>UI: Authorized
UI->>Token: Sign a source-bound playback token
Token-->>User: Short-lived playback URL
User->>Gateway: Request signed URL
Gateway->>Gateway: Validate token and resolve source
Gateway->>Source: Fetch or redirect using server-held credentials
Source-->>Gateway: HLS / TS / VOD response
Gateway-->>User: Browser-safe playback response
| Area | Public entry points |
|---|---|
| Accounts and authorization | Streamix.Accounts, Streamix.Access |
| Xtream catalog and delivery | Streamix.Iptv |
| GIndex catalog | Streamix.Gindex |
| Torrent catalog and playback | Streamix.Torrent |
| Billing and entitlements | Streamix.Billing |
| Search and recommendations | Streamix.AI |
| Realtime rooms | Streamix.WatchParty |
| Signed playback | StreamixWeb.StreamToken, StreamixWeb.StreamController |
| Background work | Streamix.Workers.*, Oban |
The main integration surface lives under /api/v1. Production clients should send a configured X-API-Key; user resources additionally validate the relevant user token in their controllers.
At runtime, the provider-aware catalog contract is available as OpenAPI JSON at /api/v1/openapi.json and through the interactive UI at /api/v1/docs. Catalog successes consistently return data plus optional meta; errors return stable error.code and error.message fields. See docs/api-v1.md for filters, pagination, examples, and the current breaking-change note.
| Technology | Declared version | Role |
|---|---|---|
| Elixir | ~> 1.20 | Application runtime |
| Erlang/OTP | 29 in CI | Supervision and concurrency |
| Phoenix | ~> 1.8.2 | HTTP, routing, and application shell |
| Phoenix LiveView | ~> 1.2 | Server-rendered interactive UI |
| Ecto SQL | ~> 3.13 | Relational persistence |
| Req + Finch | repository lockfile | HTTP clients and bounded connection pools |
| Oban | ~> 2.18 | Database-backed background jobs |
| Technology | Requirement | Role |
|---|---|---|
| TimescaleDB / PostgreSQL 17 | required | Primary relational store, events, and operational data |
| Redis 8 | required | Shared cache and hot-path coordination |
| Qdrant | optional | Vector search and recommendation data |
| RabbitMQ 4 | optional | Broadway-based queue processing |
| rqbit | optional | Torrent session and byte delivery engine |
| Stripe | optional | Self-service checkout and billing webhooks |
| Technology | Role |
|---|---|
| Tailwind CSS v4 | Design system and responsive styling |
| esbuild | JavaScript bundling and code splitting |
| npm packages in assets/ | Player engines and browser runtime dependencies |
| PWA manifest + service worker | Installability, update lifecycle, and offline shell/metadata caching |
| Playwright | Chromium, Firefox, WebKit, mobile, and PWA regression coverage |
The repository includes .tool-versions for runtime managers such as mise.
docker compose up -dThe default Compose stack starts PostgreSQL, Redis, RabbitMQ, Qdrant, and rqbit. RabbitMQ, Qdrant-backed discovery, and torrent ingestion remain application-level opt-ins even when their local containers are running.
cp .env.example .envSet at least:
The example file already points DATABASE_URL and REDIS_URL at the local Compose services.
cd assets && npm ci && cd ..mix setupThis installs Mix dependencies, creates and migrates the database, runs seeds, installs asset tooling, and builds the frontend.
mix phx.serverOpen http://localhost:4000, sign in with the configured admin account, and add an authorized provider or enable one of the system catalog sources.
Integration profiles| Goal | Main variables |
|---|---|
| Global Xtream catalog | GLOBAL_PROVIDER_ENABLED, GLOBAL_PROVIDER_URL, GLOBAL_PROVIDER_USERNAME, GLOBAL_PROVIDER_PASSWORD |
| GIndex catalog | GINDEX_ENABLED, GINDEX_ENDPOINTS, GINDEX_SYNC_URL, GINDEX_STREAM_URL |
| Torrent catalog | TORRENT_ENABLED, RQBIT_URL, source endpoint variables |
| Metadata and subtitles | TMDB_API_TOKEN, OPENSUBTITLES_API_KEY, SUBDL_API_KEY |
| Semantic discovery | QDRANT_ENABLED, QDRANT_URL, GEMINI_API_KEY or NVIDIA_API_KEY |
| Billing | STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, Stripe price variables |
| External clients | API_KEYS, CORS_ORIGINS |
| Production runtime | SECRET_KEY_BASE, LIVE_VIEW_SIGNING_SALT, PHX_HOST |
See .env.example for the complete, commented contract.
# Backend
mix test
mix test path/to/test.exs
mix test --cover
mix quality
mix precommit
# Frontend
npm --prefix assets run lint
npm --prefix assets test
npm --prefix assets run budget:assets
# Browser and PWA
PLAYWRIGHT_BROWSER=chromium bash scripts/test-playwright-docker.sh
PLAYWRIGHT_BROWSER=firefox bash scripts/test-playwright-docker.sh
PLAYWRIGHT_BROWSER=webkit bash scripts/test-playwright-docker.sh
bash scripts/test-pwa-chromium.shThe Playwright suite requires ffmpeg and generates temporary MPEG-TS fixtures locally. Cross-browser playback therefore stays independent from external IPTV provider availability.
Test commands deliberately ignore the repository .env. Without exported overrides they use the local Compose streamix_test database and Redis database 15. Export TEST_DATABASE_URL or TEST_REDIS_URL for alternate test infrastructure; remote hosts and non-*_test database names still fail closed unless explicitly authorized.
CI runs compilation, Credo, security and dependency audits, coverage floors, Dialyzer, frontend tests, the three Playwright browser engines, mobile/PWA smoke tests, image scanning, and immutable-image provenance checks.
Crafted by Gabriel Maia
gabrielmaialva33@gmail.com ·
GitHub
| Back | FazBrowse Home | New Git URL |