2.1 KiB
2.1 KiB
Transmission Manager - Agent Guide
First Rule
Always read project-context.md before making code or documentation changes. If a change alters project purpose, architecture, APIs, file roles, workflows, constraints, or implementation patterns, update project-context.md in the same change.
Quick Summary
Transmission Manager is a lightweight single-binary Go web app for managing and viewing torrents in a Transmission RPC client. It serves a dark-mode vanilla HTML/CSS/JS SPA and proxies Transmission RPC calls through a minimal Go backend.
Implementation Guidelines
- Keep the backend stdlib-only. Do not add Gin, Fiber, Chi, Gorilla, or other Go web frameworks.
- Keep the frontend dependency-free. Do not add React, Vue, Svelte, bundlers, package managers, or transpilers.
- Preserve the single-binary model: static frontend files should remain embedded via
embed. - Format display numbers in the frontend unless there is a clear backend reason.
- Preserve in-place frontend updates during polling. Do not replace the whole torrent list on each refresh.
- Keep polling lightweight and avoid overlapping refresh requests.
- Keep UI dark-only, modern, compact, responsive, and based on CSS variables.
Transmission RPC Notes
- RPC URL read from
TRANSMISSION_URL(must be set). - Optional HTTP Basic Auth credentials come from
TRANSMISSION_RPC_USERNAMEandTRANSMISSION_RPC_PASSWORD; unset, empty, or literalnullvalues mean no credential value. - Handle the Transmission session-ID handshake:
- POST to the RPC URL.
- If the response is
409, readX-Transmission-Session-Id. - Retry the same request with that header.
- Cache the session ID behind a mutex.
- "Peers at 100%" means count
peers[]entries whereprogress === 1.0. doneDateis a Unix timestamp;0means unfinished.
Do Not
- Do not add authentication unless explicitly requested.
- Do not add CI/CD or GitHub Actions.
- Do not create a GitHub repository.
- Do not vendor dependencies.
- Do not add broad tests or infrastructure for small changes; keep verification proportional.