Skip to content

Mr-Dark-debug/cinepair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CinePair Logo

CinePair is a premium, minimal, native-feeling desktop application for couples and friends to watch movies together in real-time. Built using Tauri v2, React/Vite (TypeScript), Tailwind CSS v4, and a FastAPI Socket.IO signaling backend.

Media streams (camera, microphone, and high-fidelity screen share with mixed audio) flow strictly Peer-to-Peer (P2P) via WebRTC to eliminate server bandwidth costs, leveraging the W3C Perfect Negotiation pattern for robust signaling glare resolution.


🚀 How to Run locally

Follow these simple instructions to launch the signaling backend and the desktop app on your local machine.

Part A: Running the Backend (Signaling Server)

The backend is built with Python and FastAPI. We use uv for ultra-fast package management.

  1. Navigate to the backend directory:

    cd backend
  2. Initialize the virtual environment:

    uv venv

    Note: This creates a virtual environment inside .venv.

  3. Install the dependencies:

    uv pip install -r requirements.txt
  4. Start the local server:

    .venv\Scripts\python -m uvicorn app.main:socket_app --host 127.0.0.1 --port 8000 --reload

    The signaling server is now operational at http://127.0.0.1:8000.


Part B: Running the Frontend (Tauri Desktop App)

The desktop application is built with React and Rust.

  1. Ensure you are in the root directory (cinepair/):

    cd ..
  2. Install frontend node dependencies:

    npm install
  3. Launch the app in Development/Hot-reload mode:

    npm run tauri dev

    This compiles the Rust backend core and launches the React client in a native Windows OS frame connected to your local signaling server.


🛠️ Fixing the Rust Build Error: "Application Control policy has blocked this file"

If you encounter this compilation error during npm run tauri dev or npm run tauri build:

error: failed to run custom build command for `camino v1.2.2`
Caused by: could not execute process `...build-script-build`
An Application Control policy has blocked this file. (os error 4551)

Why it happens:

Windows Smart App Control (SAC), AppLocker, or Windows Defender Application Control (WDAC) blocks the execution of temporary unsigned binary helper files (like build-script-build.exe generated by Cargo) compiled inside the project's nested src-tauri/target/ folders.

How to fix it:

You must tell Cargo to compile build artifacts inside a trusted, system-approved folder (such as AppData Local Temp or a directory you've whitelisted).

Solution 1: PowerShell Workaround (Recommended)

Set the CARGO_TARGET_DIR environment variable in your terminal before launching the dev server:

$env:CARGO_TARGET_DIR = "$env:USERPROFILE\AppData\Local\Temp\cargo-target"
npm run tauri dev

Solution 2: Make it Permanent (Windows System Environment)

  1. Open terminal and run:
    setx CARGO_TARGET_DIR "$env:USERPROFILE\AppData\Local\Temp\cargo-target"
  2. Restart your terminal/editor to reload the environment variables and run:
    npm run tauri dev

Solution 3: Add Windows Defender Exclusions

  1. Open Windows Security > Virus & threat protection > Manage settings > Exclusions.
  2. Click Add or remove exclusions.
  3. Add your D:\projects\cinepair\ folder to the exclusions.

🎨 Layout & Architecture Specifications

  • Atomic React Interface: Developed responsive layouts matching your design reference frames (Stage central viewport, Waiting list overlays, Collapsible sidebars, bottom carousels, and emoji physics).
  • Web Audio Mixer: Connects microphone and screenshare system audio tracks into a single unified AudioContext mapping to WebRTC senders on the fly.
  • Signaling Relayer: Relays SDP exchanges and broadcasts room status changes, administrative actions (remote force-mute, admin transfers, guest kick outs), chat threads, and screenshots.