Getting startedProject layout
Project layout
What hydro new writes to disk, what is safe to commit, and where each kind of change belongs.
A scaffolded project
TEXT
mysite/
├── config.yaml # runtime configuration (see Configuration)
├── content-types/ # one YAML file per content type
│ ├── site_settings.yaml
│ └── faq.yaml
├── data/ # created at first start: SQLite database and media
│ ├── hydro.db
│ └── media/
├── .gitignore
└── README.md| Path | Commit it? | Notes |
|---|---|---|
config.yaml | Yes, without secrets | Put DSNs, keys and passwords in HYDRO_* environment variables or a protected secret file. |
content-types/ | Yes | Your data model. Review changes like code. |
data/ | No | Database and uploaded media. Back it up instead. |
Layout of the HydroGo repository
Useful if you build from source or contribute.
| Path | What lives there |
|---|---|
cmd/hydro | The CLI and HTTP server entrypoint. |
admin/ | Svelte 5 + TypeScript + Tailwind admin panel (embedded into the binary). |
internal/ | Core packages: auth, database, media, collections, search, security, scaffolding. |
modules/ | Content and domain modules: pages, news, members, site, seo, commerce. |
content-types/ | Stock YAML content types. |
migrations/ | SQL migrations for SQLite, PostgreSQL and MySQL. |
packages/client | @hydrohq/client, the typed API client. |
examples/ | Benchmark and side-service examples. |
deploy/, scripts/ | Docker, Caddy, nginx, hosting examples, install scripts, Windows installer. |
docs/ | Guides, API baselines, JSON Schema and decision records. |
Where a change goes
| You are adding… | Put it in |
|---|---|
| A simple content type (FAQ, team, events) | One YAML file in content-types/. No Go, no Svelte. |
| Content module logic | modules/<name>/ with model.go, a service, repository/sqlstore/ and transport/http.go. |
| A shared capability | internal/<name>/. |
| An admin screen | admin/src/routes/<module>/. |
| A database change | A new directory in migrations/ with SQL for all three dialects. |
| A CLI command | Its own file in cmd/hydro/<name>_cmd.go. |
Use
hydro dev (alias of hydro run) or the repository's go run ./tools/devserver while working on HydroGo itself. It rebuilds on save and seeds disposable demo data.