platform-go

module
v0.1.0 Latest Latest
Warning

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

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

README

platform-go

platformgo is a command line tool that creates, generates and maintains Go projects.

Status: early development.

Commands

Command What it does State
platformgo new <module-path> creates a project: wiring, compose, Dockerfile, Makefile, CI ready
platformgo generate [--check] regenerates wiring, .env.example, docker-compose.yml, typed settings; --check fails when stale ready
platformgo plan shows which generated files would change ready
platformgo doctor checks the tools a project needs ready
platformgo apply brings dependencies and managed files in line with platformgo.yaml planned
platformgo verify CI check that managed files are untouched planned
platformgo upgrade moves a project to a new platform version planned
platformgo setup shell completion and the short pgo alias planned

A project is described declaratively in platformgo.yaml — see docs/config.md.

Modules

Module State
postgres — pool, health, pool metrics, transactions, local database in compose ready
settings — business settings from settings.yaml, stored in the database, typed access ready
admin — admin panel: sign in with one time codes, roles, accounts, audit log, settings pages, project pages ready
migrations and query generation, river, api and the rest of docs/modules.md planned

Layout

  • Modules are declared in platformgo.yaml and applied with platformgo apply at any time. Their files come in three kinds: managed belongs to the platform and is rewritten on upgrade, owned is created once and then belongs to the project, generated is rebuilt by generate.
  • Settings of the project and its modules live in platformgo.yaml; versions and hashes of managed files live in platformgo.lock.
  • Libraries of the platform live in github.com/aidarbn/platform-go/kit/...; modules in a project stay a thin layer on top of them.

Documentation

Installation

Available with the first release:

go install github.com/aidarbn/platform-go/cmd/platformgo@latest

License

Copyright 2026 Aidar Babanov.

The platform code — the platformgo tool and the kit libraries — is distributed under the Apache 2.0 license.

Code that platformgo creates inside your project (templates, examples, generated files) belongs to your project: use it, change it and distribute it without any conditions, including without keeping license notices.

Directories

Path Synopsis
cmd
platformgo command
Command platformgo creates, generates and maintains Go projects on the platform.
Command platformgo creates, generates and maintains Go projects on the platform.
internal
gen
Package gen generates project files from platformgo.yaml.
Package gen generates project files from platformgo.yaml.
lock
Package lock reads and writes platformgo.lock: what platformgo has actually applied to a project.
Package lock reads and writes platformgo.lock: what platformgo has actually applied to a project.
registry
Package registry is the catalogue of modules platformgo knows how to wire in.
Package registry is the catalogue of modules platformgo knows how to wire in.
scaffold
Package scaffold creates a new project on the platform.
Package scaffold creates a new project on the platform.
settingsdef
Package settingsdef reads settings.yaml, the business settings schema of a project.
Package settingsdef reads settings.yaml, the business settings schema of a project.
spec
Package spec reads and validates platformgo.yaml, the description of a project.
Package spec reads and validates platformgo.yaml, the description of a project.
version
Package version holds the platform version stamped into new projects.
Package version holds the platform version stamped into new projects.
kit
adminx
Package adminx holds the primitives the admin UI is built from: passwords, one time codes, sessions and the audit log.
Package adminx holds the primitives the admin UI is built from: passwords, one time codes, sessions and the audit log.
confx
Package confx reads settings from environment variables.
Package confx reads settings from environment variables.
logx
Package logx builds an slog logger configured the same way in every project.
Package logx builds an slog logger configured the same way in every project.
modules/admin
Package admin is a platform module: the admin panel of the project, running inside the same binary as the application.
Package admin is a platform module: the admin panel of the project, running inside the same binary as the application.
modules/postgres
Package postgres is a platform module: a PostgreSQL connection pool with a health check, pool metrics and a clean shutdown.
Package postgres is a platform module: a PostgreSQL connection pool with a health check, pool metrics and a clean shutdown.
modules/settings
Package settings is a platform module: business settings of the project, stored in the database and editable without a deploy.
Package settings is a platform module: business settings of the project, stored in the database and editable without a deploy.
pgdb
Package pgdb opens a PostgreSQL connection pool and helps with transactions.
Package pgdb opens a PostgreSQL connection pool and helps with transactions.
settingsx
Package settingsx holds the business settings of a project: the schema, the current values and typed access to them.
Package settingsx holds the business settings of a project: the schema, the current values and typed access to them.

Jump to

Keyboard shortcuts

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