fixing small things
This commit is contained in:
26
AGENTS.md
26
AGENTS.md
@@ -6,29 +6,6 @@ Always read `project-context.md` before making code or documentation changes. If
|
||||
## 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.
|
||||
|
||||
## Stack
|
||||
- Backend: Go 1.24, standard library only.
|
||||
- Frontend: Vanilla HTML, CSS, and JavaScript. No framework or build step.
|
||||
- Static assets: embedded with Go `embed` from `web/`.
|
||||
- Runtime port: `8080`.
|
||||
- Container: multi-stage Docker build from `golang:1.24-alpine` to `alpine:latest`.
|
||||
|
||||
## Current Files
|
||||
- `project-context.md` - canonical project context and implementation rules for agents.
|
||||
- `main.go` - HTTP server, embedded static file serving, environment-driven Transmission RPC client, connection warning page, API routes.
|
||||
- `web/index.html` - SPA shell and toolbar controls.
|
||||
- `web/app.js` - frontend state, polling, in-place rendering, sorting, pause/resume actions.
|
||||
- `web/styles.css` - dark-only UI theme and responsive layout.
|
||||
- `go.mod` - module `transmission-manager`, Go 1.24.
|
||||
- `Dockerfile` - production container build.
|
||||
|
||||
## Core API Surface
|
||||
- `GET /` serves a Transmission connection warning page when setup fails; otherwise it serves the embedded frontend.
|
||||
- `GET /api/torrents` returns Transmission torrent data.
|
||||
- `GET /api/stats` returns global session stats.
|
||||
- `POST /api/torrents/{id}/pause` maps to Transmission `torrent-stop`.
|
||||
- `POST /api/torrents/{id}/resume` maps to queue-respecting Transmission `torrent-start`.
|
||||
|
||||
## 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.
|
||||
@@ -39,8 +16,7 @@ Transmission Manager is a lightweight single-binary Go web app for managing and
|
||||
- Keep UI dark-only, modern, compact, responsive, and based on CSS variables.
|
||||
|
||||
## Transmission RPC Notes
|
||||
- Default RPC URL: `http://192.168.20.22:3210/transmission/rpc`.
|
||||
- Override the RPC URL with `TRANSMISSION_URL`.
|
||||
- RPC URL read from `TRANSMISSION_URL` (must be set).
|
||||
- Optional HTTP Basic Auth credentials come from `TRANSMISSION_RPC_USERNAME` and `TRANSMISSION_RPC_PASSWORD`; unset, empty, or literal `null` values mean no credential value.
|
||||
- Handle the Transmission session-ID handshake:
|
||||
1. POST to the RPC URL.
|
||||
|
||||
Reference in New Issue
Block a user