Development tools of a webtyp app (database diagram, API explorer).
Today, appkit mounts the database diagram and API route table on every server, and always shows "API explorer" and "Database" in the menu. Since appkit is production-only, those screens end up shipping to production.
These tools now live in this repository behind the dev build tag. When built with -tags dev, they are mounted to the app. When built without -tags dev (like in production), they return nothing and are omitted entirely from the binary.
Generated mains of every app call the tools unconditionally, but in production they return nothing:
// web/server/main.go
func main() {
if err := appkit.Server(config.App, config.Schema, devtools.Server(config.Schema)...); err != nil {
log.Fatal(err)
}
}// web/browser/main.go
func main() {
appkit.Browser(config.App, devtools.Menu())
}| Resource | Description |
|---|---|
docs/ARCHITECTURE.md |
Architecture decisions, tag pairs, missing init, and security of mounts |