Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

199 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

🐱 Miauflix

Miauflix Logo

License: MIT Node.js Docker CI Status

The self-hosted streaming service that meows!

πŸ“‹ Table of Contents

πŸ” Overview

Miauflix is a self-hosted media streaming platform that enables users to discover and stream content from various sources. It provides a modern web interface for accessing media content through peer-to-peer streaming technology. Built with Node.js and designed for personal server deployment, Miauflix offers a customizable streaming solution for your media library.

Philosophy

Miauflix is based on these principles:

Simplicity

Starting Miauflix on your machine or VPS must be as easy as possible. The setup accommodates both beginners and advanced users.

If you’re a beginner running Miauflix locally, run the wizard and start a single Docker containerβ€”you don’t even need to clone this repository.

If you’re an advanced user, everything is ready for you to set up a full website with SSL, custom domain, VPN, and anything else you might need.

Resilience

Miauflix is designed to work with multiple sources. Many are integrated into the codebase so you can use them without installing anything else (simplicity principle).
Others can be added so Miauflix can still work even if those sources are not available anymore.

Note: This principle is not fully implemented yet; integration with Prowlarr and Jackett is planned.

Running everywhere

Miauflix is designed so you can run it in a possibly hostile environment, like a VPS that is partially monitored by the provider.

First part: obfuscation

Miauflix encrypts sensitive data at rest. The application must access the decryption key at runtime; accordingly, a host with root access could also access it.

When SSL is configured, data in transit is protected via HTTPS (TLS). A VPN is recommended for upstream privacy and ISP/provider exposure reduction, but it is not a substitute for HTTPS.
For stronger protection, store encryption keys in an external secrets manager (e.g., HashiCorp Vault, AWS KMS) and inject short‐lived keys at runtime.

Encryption flow diagram for at-rest key handling and HTTPS in transit

Second part: authentication

To run outside your local network, Miauflix must support user authentication.

Miauflix provides a closed authentication system: an admin can create users; self‐signup is not available.

The purpose is to let you deploy your instance of Miauflix in a server exposed to the internet, while ensuring only authorized users can access it.

Speed

Miauflix is designed for fast start times. The tenet is: "When a user clicks Watch Now, streaming should start in under 2 seconds."

To achieve this, Miauflix uses background processing, preloading, and priority queues.

When idle, Miauflix searches for new content and preloads data needed for streaming.

  • Periodic synchronization of TMDB and Trakt.tv lists
  • Periodic source discovery of recently acquired content and re-discovery of older content
  • Pre-download of content marked as "continue watching" (e.g., new episode of a TV show)

Miauflix prioritizes content the user shows intent to watch (e.g., opening a movie detail). If data isn't present, it's fetched with priority and downloading begins so some content is ready when the user clicks Watch Now.

Miauflix supports streaming while downloading.

✨ Features

πŸš€ Currently Available

  • πŸ” User Authentication: Multi-layered authentication system with comprehensive login flows
  • 🎬 Movie Database: TMDB integration for posters, ratings, and metadata
  • πŸ” Source Discovery: Automatic search across multiple content directories (YTS and THERARBG with more to come)
  • πŸ“Ί Video Streaming: Complete peer-to-peer streaming with quality selection
  • πŸ›‘οΈ VPN Integration: Built-in VPN detection and enforcement (optional)
  • πŸ“Š Background Processing: Continuous source discovery and quality scoring
  • πŸ”’ Content Encryption: All source metadata encrypted at rest with AES-256-GCM
  • 🐳 Docker Support: Ready-to-run containers with nginx and SSL
  • πŸ›‘οΈ Cloudflare Bypass: Automatic Cloudflare protection bypass using FlareSolverr

πŸ”§ In Development

  • πŸ”„ Frontend Migration: Updating the frontend to work with the new backend architecture

🎯 Planned Features

  • πŸ“Ί TV Shows: Episode navigation and season management
  • ⛩️ Anime: Anime support
  • 🎯 More Sources: Additional content directories and indexers (1337x, Nyaa, Jackett & Prowlarr)
  • πŸ“± Mobile Apps: Native iOS and Android clients

πŸ—οΈ Project Architecture

miauflix/
β”œβ”€β”€ backend/ # Node.js TypeScript backend
β”‚ β”œβ”€β”€ src/ # Source code
β”‚ └── docs/ # API documentation
β”œβ”€β”€ frontend/ # Client application
β”‚ β”œβ”€β”€ e2e/ # End‐to‐end tests (for frontend)
β”‚ β”œβ”€β”€ storybook/ # Storybook documentation
β”‚ └── src/ # Source code
β”œβ”€β”€ packages/ # Shared libraries
β”‚ β”œβ”€β”€ *-sanitizer/ # Source metadata sanitizer ( used for testing )
β”‚ └── source-metadata-extractor/ # Content metadata processing
β”œβ”€β”€ docs/ # Project documentation
β”œβ”€β”€ nginx/ # Nginx configuration
β”‚ β”œβ”€β”€ conf.d/ # Server blocks
β”‚ β”‚ β”œβ”€β”€ default.conf # Active configuration (auto-generated)
β”‚ β”‚ └── default.conf.template # Configuration template
β”‚ β”œβ”€β”€ certbot/ # Let's Encrypt certificates
β”‚ └── ssl/ # SSL certificates (auto-generated)
β”œβ”€β”€ backend-e2e/ # End‐to‐end tests (for backend)
β”œβ”€β”€ scripts/ # Support scripts
β”œβ”€β”€ docker-compose.yml # Container orchestration

⚑ Quick Setup

Just want to try it? Here's the fastest path:

git clone https://github.com/maury91/miauflix.git && cd miauflix
docker compose run --rm miauflix npm run config-only
docker compose up

First command runs the configuration wizard (TMDB API key, etc.), then start the full stack. No local Node.js installation needed!

πŸš€ Getting Started

Prerequisites

Setup

1. Clone the repository

git clone https://github.com/maury91/miauflix.git
cd miauflix

2. Configure your environment

Option A: Interactive Configuration Wizard (Recommended)

Run the configuration wizard directly on your system:

npm run start:backend

Or run it in Docker's interactive mode:

docker compose run --rm miauflix npm run start:backend

Miauflix Environment Setup Wizard

What does the configuration wizard do?

The application includes a sophisticated configuration system that will:

  • βœ… Automatically detect missing environment variables
  • πŸ§™β€β™‚οΈ Guide you through an interactive setup process
  • πŸ”„ Test API credentials in real-time as you enter them
  • πŸ“ Provide helpful guidance on how to obtain required tokens
  • πŸ” Verify configuration before starting the application
  • πŸ’Ύ Save all settings to a .env file when completed

Option B: Manual Configuration

Create a .env file in the project root directory and configure the required variables:

# Required for media content
TMDB_API_URL=https://api.themoviedb.org/3
TMDB_API_ACCESS_TOKEN=your_tmdb_token
# Optional for list synchronization
TRAKT_API_URL=https://api.trakt.tv
TRAKT_CLIENT_ID=your_trakt_client_id

Note: If running in a non-interactive environment, you'll need to set all required environment variables manually.

3. Set up VPN (Optional)

If you are not planning to use a VPN, you can use the docker-compose-no-vpn.yml file (coming soon).

πŸ”’ NordVPN Setup Instructions

Currently only NordVPN is officially supported. If you want to contribute and use another VPN provider, contributions are welcome!

NordVPN Configuration:

  1. Follow the guide in Bubuntux/NordLynx to obtain your private key
  2. Add your private key to the .env file:
NORDVPN_PRIVATE_KEY=your-nordvpn-private-key

4. Set up HTTPS

Run the interactive SSL setup wizard:

chmod +x setup-ssl.sh
./setup-ssl.sh -d yourdomain.com
πŸ” SSL Setup Details

This wizard will:

  • πŸ” Guide you through domain verification and troubleshooting
  • πŸ“œ Help set up Let's Encrypt certificates (recommended for production)
  • πŸ”’ Or create self-signed certificates (for development/testing)
  • πŸ“‹ Provide step-by-step assistance with clear prompts
  • βš™οΈ Handle validation, certificate requests, and Nginx configuration

For detailed information, see:

5. Start the Docker Compose environment

docker compose up -d

6. Access the application

  • 🌐 App origin: https://yourdomain.com/
  • 🧭 API base: https://yourdomain.com/api
  • βœ… Health check: https://yourdomain.com/api/health

πŸ’» Local Development

For local development without Docker:

Frontend Development

# Use correct version of node
nvm use
# Install dependencies
npm ci
# Build projects
npm run build
# Start frontend with hot reload (recommended for development)
npm run start:frontend

The frontend development server provides:

  • βœ… Hot reload - Changes appear instantly without manual refresh
  • πŸ”₯ Fast feedback - Perfect for UI development and styling
  • πŸš€ Client-side rendering - No SSR overhead during development

Frontend SSR Testing

# Test with Server-Side Rendering (for production-like behavior)
npm run start:frontend:ssr

Use SSR mode when:

  • πŸ” Testing SSR functionality - Debug server-side rendering issues
  • 🎯 Production verification - Ensure production-like behavior

Note: SSR mode requires manual rebuild after changes - use regular dev mode for active development.

Backend Development

# Interactive configuration and start
npm run start:backend
# Development with Docker (includes mock data)
npm run start:backend:e2e

πŸ”„ CI/CD

This project uses GitHub Actions for continuous integration and testing. Tests run automatically in networkless mode using pre-recorded fixtures. For more details, see the CI/CD Guide.

πŸ“š Documentation

For comprehensive guides and development resources, see our Documentation:

🀝 Contributing

Contributions are welcome and appreciated! Here's how you can contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Follow the Development Workflow
  4. Commit your changes: git commit -m 'Add amazing feature'
  5. Push to the branch: git push origin feature/amazing-feature
  6. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with 😻 by the Miauflix team

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /