Kit

Overview

What stays in the thin gpsystem kit and how it composes the standalone modules.

github.com/gp-system/gpsystem is a thin chassis on top of 12 standalone Go modules: each module (error handling, config loading, the database layer, the async stack, auth, mail, notifications, storage, telemetry, ...) is its own repository, its own go.mod, its own v0.1.0 tag, usable on its own in any Go program. What's left in the kit is a scaffolding CLI and four runtime chassis packages that compose those modules into a running service.

What's in the kit

PackageWhat it does
appthe signal-driven graceful-shutdown process lifecycle every other chassis package sits on: drain, closers (LIFO), telemetry flush
serverthe chi-based HTTP chassis: Config, Run, RegisterFunc, StrictValidator
workerthe background-processing chassis: asynq server + outbox relay + schedule runner, one binary
realtimethe centrifuge-based WebSocket/SSE gateway that pushes notifications to connected clients
cmd/gpsystemthe scaffolding CLI: new project, new module, add surface, add handler, and the rest of the generators

Two more kit-generated (not standalone-module) topics live alongside them, because they don't have a module home of their own: migrations (the cmd/migrate convention, built on dbx/pg) and social login (OAuth2 provider wiring generated on top of the auth module).

Glue, not a framework

The kit does not hide the modules behind an interface, a container or a facade: it composes them. server.Run, worker.Run and realtime.Run each wire a chosen subset of the 12 modules into a runnable process, and the CLI generates that wiring so you rarely write it by hand, but the wiring itself stays plain, explicit Go code in your main.go. This is the same "centralize, don't abstract" principle the whole project is built on: raw types from the underlying libraries (chi.Router, *asynq.Task, centrifuge.Node) are visible in the kit's own API rather than wrapped away. The Architecture page has the full module map this thin layer sits on top of.

Install

For the CLI:

go install github.com/gp-system/gpsystem/cmd/gpsystem@latest

For using the chassis packages (app, server, worker, realtime) in a project:

go get github.com/gp-system/gpsystem@latest

Scaffolding a new project with gpsystem new project adds this dependency to the generated go.mod automatically, so you rarely run the second command by hand; it matters mainly if you're wiring a chassis package into an existing, hand-rolled project.

Why use the kit at all

Nothing here is required. Every one of the 12 modules works standalone, in any Go program, with no kit installed: dbx/pg, auth, queue, and the rest have zero dependency on github.com/gp-system/gpsystem. The kit exists to save you from hand-wiring lifecycle, telemetry bootstrap, HTTP routing, and worker/task dispatch yourself, and from writing the TypeSpec→OpenAPI→server-code generators that turn a spec into a runnable surface. If you don't want that (say, you're bolting one module onto an existing service), skip the kit and import the modules you need directly; see Getting started for how the pieces fit together either way.

Where to next

Copyright © 2026