add full source: transcribe pipeline, HTTP API, OpenAI endpoint, web UI, Docker

This commit is contained in:
2026-09-09 16:04:10 +08:00
parent 757861f1dd
commit 7010da8855
19 changed files with 2918 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
package server
import (
"embed"
"net/http"
)
// uiFS embeds the single-page web console so the binary stays self-contained —
// no external frontend to deploy. The HTML/CSS/JS is one file; the SPA calls
// the existing /api/* endpoints with a user-supplied password (X-Api-Key).
//
//go:embed ui/index.html
var uiHTML []byte
// handleUI serves the embedded console at the site root. It is public (the
// shell is just static markup); all sensitive data is fetched via the
// authenticated /api/* routes from the browser.
func (s *Server) handleUI(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Header().Set("Cache-Control", "no-store")
_, _ = w.Write(uiHTML)
}
// keep embed.FS referenced for future file-tree growth without API churn.
var _ embed.FS