Examples
Apps built with Tern
Complete apps in the repository, each a few commands from running on your machine. Read them to see how the pieces fit, or start from one.
Status
A self-hosted status page and uptime monitor: HTTP, TCP, DNS and certificate checks, a live dashboard over server-sent events, public status pages and incidents. One binary with SQLite.
examples/statusAnalytics
Privacy-friendly web analytics: a tracking script without cookies, rollups as jobs, retention, a live dashboard, weekly email reports and a stats API with OpenAPI.
examples/analyticsAccounts
Every screen of user accounts: sign-up, sign-in with a password or a passkey, email verification, password resets and the devices a user is signed in on.
examples/accountsDashboard
An admin dashboard built from shadcn-svelte components, rendered on the server: the benchmark app for server rendering.
examples/dashboardTern UI
A gallery of Tern UI: every component in light and dark mode, and a form validated by a Go action, with keyboard and accessibility tests.
examples/uiShelf
A reading list with accounts, and the app the tutorial builds step by step: a SQLite database with migrations, validated forms, a page per link, and tests of the whole app from Go.
examples/shelfTodos
The smallest complete app: sessions, form actions with progressive enhancement, a JSON API, a Markdown blog and prerendered pages.
examples/todosGo script
Tern’s experimental <script lang="go">: Svelte components whose logic is Go, compiled to WebAssembly, with runes.
examples/goscript