Project templates for tygor - type-safe HTTP for Go + TypeScript.
Requirements: Go 1.23+, Bun (or npm/pnpm)
# Solid.js (recommended)
bunx degit ahimsalabs/tygor-templates/starter-solid my-app
# React
bunx degit ahimsalabs/tygor-templates/starter-react my-app
# With sqlc (database)
bunx degit ahimsalabs/tygor-templates/starter-sqlc my-app
# Then
cd my-app
bun install
bun dev| Template | Description |
|---|---|
starter-solid |
Solid.js + Vite todo list with LiveValue invalidation |
starter-react |
React + Vite todo list with LiveValue invalidation |
starter-sqlc |
Solid.js + Vite + sqlc (SQLite database) |
Each template includes:
- Go backend with example handlers
- Frontend with type-safe API client
- Hot reload via
@tygor/vite-plugin - Zod validation for runtime type checking
To use a local checkout of tygor instead of the published version:
-
Add a replace directive to
go.mod:replace tygor.dev => ../path/to/tygor -
Set the tygor command in
vite.config.js(wrapped in shell for env var):tygor({ tygorCommand: ["sh", "-c", "GOFLAGS=-mod=mod go run ../path/to/tygor/cmd/tygor \"$@\"", "--"], // ... })
-
Run
go mod tidyto update dependencies:go mod tidy