Help us shape the future of Go! Take the 2026 Go Developer Survey

core

module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0

Directories

Path Synopsis
Package app is the hatamoto entry point: `serve` and the operator commands.
Package app is the hatamoto entry point: `serve` and the operator commands.
cmd
hatamoto command
Command hatamoto is the single hatamoto binary:
Command hatamoto is the single hatamoto binary:
internal
admin
Package admin is the server-rendered admin UI: html/template pages from backend/web, htmx for interactivity, the same session cookie and stores as the JSON API.
Package admin is the server-rendered admin UI: html/template pages from backend/web, htmx for interactivity, the same session cookie and stores as the JSON API.
admin/a11y
Package a11y is the no-browser accessibility checker run over every golden page and partial: structural rules on the HTML (names, landmarks, ids, headings, tables, dialogs, CSP-hostile attributes) plus contrast and CSS lint on the tokens.
Package a11y is the no-browser accessibility checker run over every golden page and partial: structural rules on the HTML (names, landmarks, ids, headings, tables, dialogs, CSP-hostile attributes) plus contrast and CSS lint on the tokens.
admin/schemaform
Package schemaform renders a JSON Schema as an HTML form and reads the form back into JSON.
Package schemaform renders a JSON Schema as an HTML form and reads the form back into JSON.
admin/starter
Package starter installs the optional starter content of the setup wizard: a home page with sections, About and Contact pages, two blog posts, header and footer menus and a contact form.
Package starter installs the optional starter content of the setup wizard: a home page with sections, About and Contact pages, two blog posts, header and footer menus and a contact form.
admin/ui
Package ui holds the typed shapes of the admin partials (web/admin/partials).
Package ui holds the typed shapes of the admin partials (web/admin/partials).
adminpath
Package adminpath holds the rules for the per-install admin address: its format, how strong it is, the list of addresses scanners try, and (in generate.go) the random generator.
Package adminpath holds the rules for the per-install admin address: its format, how strong it is, the list of addresses scanners try, and (in generate.go) the random generator.
agents
Package agents is the single source of truth for known AI crawlers and assistants: who they are, what they are for, and (in later phases) how to verify them.
Package agents is the single source of truth for known AI crawlers and assistants: who they are, what they are for, and (in later phases) how to verify them.
analytics
Package analytics keeps the only first-party analytics Hatamoto needs: pageviews and AI-assistant referrals, rolled up per day.
Package analytics keeps the only first-party analytics Hatamoto needs: pageviews and AI-assistant referrals, rolled up per day.
auth
Package auth provides authentication and authorization functionality.
Package auth provides authentication and authorization functionality.
author
Package author is the legacy authors table, kept for rollback.
Package author is the legacy authors table, kept for rollback.
backup
Package backup produces and manages owner-run backups: one tar per backup holding the core dump, one dump per plugin schema, the portability export and a manifest.
Package backup produces and manages owner-run backups: one tar per backup holding the core dump, one dump per plugin schema, the portability export and a manifest.
budgetfile
Package budgetfile compares measured sizes against a committed baseline.
Package budgetfile compares measured sizes against a committed baseline.
builder
Package builder is the page_doc v2 model: a tree of layout nodes with a validator, pure edit ops, a closed style vocabulary and v1 section conversion.
Package builder is the page_doc v2 model: a tree of layout nodes with a validator, pure edit ops, a closed style vocabulary and v1 section conversion.
cache
Package cache is the in-process cache for rendered HTML, sitemaps and site data.
Package cache is the in-process cache for rendered HTML, sitemaps and site data.
config
Package config provides application configuration loading from environment variables.
Package config provides application configuration loading from environment variables.
database
Package database provides PostgreSQL connection management with multi-tenant RLS support.
Package database provides PostgreSQL connection management with multi-tenant RLS support.
email
Package email provides email sending functionality for the application.
Package email provides email sending functionality for the application.
email/smtptest
Package smtptest is a minimal in-process SMTP server for tests.
Package smtptest is a minimal in-process SMTP server for tests.
entity
Package entity provides a schema-driven JSON-LD generator that reads x-schema-org-type and x-schema-org-property annotations from JSON Schema definitions to produce structured data conforming to Schema.org vocabulary.
Package entity provides a schema-driven JSON-LD generator that reads x-schema-org-type and x-schema-org-property annotations from JSON Schema definitions to produce structured data conforming to Schema.org vocabulary.
form
Package form provides domain models and repository interfaces for form management.
Package form provides domain models and repository interfaces for form management.
hooks
Package hooks is the host-side engine behind the SDK's typed actions and filters (see pkg/sdk/hooks.go).
Package hooks is the host-side engine behind the SDK's typed actions and filters (see pkg/sdk/hooks.go).
httpx
Package httpx is the thin layer over net/http.ServeMux that gives the server prefixed, middleware-carrying route groups and a record of every registered pattern (for the route-table test and `hatamoto routes`).
Package httpx is the thin layer over net/http.ServeMux that gives the server prefixed, middleware-carrying route groups and a record of every registered pattern (for the route-table test and `hatamoto routes`).
importjob
Package importjob runs the WordPress import of the admin wizard: a scan and an import as background jobs on the server's process, their state in hatamoto_import_runs so a restarted server can resume them, and the source credential sealed at rest until the run completes.
Package importjob runs the WordPress import of the admin wizard: a scan and an import as background jobs on the server's process, their state in hatamoto_import_runs so a restarted server can resume them, and the source credential sealed at rest until the run completes.
installstats
Package installstats is the opt-in, anonymous install stats sender.
Package installstats is the opt-in, anonymous install stats sender.
linking/v2
Package v2 implements the Internal Linking v2 architecture defined in plans/ADR-internal-linking-v2.md.
Package v2 implements the Internal Linking v2 architecture defined in plans/ADR-internal-linking-v2.md.
mailsettings
Package mailsettings stores the SMTP settings an owner saves in the admin.
Package mailsettings stores the SMTP settings an owner saves in the admin.
mcpserver
Package mcpserver is the Model Context Protocol endpoint (/mcp): the tools an AI agent uses to draft, publish and inspect a site.
Package mcpserver is the Model Context Protocol endpoint (/mcp): the tools an AI agent uses to draft, publish and inspect a site.
media
Package media provides media file management functionality.
Package media provides media file management functionality.
menu
Package menu provides domain models and repository interfaces for menu management.
Package menu provides domain models and repository interfaces for menu management.
middleware
Package middleware provides HTTP middleware for the API server.
Package middleware provides HTTP middleware for the API server.
packages
Package packages implements the .hmp package format (a zip holding a plugin or a theme), its zip-safety rules, ed25519 signing, the signed registry index and the Postgres store plus manager that installs, activates and removes packages while the server runs.
Package packages implements the .hmp package format (a zip holding a plugin or a theme), its zip-safety rules, ed25519 signing, the signed registry index and the Postgres store plus manager that installs, activates and removes packages while the server runs.
permtext
Package permtext holds the plain-English wording for plugin permissions, shared by the admin install prompt, the public plugin directory and the static registry page.
Package permtext holds the plain-English wording for plugin permissions, shared by the admin install prompt, the public plugin directory and the static registry page.
person
Package person is the read model of people: every human and every byline is an entity of the builtin `person` content type.
Package person is the read model of people: every human and every byline is an entity of the builtin `person` content type.
pluginhost
Package pluginhost connects the WASM plugin runtime (internal/wasmhost) to the rest of the core: it loads plugins from a directory, maps their exports onto the hooks engine, and keeps the settings store and the adapters that turn core events into SDK hook payloads.
Package pluginhost connects the WASM plugin runtime (internal/wasmhost) to the rest of the core: it loads plugins from a directory, maps their exports onto the hooks engine, and keeps the settings store and the adapters that turn core events into SDK hook payloads.
pluginhost/plugintest
Package plugintest builds the test plugins under internal/pluginhost/testdata for tests in any package.
Package plugintest builds the test plugins under internal/pluginhost/testdata for tests in any package.
portability
Package portability writes and reads the full-site archive behind `hatamoto export` and `hatamoto import` (format described in docs/EXPORT.md).
Package portability writes and reads the full-site archive behind `hatamoto export` and `hatamoto import` (format described in docs/EXPORT.md).
recovery
Package recovery keeps the unsaved work of an editor or builder session on the server: one copy per (user, entity), so a closed tab or another browser can offer it back.
Package recovery keeps the unsaved work of an editor or builder session on the server: one copy per (user, entity), so a closed tab or another browser can offer it back.
release
Package release defines the signed release formats: the release record (one per version, signed by an offline release key) and the channel manifest (the list of releases a channel offers, signed by the CI manifest key), and verifies them.
Package release defines the signed release formats: the release record (one per version, signed by an offline release key) and the channel manifest (the list of releases a channel offers, signed by the CI manifest key), and verifies them.
render
Package render renders the public site from layered html/template themes.
Package render renders the public site from layered html/template themes.
safefetch
Package safefetch is the outbound-network guard shared by plugin http.fetch and the WordPress importer: it resolves a host itself, refuses private, loopback, link-local, metadata and other non-public addresses, and connects to the checked IP literal so DNS cannot answer differently between the check and the connect (rebinding).
Package safefetch is the outbound-network guard shared by plugin http.fetch and the WordPress importer: it resolves a host itself, refuses private, loopback, link-local, metadata and other non-public addresses, and connects to the checked IP literal so DNS cannot answer differently between the check and the connect (rebinding).
secretbox
Package secretbox seals small secrets (such as API keys) at rest with AES-256-GCM, keyed from the server's secret in a caller-chosen domain.
Package secretbox seals small secrets (such as API keys) at rest with AES-256-GCM, keyed from the server's secret in a caller-chosen domain.
sectiontemplate
Package sectiontemplate provides domain models and data operations for section templates.
Package sectiontemplate provides domain models and data operations for section templates.
server
Package server provides infrastructure initialization.
Package server provides infrastructure initialization.
session
Package session is the server-side session store for admin logins.
Package session is the server-side session store for admin logins.
siteconfig
Package siteconfig reads the singleton site configuration row (hatamoto_site_config).
Package siteconfig reads the singleton site configuration row (hatamoto_site_config).
spam
Package spam holds the site-wide spam protection settings and the checks the public form handlers run on every submission.
Package spam holds the site-wide spam protection settings and the checks the public form handlers run on every submission.
supervisor
Package supervisor runs the hatamoto server as a child process, picks which binary it runs from $HATAMOTO_DATA/releases, health-gates every switch and rolls back on its own.
Package supervisor runs the hatamoto server as a child process, picks which binary it runs from $HATAMOTO_DATA/releases, health-gates every switch and rolls back on its own.
taxonomy
Package taxonomy implements the Phase-2 Hatamoto first-class taxonomy system: tags and categories as a proper many-to-many model that works across every entity schema (not just blog posts), backed by the hatamoto_terms and hatamoto_entity_terms tables introduced in migration 113.
Package taxonomy implements the Phase-2 Hatamoto first-class taxonomy system: tags and categories as a proper many-to-many model that works across every entity schema (not just blog posts), backed by the hatamoto_terms and hatamoto_entity_terms tables introduced in migration 113.
testutil
Package testutil holds the small assertion helpers shared by tests, so they stay on the stdlib testing package.
Package testutil holds the small assertion helpers shared by tests, so they stay on the stdlib testing package.
updater
Package updater is the on-box update agent: it reads the signed channel manifest, picks a target under policy, and stages it for the supervisor.
Package updater is the on-box update agent: it reads the signed channel manifest, picks a target under policy, and stages it for the supervisor.
urlpattern
Package urlpattern implements the URL pattern mini-language used for per-schema public routing: parsing, rendering an entity to a path, matching a path back to its variables, and a Router that resolves a path to the schemas that may serve it.
Package urlpattern implements the URL pattern mini-language used for per-schema public routing: parsing, rendering an entity to a path, matching a path back to its variables, and a Router that resolves a path to the schemas that may serve it.
user
Package user provides user domain models and repository interfaces.
Package user provides user domain models and repository interfaces.
wasmhost
Package wasmhost runs Hatamoto plugins: Extism (wazero) modules built from standard Go (or any Extism PDK language) with a hard sandbox.
Package wasmhost runs Hatamoto plugins: Extism (wazero) modules built from standard Go (or any Extism PDK language) with a hard sandbox.
webhook
Package webhook sends signed outgoing webhooks.
Package webhook sends signed outgoing webhooks.
wpimport
Package wpimport imports a WordPress site into Hatamoto from its REST API or a WXR export: scan report, runner (settings, terms, authors, media, pages, posts, custom post types, menus, redirects, link rewrite) and URL audit.
Package wpimport imports a WordPress site into Hatamoto from its REST API or a WXR export: scan report, runner (settings, terms, authors, media, pages, posts, custom post types, menus, redirects, link rewrite) and URL audit.
Package migrations embeds the core goose migrations so the hatamoto binary can migrate its own database.
Package migrations embeds the core goose migrations so the hatamoto binary can migrate its own database.
tools
changelog command
Command changelog creates and updates release entries on /changelog.
Command changelog creates and updates release entries on /changelog.
fakesite command
Command fakesite is a static file server that logs every request as one JSON line.
Command fakesite is a static file server that logs every request as one JSON line.
licenses command
Command licenses scans the licences of every Go module that is compiled into the hatamoto binary, its tests, or the plugin SDK, and optionally writes a bundle of their licence texts.
Command licenses scans the licences of every Go module that is compiled into the hatamoto binary, its tests, or the plugin SDK, and optionally writes a bundle of their licence texts.
release command
Command release makes and checks signed Hatamoto releases.
Command release makes and checks signed Hatamoto releases.
vendor command
Command vendor fetches and verifies the third-party browser assets the Go admin ships (htmx, SortableJS, Tiptap).
Command vendor fetches and verifies the third-party browser assets the Go admin ships (htmx, SortableJS, Tiptap).
Package web holds the files the Go admin ships inside the binary: templates, CSS and JS (admin/) and the pinned third-party assets (vendor/, see tools/vendor).
Package web holds the files the Go admin ships inside the binary: templates, CSS and JS (admin/) and the pinned third-party assets (vendor/, see tools/vendor).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL