Search titles and sections of every page. ↑↓ to move, ↵ to open

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.

  • Server-sent events
  • Background jobs
  • Migrations
  • Tern UI charts
examples/status

Analytics

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.

  • Typed endpoints
  • OpenAPI
  • Email
  • Jobs and cron
examples/analytics

Accounts

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.

  • accounts
  • Passkeys
  • Tern UI auth screens
examples/accounts

Dashboard

An admin dashboard built from shadcn-svelte components, rendered on the server: the benchmark app for server rendering.

  • shadcn-svelte
  • Server rendering
  • Layouts
examples/dashboard

Tern 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.

  • Tern UI
  • Form validation
  • axe audits
examples/ui

Shelf

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.

  • Tutorial
  • accounts
  • Migrations
  • kittest
examples/shelf

Todos

The smallest complete app: sessions, form actions with progressive enhancement, a JSON API, a Markdown blog and prerendered pages.

  • Form actions
  • Sessions
  • Content collections
examples/todos

Go script

Tern’s experimental <script lang="go">: Svelte components whose logic is Go, compiled to WebAssembly, with runes.

  • Experimental
  • WebAssembly
examples/goscript