Files
create-glstack/README.md

1.6 KiB

create-glstack

Scaffold a fullstack application with a Go backend, PostgreSQL database, and your choice of web and mobile frontends, connected via Connect RPC.

Supported web frontends:

Supported mobile frontends:

Usage

bun create glstack

What you get

A monorepo with the following structure:

  • services/api -- Go backend using Cobra for CLI, pgx for Postgres, and Connect RPC for the API layer
  • apps/web -- Web frontend app (SvelteKit or Solid Start)
  • apps/mobile -- Optional React Native + Expo mobile app sharing the same RPC client
  • packages/proto -- Protobuf service definitions with Buf for codegen (Go + TypeScript)
  • packages/rpc -- Generated TypeScript Connect RPC client shared across frontend apps

Dev environment

The template includes a devenv.nix configuration that sets up:

  • Go, TypeScript, Bun, Node.js
  • PostgreSQL with an auto-provisioned database
  • File watchers for protobuf, SQL, and frontend hot reload with proper process dependency ordering
  • Air for Go live reload
  • sqlc for type-safe SQL
  • dbmate for database migrations

Starter example

The generated project includes a working Todo CRUD example wired end-to-end: protobuf schema, Go service implementation, SQL queries, and frontend UI.

License

MIT