968 B
968 B
AGENTS.md
Project Overview
Single-file Go HTTP server for electronic signature capture and archiving. Frontend HTML is embedded into the Go binary via //go:embed.
Build & Run
# Local development
go run main.go
# Server starts on port 10081
# Cross-compile (Windows/Linux)
build.bat
# Outputs to dist/ with timestamped filenames
Architecture
main.go— Entire backend. Embedsindex.html, serves it at/, handlesPOST /uploadto save base64 PNGs touploads/<name>/<name>+<date>.pngindex.html— Standalone frontend (Tailwind CDN, Phosphor Icons, canvas-based signature)uploads/— Runtime signature storage (gitignored)
Key Constraints
- No
go.modpresent — initialize one if adding dependencies - No tests exist
- Frontend uses CDN resources (Tailwind, Phosphor Icons) — no local build step
- Upload handler validates name non-empty, strips base64 prefix, saves as PNG
- Port is hardcoded to
:10081