HTML-first Go components

Write the page where you can see it.

Sandwich Hime pairs PHP-like immediacy with Go's types and deployment model. The compiler turns trusted .sando files into ordinary Go, then leaves production.

Working model

A build tool, not an application framework.

HTML stays legible

Templates are HTML with small, explicit Go islands for values, control flow, and component composition.

Types cross the boundary

Each file defines one typed component function. Normal Go values go in; a renderable component comes out.

Production stays small

Generated Go is committed with the application. Production needs the Apache-2.0 runtime, not the compiler.

One typed component

The useful part is visible at a glance.

<?sando go
package views

func Profile(page ProfileView)
?>
<section class="profile">
  <h1><?= page.Name ?></h1>
  <? if page.IsAdmin { ?>
    <?~ AdminBadge() ?>
  <? } ?>
</section>

Values are escaped for their HTML context; component render errors propagate.

Context is part of compilation

Trusted source, untrusted rendered data.

Template authors and embedded Go are trusted application code. Dynamic data is escaped according to whether it appears in HTML text, a quoted attribute, or a recognized URL attribute.

Ambiguous or unsupported contexts fail generation. Explicit trust types exist for the few cases where an application has already performed the necessary validation.

Read the precise security boundary and current limitations.

Founder note

For the joy of hand-built pages.

I first fell in love with making websites through a Geocities page for my PSO Gameclub in 2004. The web felt immediate: write a little markup, refresh, and share a place you made.

Sandwich Hime is an attempt to keep that directness while accepting what I now want from Go: explicit types, straightforward binaries, and code I can audit. It is small on purpose, and this site is one of the projects proving whether the idea holds up.

— Cole Speelman

Current boundary

Useful now; still being shaped.

The preview focuses on server-rendered HTML, deterministic generated Go, contextual escaping, and a development supervisor. It does not own routing, middleware, application layout, or your production server.

The public source preview is available now. Versioned installation links will activate only when the compiler and runtime release is ready; until then, the docs describe the local preview workflow without pretending the distribution work is finished.