## Summary - Add recoverable soft deletion for users, rooms, playlists, media, and chat messages, with retention-based physical cleanup. - Hide deleted users and owned resources from active API, room, playback, messaging, and realtime paths while preserving restoration metadata. - Add user lifecycle administration across HTTP, gRPC, management runtime, and SyncTV CLI, including deleted-user listing and restore operations. - Add lifecycle migration, cleanup orchestration, audit fields, resource-change events, and refreshed SQLx offline metadata. ## Design - Model account, administrator, system, room, and user deletion sources explicitly so cascade ownership and audit history remain deterministic. - Release email and OAuth identity occupancy during deletion; restoration reclaims available identities and reports conflicts according to restore options. - Preserve recoverable aggregate rows during the retention window, remove ephemeral membership and playback state immediately, and purge expired data in dependency order. - Wait for realtime observation acknowledgements before publishing lifecycle changes to avoid subscription registration races. ## Verification - `make nextest`: 6707 passed, 0 skipped - `make clippy`: passed for the workspace and all targets - `make clippy-check`: passed - `cargo fmt --all -- --check`: passed - `git diff --check`: passed |
2 months ago | |
|---|---|---|
| .cargo | 2 months ago | |
| .config | 2 months ago | |
| .github | 2 months ago | |
| .sqlx | 2 months ago | |
| docs | 2 months ago | |
| helm/synctv | 2 months ago | |
| migrations | 2 months ago | |
| scripts | 2 months ago | |
| synctv | 2 months ago | |
| synctv-adapter | 2 months ago | |
| synctv-api | 2 months ago | |
| synctv-api-common | 2 months ago | |
| synctv-api-grpc | 2 months ago | |
| synctv-api-http | 2 months ago | |
| synctv-cluster | 2 months ago | |
| synctv-common | 2 months ago | |
| synctv-core | 2 months ago | |
| synctv-livestream | 2 months ago | |
| synctv-management | 2 months ago | |
| synctv-media-providers | 2 months ago | |
| synctv-proto | 2 months ago | |
| synctv-proto-build | 2 months ago | |
| synctv-proto-main | 2 months ago | |
| synctv-proto-playback-provider | 2 months ago | |
| synctv-proto-providers | 2 months ago | |
| synctv-proxy | 2 months ago | |
| synctv-realtime | 2 months ago | |
| synctv-xiu | 2 months ago | |
| .dockerignore | 2 months ago | |
| .env.postgres.example | 2 months ago | |
| .env.redis.example | 2 months ago | |
| .env.synctv.example | 2 months ago | |
| .gitattributes | 2 months ago | |
| .gitignore | 2 months ago | |
| CONTRIBUTING.md | 2 months ago | |
| Cargo.lock | 2 months ago | |
| Cargo.toml | 2 months ago | |
| Dockerfile | 2 months ago | |
| LICENSE | 2 months ago | |
| Makefile | 2 months ago | |
| README.md | 2 months ago | |
| README.zh-CN.md | 2 months ago | |
| SECURITY.md | 2 months ago | |
| deny.toml | 2 months ago | |
| docker-compose.dev.yml | 2 months ago | |
| docker-compose.yml | 2 months ago | |
| rust-toolchain.toml | 2 months ago | |
| synctv.example.yaml | 2 months ago | |
README.md
SyncTV
SyncTV is a Rust implementation of a real-time synchronized video watching platform with media provider integration, livestreaming, HTTP/gRPC APIs, and Kubernetes-ready horizontal scaling.
Highlights
- Synchronized room playback with real-time state updates.
- Media providers for Bilibili, Twitch, YouTube, Douyin, TikTok, Huya, Douyu, AcFun, CCTV, Alist, Cloudreve, Emby/Jellyfin, FNOS, QNAP, Synology, Nextcloud, Seafile, TrueNAS, direct URLs, and livestream sources.
- RTMP push/pull, HLS, and HTTP-FLV livestream support.
- RTSP external pull with TCP/UDP transport and live HLS/HTTP-FLV remuxing.
- HTTP REST, public gRPC, WebSocket, management gRPC, metrics, RTMP, and STUN runtime surfaces.
- PostgreSQL-backed durable storage with optional Redis shared state, cache, rate limiting, and cluster coordination.
- Docker Compose and Helm deployment templates.
- Built-in management CLI and optional OpenAPI/Swagger UI.
- Astro Starlight documentation site with English and Simplified Chinese content.
Discussion and Contributors
Join the SyncTV Telegram discussion to talk with users and contributors about deployment, operations, media providers, client development, and the product roadmap.
Quick Start
Development environment from a full repository checkout:
# Starts PostgreSQL and Redis, then runs SyncTV locally with development settings.
make dev-serve
# Starts SyncTV in the background with the same development settings.
make dev-start
make dev-stop
# Starts optional media/auth/storage dependencies too.
make dev-stack
# Runs real CLI/curl provider smoke tests through the Makefile dev startup path.
make dev-smoke
Production Compose uses generated PostgreSQL, Redis, and application secrets:
# Requires Docker Compose and openssl.
make compose-init
# Edit SYNCTV_BOOTSTRAP_ROOT_PASSWORD in .env.synctv before starting.
make compose-up
Validate configuration:
cargo +nightly run -p synctv --bin synctv -- config validate
Optional migration preflight. The server also runs embedded SQLx migrations automatically during startup:
cargo +nightly run -p synctv --bin synctv -- db migrate
Start locally:
cargo +nightly run -p synctv --bin synctv -- serve
Documentation
Read the complete documentation at docs.syncs.tv.
Download the native client from the client downloads guide or SyncTV App releases. Store builds are distributed through the supported app stores.
License
MIT. See LICENSE.