0.1.0-dev · Go 1.27 · CGO_ENABLED=0
Full-stack Go.
One static binary.
Compiled HTML templates, live server components, a typed SQL query builder, background jobs, and pub/sub in standalone Go modules. Builds with CGO_ENABLED=0 and no Node on PATH.
$ git clone https://github.com/fletchhq/fletch && cd fletch$ GOWORK=off CGO_ENABLED=0 go install ./cmd/fletch- CGO_ENABLED=0
- 0 npm packages
- 1 static binary
- Go 1.27
<layouts.App title={i.Name}>
<slot:head>
<meta name="description" content={"The home page of " + i.Name}>
</slot:head>
<section class="home">
<h1>Welcome to {i.Name}</h1>
<p>Edit modules/home/views/index.crest, then run fletch gen.</p>
{if len(i.Notes) > 0}
<h2>Notes <components.Badge label={i.NoteCount()} /></h2>
<ul>
{for _, n := range i.Notes key n.ID}
<li>{n.Body}</li>
{/for}
</ul>
{/if}
</section>
</layouts.App>type Counter struct {
Count int
Open live.Local[bool]
Draft live.Local[string]
Saving live.Shared[bool]
}
func (c *Counter) Mount(ctx *live.Ctx) error {
return nil
}
func (c *Counter) Inc(ctx context.Context) error {
c.Count++
return nil
}
// Mount on the router:
// fletch.MountLive(r, "counter", "/counter", func() live.Component {
// return &Counter{}
// })notes, err := nock.All[NotesRow](ctx, db,
nock.Select(Notes.AllColumns()...).
From(Notes).
Where(Notes.Body.Like("%go%")).
OrderBy(Notes.ID.Desc()).
Limit(20),
)
// Insert a row
nock.Exec(ctx, db, nock.Insert(Notes).Row(NotesNew{Body: "hello"}))
// Patch selected columns
nock.Exec(ctx, db,
nock.Update(Notes).
Set(NotesPatch{Body: nock.Some("edited")}.Assignments()...).
Where(Notes.ID.Eq(id)),
)type SendDigest struct {
UserID int64
}
func (SendDigest) Kind() string { return "send_digest" }
func (SendDigest) Defaults() quiver.JobDefaults {
return quiver.JobDefaults{
Queue: "mail",
Priority: 2,
MaxAttempts: 5,
Timeout: time.Minute,
}
}
q := sqlite.New(db, quiver.WithConcurrency(8))
quiver.Handle(q, func(ctx context.Context, job *quiver.Job[SendDigest]) error {
return deliverDigest(ctx, job)
})
quiver.Enqueue(ctx, q, SendDigest{UserID: 7},
quiver.Unique("digest:7", quiver.UniqueFor(24*time.Hour)),
)Project layout
One folder per domain
Each feature lives under modules/<name>/ with its routes, handlers, service, Nock schema, jobs, and Crest views together. There is no internal/ or cmd/ tree, and fletch check enforces module and table boundaries.
main.go bootstrap.App().Main(ctx) fletch.plugins.go Crest build plugins bootstrap/ app.go, assets.go, storage.go commands/ hello.go, commands_gen.go config/ app.yaml, database.yaml, environments/ database/ migrations/, seeders/ modules/ home/ fletch.Module vertical slice module.go Name() and Register(*App) routes.go HTTP and Live routes handlers.go request handlers service.go domain logic schema.go Nock table definitions schema_gen.go typed Row, New, Patch, columns jobs.go Quiver job handlers module_test.go module tests views/ index.crest, index.go, index_crest.go ui/ layouts/, components/, partials/ resources/ css/app.css, js/app.js public/ static files storage/ local app storage tests/ app_test.go
$ fletch check ok boundaries & mounts W0510–W0512 clean ok schema & openapi W0513–W0515 clean $ fletch build --os linux --arch amd64 -o bin/shop gen crest templates modules/home/views/index_crest.go gen nock schema modules/home/schema_gen.go gen assets resources/ bundled ok bin/shop linux/amd64 · CGO_ENABLED=0
Every core module is pure Go. Cross-compile with --os and --arch on any host; libvips is opt-in through images/vips.
CI checks the default path with no Node on PATH. Templates, asset builds, and live components run in Go.
fletch check catches cross-module imports, foreign table access, unmounted modules, schema drift, and stale openapi.json.
Standalone modules
Six packages you can use together or alone
Fletch wires these modules into one app lifecycle, and each package works independently in a regular Go codebase.
crestCrest
HTML templates paired with Go structs and compiled to Go source by fletch gen. Supports named slots, keyed loops, and typed component tags.
{for _, n := range i.Notes key n.ID}
<li>{n.Body}</li>
{/for}liveLive
Server-rendered interactive components mounted with fletch.MountLive. Mix server fields with live.Local and live.Shared client state.
<form on:submit={$saving = true; c.Create}>
<input name="title" bind:value={$draft}>
<button on:click={c.Inc}>+</button>
</form>nockNock
Declarative Go table definitions in schema.go, SQL migrations, and a typed query builder generating Row, New, and Patch structs.
schema.Table("notes",
schema.Col("id").BigInt().PrimaryKey(),
schema.Col("body").Text().NotNull(),
schema.Timestamps(),
)quiverQuiver
Typed background jobs with named queues, priorities, timeouts, unique keys, and explicit quiver.Discard and quiver.Snooze outcomes.
quiver.Enqueue(ctx, q, SendDigest{UserID: 7},
quiver.Unique("digest:7",
quiver.UniqueFor(24*time.Hour)),
)pubsubPubSub
Typed topics for domain events with consumer groups, wildcard patterns, metadata, and transactional PublishTx.
var Created = pubsub.NewTopic[OrderCreated]("orders.created")
pubsub.Subscribe(ctx, a.PubSub(), Created, sendReceipt,
pubsub.WithGroup("billing"),
)axCLI & AX
Module boundary checks, 3-way scaffold upgrades, offline CLI docs, and generated AGENTS.md, CLAUDE.md, skills, and .mcp.json.
fletch check
fletch upgrade --dry-run --json
fletch docs search "quiver"Tooling
One CLI for dev, codegen, and builds
Scaffold modules, run the dev server and dashboard, check boundaries, upgrade starter files, and search framework docs offline.
fletch new shop | Create a modular monolith app with SQLite, Crest views, config, and tests. |
fletch dev | Run the app on 127.0.0.1:3000 with proxy swaps, CSS reloads, error overlay, and the dev dashboard on :4000. |
fletch make <kind> <name> | Run any of 9 generators: module, handler, live, job, policy, command, migration, seeder, email. |
fletch check | Verify module boundaries (W0510), table ownership (W0511), mounts (W0512), schema drift (W0513), openapi.json (W0514), and schema syntax (W0515). |
fletch build --os linux --arch amd64 | Compile templates, assets, and Go packages into a single CGO_ENABLED=0 binary. |
fletch upgrade --dry-run | Preview 3-way merges of scaffold updates tracked in .fletch/scaffold.json. |
fletch docs search <query> | List, read, and search framework docs directly from the CLI with no network access. |
fletch 0.1.0-dev · go1.27 · CGO_ENABLED=0 app http://127.0.0.1:3000 dashboard http://127.0.0.1:4000 watcher polling · proxy swap + CSS reload overlay enabled · compile errors in browser make (9): module, handler, live, job, policy, command, migration, seeder, email
Install the CLI and inspect a starter app
Generate a working app with SQLite, Crest views, background jobs, and tests.
$ git clone https://github.com/fletchhq/fletch && cd fletch && GOWORK=off CGO_ENABLED=0 go install ./cmd/fletch