Files
zeekay 1943f1c093 Hanzo Commerce
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans,
usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0.

Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
2026-09-23 21:52:16 -07:00

25 lines
655 B
Go

// Package checkout: this file embeds the Vite-built pay SPA into the commerce
// binary. The pay repo builds it and publishes it as ghcr.io/hanzoai/pay; the
// Dockerfile copies /srv out of that image into ui/dist. Local Go test runs
// only need the .gitkeep in ui/dist/ so the go:embed directive resolves.
package checkout
import (
"embed"
"io/fs"
)
// UIFS is the embedded checkout SPA bundle. Mirror of admin/embed.go.
//
//go:embed all:ui/dist
var UIFS embed.FS
// UISub returns the dist/ subtree as an fs.FS — ready for http.FS.
func UISub() fs.FS {
sub, err := fs.Sub(UIFS, "ui/dist")
if err != nil {
return embed.FS{}
}
return sub
}