gophenberg

module
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: Apache-2.0

README

Gophenberg

codecov

A plugin-first CMS. Go backend exposing a JSON API, React SPA admin built on top of the WPDS and Gutenberg block editor.

Documentation

What works today

  • Block content authored in the Gutenberg editor, with autosave, revisions, trash and restore
  • A posts list with status filters, counts and sorting, and a trash view
  • Content types registered from the admin, each with its own addresses, archive, and optional nesting
  • A media library storing uploads with derived image sizes, feeding the editor's media blocks from a picker and the inserter
  • Session authentication with login rate limiting, and a users screen for administrators
  • A public site at the root, the admin under /admin, and a read-only content API at /api/content/v1
  • Optional Astro themes through @gophenberg/astro, with the built-in renderer taking over whenever no theme is active or a theme is down
  • Compile-time plugins owning routes, public paths, and their own schema, with a reference plugin serving the posts as an RSS channel

Running it locally

Go as pinned in go.mod, Node 26 with pnpm, and Docker for the PostgreSQL service.

cp .env.example .env
make seed

make seed starts PostgreSQL, applies the migrations, and creates a development administrator (admin@example.com with the password password1234) alongside demo content. Then run the API and the admin in two terminals:

make dev
pnpm install && pnpm --filter @gophenberg/frontend dev

The API listens on localhost:8081 and the admin on localhost:5174, which proxies /api to the API.

To self-host a real deployment instead, follow the install guide.

Writing a theme

A theme is an Astro project depending on @gophenberg/astro. You write your layouts, the kit supplies the routes and the block rendering. test/theme is a working example, and writing a theme walks it.

Writing a plugin

A plugin is a Go package under plugins/ with a plugin.json, compiled in by make generate. plugins/feed is the reference, and write a plugin walks it.

Translating

The admin speaks whatever language its catalogues carry. Translation happens on POEditor, no Git needed, and a weekly job carries the finished work back in one batch. Translate Gophenberg walks it.

License

Copyright (C) 2026 Manuel 'SirLouen' Camargo

Gophenberg is free and open-source software under the Apache License 2.0. Hand-written source files carry an SPDX-License-Identifier: Apache-2.0 header.

Built frontend artifacts bundle @wordpress/* packages licensed under GPL-2.0-or-later. Those combined bundles are conveyed under the terms of the GPLv3, while all original source files in this repository remain Apache-2.0.

Directories

Path Synopsis
cmd
doclint command
Command doclint fails when any Go function under the module lacks a doc comment.
Command doclint fails when any Go function under the module lacks a doc comment.
gophenberg command
Command gophenberg runs the Gophenberg CMS server.
Command gophenberg runs the Gophenberg CMS server.
pluginwire command
Command pluginwire regenerates the plugin wiring files from the plugin.json manifest of every directory under plugins/.
Command pluginwire regenerates the plugin wiring files from the plugin.json manifest of every directory under plugins/.
internal
content
Package content defines the content object at the center of the CMS.
Package content defines the content object at the center of the CMS.
contentbridge
Package contentbridge serves published content to plugins over the sdk seam.
Package contentbridge serves published content to plugins over the sdk seam.
definitions
Package definitions carries the content definitions a plugin declares into the registry.
Package definitions carries the content definitions a plugin declares into the registry.
i18n
Package i18n answers the words and dates a language reads on the public site.
Package i18n answers the words and dates a language reads on the public site.
media
Package media defines the files the media library holds.
Package media defines the files the media library holds.
mediahost
Package mediahost validates uploads and owns the media directory.
Package mediahost validates uploads and owns the media directory.
postgres
Package postgres provides the PostgreSQL data layer for the CMS core.
Package postgres provides the PostgreSQL data layer for the CMS core.
publichtml
Package publichtml prepares stored block content for public delivery.
Package publichtml prepares stored block content for public delivery.
publicsite
Package publicsite renders published content as the built-in public site.
Package publicsite renders published content as the built-in public site.
role
Package role names the roles a Gophenberg account holds and the capabilities they carry.
Package role names the roles a Gophenberg account holds and the capabilities they carry.
seed
Package seed stores the demo data set a development database starts from.
Package seed stores the demo data set a development database starts from.
server
Package server exposes the CMS core over a JSON HTTP API.
Package server exposes the CMS core over a JSON HTTP API.
testdb
Package testdb provides shared PostgreSQL test-database configuration.
Package testdb provides shared PostgreSQL test-database configuration.
themehost
Package themehost validates and runs the prebuilt theme artifacts a site is served from.
Package themehost validates and runs the prebuilt theme artifacts a site is served from.
version
Package version exposes application-wide metadata.
Package version exposes application-wide metadata.
plugins
feed
Package feed serves the published posts as an RSS channel.
Package feed serves the published posts as an RSS channel.
Package sdk defines the contract between the Gophenberg core and its plugins.
Package sdk defines the contract between the Gophenberg core and its plugins.

Jump to

Keyboard shortcuts

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