examples/

directory
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT

README

GoFastr examples

Two kinds of example live here.

Go examples (runnable)

Self-contained Go programs — go run ./examples/<name>:

Example What it shows
blog Entities in Go + custom endpoints + full-text search; the canonical starter.
api-tour The v2 REST API: includes, cursor pagination, batch, SSE.
backoffice The entity admin (battery/admin) behind a demo login.
spa Client-side navigation over server-rendered islands.
static-site Static page serving with the file server.
embed-demo Semantic search with battery/embed.

Blueprint examples (declarative)

These are gofastr.yml blueprints — no Go. They describe a whole app (entities, screens, nav, seed) declaratively. Generate a runnable project from one with:

gofastr generate --from examples/ecommerce/gofastr.yml
Blueprint Domain
ecommerce Products, carts, orders.
lms Courses, lessons, enrollments.
portfolio Projects + case studies.
project-manager Projects, tasks, teams.
real-estate Listings, agents, inquiries.

Every blueprint here is validated by TestExampleBlueprintsLoad (cmd/gofastr), so a broken one fails CI.

Directories

Path Synopsis
Package main is a tour of the v2 API surface added to the framework:
Package main is a tour of the v2 API surface added to the framework:
Command backoffice is a minimal example of the battery/admin entity CRUD admin rendered through a UI host: a few entities, a (demo-grade) login, and admin.New(...) generating the whole back-office with defaults.
Command backoffice is a minimal example of the battery/admin entity CRUD admin rendered through a UI host: a few entities, a (demo-grade) login, and admin.New(...) generating the whole back-office with defaults.
Package main is a minimal demonstration of the battery/embed package.
Package main is a minimal demonstration of the battery/embed package.

Jump to

Keyboard shortcuts

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