Skip to content

Local development

This page takes you from a fresh clone to a running Gophenberg with demo content and a login.

You need three tools installed: Go (the version pinned in go.mod), Node 26 with pnpm, and Docker (it runs the PostgreSQL database, and nothing else).

Terminal window
git clone https://github.com/gopherium/gophenberg
cd gophenberg
cp .env.example .env

The example file points the server at the development database and needs no editing.

Terminal window
make seed

This starts PostgreSQL in Docker, applies the database migrations, and creates a development login plus demo posts. The login is admin@example.com with the password password1234.

In two terminals:

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

The first runs the API on localhost:8081. The second runs the admin on localhost:5174, which forwards /api calls to the first, so the login cookie works without any HTTPS setup.

  • Open localhost:5174 and log in with the seeded account. You land in the admin with demo posts to play with.
  • Open localhost:8081 for the public site, served by the built-in renderer.

From here, the posts list shows you around the admin, and how theming works explains the public site.