Full-stack Go web framework with React pages.

The whole app compiles into one executable. It runs on one server, down to 1 CPU and 512 MB, with no Node, no Redis and no reverse proxy, and tifa deploy puts it live.

$go run github.com/liustack/tifa/cmd/tifa@latest new myapp

v0.8.2very early: APIs will change

01The stack

One file instead of a stack

No Node in production, no process manager, no reverse proxy, no Redis. The browser bundle, styles and server renderer are embedded in the executable.

The usual stack1 CPU / 512 MB VPS
nginx + certbot
Reverse proxy and certificates
Node.js + PM2
Runtime and process manager
TanStack Start
React SSR
Redis
Cache
BullMQ + cron
Queues and scheduled jobs
SQLite
Database
With Tifa1 CPU / 512 MB VPS
bin/myappone executable
  • nginx + certbotThe Go HTTP server in the binary, which gets its own Let's Encrypt certificate and speaks HTTP/2
  • Node.js + PM2One Go executable
  • TanStack StartTanStack Router, rendered inside the Go process by beastjs, the fastest pure Go JavaScript engine for rendering React
  • RedisAn in-process render memo for pages, a CDN in front if you want one, plus whatever you keep in Go memory
  • BullMQ + cronGoroutines you start in OnStart
  • SQLiteSQLite, with the fastest pure Go SQLite driver, so CGO stays off
02Numbers

On one core

Whole visits to the example shop, recorded from real browsers and played back against each server: shoppers, staff and crawlers at once.

Page views a secondhigher is better
118.8
Tifa118.8
TanStack Start, uncompressed94.7
Next.js28.3
Peak memorylower is better
245MiB
Tifa245 MiB
TanStack Start, uncompressed451 MiB
Next.js613 MiB
CPU per page viewlower is better
8.4ms
Tifa8.4 ms
TanStack Start, uncompressed10.6 ms
Next.js35.3 ms

Each framework as shipped and warmed up with the same visits, one process on one core of a Google Cloud t2d-standard-4 VM (AMD EPYC 7B13), 8 concurrent sessions with no think time, the median of 3 rounds, 2026-11-18. Tifa v0.1.0 with slowjs v0.31.6, Next.js 16.4.6, TanStack Start 1.169.3, Node 24.13.0. Not compared side by side on a small VPS yet. Tifa alone on 1 CPU / 512 MB: see Performance.

How this was measured

The cost

Tifa renders pages in beastjs, a pure Go JavaScript engine. It has no JIT, so one render takes longer than in Node.

With every request rendering, Next.js answers 1.17 times as many page requests as Tifa and TanStack Start 1.57 times, at 7 and 6 times Tifa's peak memory. See the study.

This page in Lighthouse

  • 100Performance
  • 100Accessibility
  • 100Best Practices
  • 100SEO

Lighthouse 12.8 on tifago.com, desktop and mobile, 2026-11-24. Over several runs, Performance scores 99 to 100. Run it yourself

03Pages

Go loads, React renders

One folder per page. Go runs the page's Load first, then React renders complete HTML inside the process. The TypeScript type of the page's data is generated from what Load returns.

app/posts/post+/route.goGo
app/posts/post+/page.tsxReact
package post

type Post struct {
	Title string `json:"title"`
	Body  string `json:"body"`
}

func Load(c *tifa.Ctx) (Post, error) {
	var p Post
	err := blog.DB.QueryRowContext(c.Context(),
		`SELECT title, body FROM posts WHERE slug = ?`,
		c.Param("post")).Scan(&p.Title, &p.Body)
	if errors.Is(err, sql.ErrNoRows) {
		return p, tifa.ErrNotFound // a 404 page
	}
	return p, err
}
import { page, type PageData } from './route.gen'

export default function PostPage() {
  const post = page.useLoaderData() // typed from Post
  return (
    <article>
      <h1>{post.title}</h1>
      <p>{post.body}</p>
    </article>
  )
}

// written into the HTML on the server
export const head = ({ loaderData }: { loaderData?: PageData }) => ({
  meta: loaderData ? [{ title: loaderData.title }] : [],
})
Fields Go returns, typed in ReactRead the tutorial

Real HTML on the first request

Search engines and link previews see the content, title and meta tags.

Fast after the first page

TanStack Router takes over in the browser. Each navigation is one request for data.

Mistakes caught at build time

A Load result that cannot become TypeScript stops the build and names the file and line.

04Deploy

Push to deploy

tifa deploy setup sets up the server, Cloudflare and GitHub Actions in one command. After that every push is checked and goes live, and a release that fails its health check rolls back by itself.

git push
your machine

To the default branch of your repository.

CI checks
GitHub Actions

Runs go tool tifa check on the push.

build, deploy
GitHub Actions

When CI passes, builds the app for your server and runs go tool tifa deploy.

live
your server

Through a Cloudflare Tunnel. The server opens no port: cloudflared on the server connects out to Cloudflare.

  • Builds on your machine or in CI. Nothing is built on the server.
  • Restarts the app without refusing a request.
  • Checks GET /healthz once a second for up to 30 seconds, until it answers with a status below 500, and goes back to the release before when it does not.
  • The server needs no Docker, no Node and no deploy program of its own.
  • Several apps can share one server.
05Story

Why it exists

I wanted to ship a small product on TanStack Start. My other VPSes were full, Black Friday was still weeks away and I did not feel like buying another one, so I dug out an old box with 1 CPU and 1 GB of RAM. I had Codex set up the usual stack in one go: nginx, Node.js, PM2, TanStack Start, Redis, BullMQ, cron and SQLite.

It did not really run. It crawled.

So I started hacking on Tifa. Once it is done, deploying should mean copying one Go binary to the VPS, and that is it.

From the READMEWhy Tifa
06v0.8.2 · MIT

Status

Very early

APIs will change, and many compiler optimizations are not done yet.

No pull requests

A framework like this touches the compiler, the bundler, server rendering and developer experience at once. Every line is written and reviewed by one author.

Issues welcome

Bugs, ideas, confusing errors, unclear docs. A clear issue with steps to reproduce helps more than a patch. Open an issue

Fork it

Under MIT your copy is yours to change and publish.

Start an app

You need Go 1.27 and Node 20.19 or 22.12 and later. Node only builds the front end: the program you deploy never needs it.

$go run github.com/liustack/tifa/cmd/tifa@latest new myapp