Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.75 KB

File metadata and controls

51 lines (34 loc) · 1.75 KB

CLAUDE.md — stream Development Guide

Communication

  • Communicate with the user in Chinese.

Project Identity

stream is a video streaming platform built in Rust — a microservice architecture for uploading, processing, and playing back HLS video content.

Architecture

Current crate layout:

crates/
├── app/          # Single binary entry point (CLI + service startup).
├── client/       # stream-client HTTP client crate.
├── client-wasm/  # WASM client (wasm32 target, excluded from workspace).
├── core/         # Shared library. Domain types, DB repos, storage helpers, server, config.
├── gateway/      # Reverse proxy + rate limiting.
├── ingestor/     # Upload + transmux pipeline.
├── meta/         # Video metadata CRUD, share links.
├── server/       # Unified HTTP server wiring.
└── streamer/     # HLS playback + segment caching.

Note: client-wasm has its own [workspace] marker and wasm32-only dependencies (wasm-bindgen, web-sys), so it cannot be compiled under the default host target and is excluded from the Cargo workspace.

System-level design: @docs/design/architecture.md

Development Workflow

All changes — no matter how small — follow the issue → worktree → PR → merge flow. No exceptions.

@docs/guides/workflow.md @docs/guides/commit-style.md

Code Quality

@docs/guides/rust-style.md @docs/guides/code-comments.md

Guardrails

@docs/guides/anti-patterns.md

Testing

  • TDD — write tests first, then implement. No exceptions.
  • Per-crate tests — each lib crate owns its tests. cargo test -p <crate> must pass.
  • No retroactive BDD — never create BDD/integration tests after implementation to backfill. Tests drive the design.