mirror of
https://github.com/hanzoai/service-template.git
synced 2026-10-30 18:22:53 +00:00
github.com/hanzoai/template existed only as loose files: no .git, no history, no remote. Sweeps that look for a .git directory could not see it, and an rm -rf would have destroyed it with nothing to recover from. Committed as-is; no source modified. NOTE: no remote. This is still one copy in one place.
1.6 KiB
1.6 KiB
LLM.md — next-agent handoff for hanzoai/template
This is the canonical skeleton every new Hanzo Go backend starts from. It is kept minimal on purpose: if a feature is not in every service, it does not belong here.
What the skeleton enforces
config/config.gopulls env; nothing else. No flag soup. No YAML.cmd/appd/main.gocallsclaims.AssertGatewayUpstream()at boot. The daemon refuses to start withoutHANZO_GATEWAY_UPSTREAM=1.api/router.gois the one place middleware is wired. Top-to-bottom order:claims.Strip,claims.Inject,claims.RequireGatewayfor tenant routes. Public routes (/healthz,/readyz) mount separately, before the chain.store/store.gois the only caller ofhanzoai/base/store. Handlers callapp.Store.ForCtx(ctx)and get a*dbx.DBscoped to the caller's (org, user).models/example.goshows theorm.Typed[Example]pattern. Replace with your domain types — do not grow a domain-specific layer on top.
What NOT to add
- JWT middleware of any kind. The gateway is the sole verifier.
- A second cache library.
luxfi/cacheis it. nginx,caddy, orenvoyconfigs. Ingress ishanzoai/ingress.- Random
SUMMARY.md/STATUS.md/NOTES.md. OnlyLLM.md. - A Helm chart. Kustomize lives in
hanzoai/platform.
Dependencies
Only three direct imports in go.mod:
github.com/hanzoai/base— runtime + claims + store.github.com/hanzoai/orm— data layer.github.com/luxfi/cache— cache primitives.
Anything else is a review-blocking addition. Third-party libs go through
hanzoai/base/tools/* or get their own module.