|
| 1 | +# Streaming Engine Development Guide |
| 2 | + |
| 3 | +## What This Project Is |
| 4 | + |
| 5 | +Streaming Engine is an **audio processing server** — it processes audio on the fly via URL parameters (like Thumbor/Imagor for images, but for audio). It is **not** an AI product. The MCP server integration exists to let LLMs use the audio processing API as a tool, but the core project is a deterministic audio processing pipeline built on FFmpeg. |
| 6 | + |
| 7 | +## Build & Test Commands |
| 8 | +- `just` — List available recipes |
| 9 | +- `just dev` — Run with auto-reload |
| 10 | +- `just build` — Build the project |
| 11 | +- `just test` — Run all tests |
| 12 | +- `just test-name <name>` — Run a specific test |
| 13 | +- `just bench` — Run benchmarks |
| 14 | +- `just lint` — Run linter (clippy) |
| 15 | +- `just fmt` — Format code |
| 16 | +- `just check` — Full check: format, lint, build, test |
| 17 | + |
| 18 | +## Project Structure |
| 19 | +- `src/` — Core streaming engine (Rust) |
| 20 | +- `crates/ffmpeg` — Safe FFmpeg wrapper |
| 21 | +- `crates/ffmpeg-sys` — Raw FFI bindings to FFmpeg |
| 22 | +- `mcp-server/` — MCP integration for LLM tool use (Node.js) |
| 23 | +- `config/` — YAML configuration files |
| 24 | +- `benches/` — Performance benchmarks |
| 25 | +- `scripts/` — Deployment and CI scripts |
| 26 | + |
| 27 | +## Code Style |
| 28 | +- **Imports**: Group std, external crates, then local modules |
| 29 | +- **Error Handling**: Use `color_eyre::Result`, `thiserror` for custom errors |
| 30 | +- **Logging**: Use `tracing` with structured logging and `#[instrument]` for functions |
| 31 | +- **Types**: Prefer explicit types, use `Uuid` for IDs, `DateTime<Utc>` for timestamps |
| 32 | +- **Naming**: snake_case for functions/variables, PascalCase for types, modules in snake_case |
| 33 | +- **Async**: Use `tokio::main` and async/await throughout |
| 34 | +- **API**: Use Axum with `State` extraction and `Json` responses |
0 commit comments