From 67cf53c4e82cd166ab12ff48eae4ae527b42fb18 Mon Sep 17 00:00:00 2001 From: Gregor Lohaus Date: Wed, 8 Apr 2026 04:40:41 +0200 Subject: [PATCH] readme --- .devenv.flake.nix | 4 ++-- README.md | 42 +++++++++++++++++++++++++++++++++--------- package.json | 12 ++++++++++-- 3 files changed, 45 insertions(+), 13 deletions(-) diff --git a/.devenv.flake.nix b/.devenv.flake.nix index 38ae300..e7069ad 100644 --- a/.devenv.flake.nix +++ b/.devenv.flake.nix @@ -17,7 +17,7 @@ ]; hostname = "debian"; username = "anon"; - git_root = null; + git_root = "/home/anon/Dev/glstack"; secretspec = null; }; in @@ -54,7 +54,7 @@ ]; hostname = "debian"; username = "anon"; - git_root = null; + git_root = "/home/anon/Dev/glstack"; secretspec = null; }; devenv = diff --git a/README.md b/README.md index 9f2f951..cf4e968 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,39 @@ -# glstack +# create-glstack -To install dependencies: +Scaffold a fullstack application with a Go backend, SvelteKit frontend, and PostgreSQL database, connected via Connect RPC. -```bash -bun install +> **Work in progress** -- additional frontend frameworks and features are planned for future releases. + +## Usage + +```sh +bun create glstack ``` -To run: +## What you get -```bash -bun run index.ts -``` +A monorepo with the following structure: -This project was created using `bun init` in bun v1.3.10. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime. +- **`services/api`** -- Go backend using [Cobra](https://github.com/spf13/cobra) for CLI, [pgx](https://github.com/jackc/pgx) for Postgres, and [Connect RPC](https://connectrpc.com/) for the API layer +- **`apps/web`** -- SvelteKit frontend with [shadcn-svelte](https://shadcn-svelte.com/), TailwindCSS, [TanStack Query](https://tanstack.com/query), and [Paraglide](https://inlang.com/m/gerre34r/library-inlang-paraglideJs) for i18n +- **`packages/proto`** -- Protobuf service definitions with [Buf](https://buf.build/) for codegen (Go + TypeScript) +- **`packages/rpc`** -- Generated TypeScript Connect RPC client shared across frontend apps + +### Dev environment + +The template includes a [devenv.nix](https://devenv.sh/) configuration that sets up: + +- Go, TypeScript, Bun +- PostgreSQL with an auto-provisioned database +- File watchers for protobuf, SQL, and frontend hot reload +- [Air](https://github.com/air-verse/air) for Go live reload +- [sqlc](https://sqlc.dev/) for type-safe SQL +- [dbmate](https://github.com/amacneil/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 a SvelteKit UI. + +## License + +MIT diff --git a/package.json b/package.json index 280a5ff..11bcd00 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,18 @@ { "name": "create-glstack", "version": "0.0.1", - "module": "index.ts", "type": "module", + "license": "MIT", "bin": { - "create-glstack": "./index.ts" + "create-glstack": "./dist/index.js" + }, + "files": [ + "dist", + "template" + ], + "scripts": { + "build": "bun build ./index.ts --outdir ./dist --target node", + "prepublishOnly": "bun run build" }, "devDependencies": { "@types/bun": "latest"