Skip to main content
HydroGo
ReferenceCode map & folder structure

Code map & folder structure

Where everything lives in the repository and how layers import each other. Generated by go run ./tools/codegraph and enforced in CI.

HydroGo enforces strict architectural boundaries between the binary entrypoint, shared internal capabilities, and domain modules. You can explore the full interactive dependency graph in codegraph.html.

Repository layout

DirectoryPurpose
cmd/hydro/CLI commands (serve, new, init, doctor, mcp, migrate, backup, audit) and server wiring.
admin/Embedded Svelte 5 + TypeScript + Tailwind admin SPA (compiled into internal/adminui/dist).
internal/Cross-cutting core engine: database dialects, collections, cache, security, MCP, media, auth, outbox, audit.
modules/Feature modules: pages, news, members, site, seo, commerce.
extension/Public Go extension SDK (extension/v1).
content-types/Stock declarative YAML content-type definitions used by presets.
migrations/Dialect-complete SQL migrations (SQLite, PostgreSQL, MySQL).
packages/client/Typed @hydrohq/client TypeScript API client.
tools/Developer harness and CI guards (check, codegraph, codeguard, moduleguard, bench).

Layer dependency map

LayerPackagesPurpose
cmd1Binary entry points: CLI commands, server composition, HTTP routes and admin APIs.
extension2Public extension SDK.
internal87Cross-cutting capabilities: auth, database, outbox, jobs, mailer, audit, config and more.
modules17Feature modules: pages, news, members, site, seo, commerce.
tests3Contract and end-to-end tests.
tools13Repository guards and developer tooling.
Open [codegraph.html](/codegraph.html) for the interactive package dependency graph generated by `go run ./tools/codegraph`.
Interactive Graph