examples/

directory
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0

README

Examples

Compiled example programs used by the documentation. CI builds and vets everything here, so code shown in the docs can't silently break. Doc pages copy tagged regions (// region: name … // endregion) from these files. See the documentation guide §7.

Most examples show one feature. tracker is the reference app: an issue tracker with projects, members and roles, issues with labels, comments, files and their history, search, emails from queue jobs, a weekday digest, an admin and a JSON API, tested on every database. tutorial is the app the tutorial builds. saas is a whole app, made with anetos new and anetos make:auth: accounts with a password, Google or GitHub, a welcome email from a queue job, a pub/sub listener and a scheduled task, in one binary that also runs split by role (run --only=…), with a test that runs it that way. teams is a JSON API where users have roles in teams and across them (auth/rbac). assistant is a help center with an AI assistant: stored conversations, answers streamed with htmx, replies from queue jobs and daily budgets. i18n speaks English and Bangla: catalogs, plurals, dates, prices and relative times, a language switcher, and validation messages in the visitor's language. admin is a shop's back office made with the admin interface: products and categories, roles for administrators and editors, and every change in the audit log. bookmarks is the JSON API that Tutorial: build an API builds, made with anetos new --stack=api, make:auth and make:crud: bookmarks that are each user's, tokens limited to reading, an action of its own, and its OpenAPI description (openapi.json).

Directories

Path Synopsis
Command i18n shows Anetos's translations: catalogs in locales/ (English and Bangla), translated and pluralized messages, dates, prices and relative times in the visitor's language, the visitor's locale (?locale=, the cookie, the browser's languages), a language switcher, and validation messages in the visitor's language.
Command i18n shows Anetos's translations: catalogs in locales/ (English and Bangla), translated and pluralized messages, dates, prices and relative times in the visitor's language, the visitor's locale (?locale=, the cookie, the browser's languages), a language switcher, and validation messages in the visitor's language.
locales
Package locales holds the example's translations: en.yaml, and the files of the bn folder.
Package locales holds the example's translations: en.yaml, and the files of the bn folder.
Command lifecycle is a minimal Anetos application: typed configuration, a provider, a supervised background task and graceful shutdown.
Command lifecycle is a minimal Anetos application: typed configuration, a provider, a supervised background task and graceful shutdown.
Command notes is a small JSON API built with Anetos's HTTP layer: routing, named routes, typed handlers with binding and validation, and error responses.
Command notes is a small JSON API built with Anetos's HTTP layer: routing, named routes, typed handlers with binding and validation, and error responses.
Command validation shows Anetos's validate package: tag rules, labels and messages, a custom rule, a Validate method for checks that need other data, and the 422 response a web.H handler returns.
Command validation shows Anetos's validate package: tag rules, labels and messages, a custom rule, a Validate method for checks that need other data, and the 422 response a web.H handler returns.

Jump to

Keyboard shortcuts

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