Docs / Project Structure

Project Structure

go-press/
  cmd/
    server/        server entrypoint
    gendoc/        Swagger generation command
  core/            engine, content, themes, plugins, admin, installer, media, hooks, cache
  themes/          built-in and custom themes
  plugins/         built-in and custom plugins
  sites/           per-host runtime configuration
  pkg/             shared infrastructure packages
  config/          default configuration and config discovery
  docs/            Swagger output and guide documentation
  uploads/         runtime media files and generated variants
  version/         GoPress version constants

Core

core/ contains the framework runtime:

  • engine.go, bootstrap.go, migrate.go, and seeder.go manage startup, migrations, and demo import.
  • content/ owns content, metadata, content types, repositories, queries, and request scopes.
  • theme/ provides the theme interface, BaseTheme runtime, page-bundle loading, template helpers, SEO helpers, and fallback templates.
  • plugin/ defines the plugin interface.
  • admin/ implements the CMS admin UI.
  • rewrite/, cache/, media/, menu/, option/, i18n/, hook/, api/, and installer/ provide shared engine services.

Themes

Themes live under themes/{slug} and usually contain:

theme.go
theme.toml
locales/
demo/data/seed.toml
static/
templates/
  layouts/
  partials/
  pages/

They register with core from init() and are activated by slug.

Plugins

Plugins live under plugins/{slug}. A plugin can register hooks, settings pages, database tables, admin templates, and frontend output through core extension points.

Runtime Sites

sites/{host}/config.toml is generated by the installer or maintained by operators. Generated site configuration should normally be ignored by Git.

Each site can also contain sites/{host}/public/ for generated public artifacts owned by that site. The admin sitemap generator writes sites/{host}/public/sitemap.xml; future generated files such as robots.txt or llms.txt should use the same site-scoped directory.