Tilt
Tilt is the normal development entrypoint for Lumie. This page is a how-to
guide for starting the shared dev stack where the frontend runs locally and the
backend, workers, and stateful services run in the dev cluster.
Prerequisites
- A workspace checkout with
.github/tilt-up.sh - A working SSH host alias named
k3s, because the script opens the tunnel withssh ... k3s - A kubeconfig at
$HOME/.kube/lumie-k3s.yaml, which the script exports asKUBECONFIG ssh,nc,lsof, andtiltinstalled locally, because the script calls each of them directlylumie-frontenddependencies installed locally, because the frontendTiltfilestartsnpm run dev
Step 1: Start Tilt From The Workspace Root
cd /path/to/Lumie
.github/tilt-up.sh
Expected success signals:
- the script prints
Starting SSH tunnel to k3s API (localhost:6443)... - the script prints
Tunnel ready - Tilt starts and shows a
lumie-frontendresource linked tohttp://localhost:3000
What The Workspace Script Does
The script does three things before handing off to tilt up:
- Opens an SSH tunnel so the K3s API is reachable at
localhost:6443. - Exports
KUBECONFIG=$HOME/.kube/lumie-k3s.yaml. - Runs
tilt upfrom.github/, forwarding any extra arguments.
When the session ends, the script closes the SSH control socket and cleans up stale tunnel state on the next run if needed.
Runtime Split
Frontend
lumie-frontend/Tiltfile defines a local_resource that runs:
npm run dev
The frontend stays on your machine and serves http://localhost:3000. Current local env values such as NEXT_PUBLIC_API_BASE are injected directly by the Tiltfile, so the standard Tilt path does not depend on a checked-in .env.example or a hand-written .env.local.
Backend and workers
The backend and worker Tiltfiles build and deploy workloads into the lumie-dev namespace. Those services run against the shared cluster-side PostgreSQL, RabbitMQ, Redis, and MinIO instances instead of local copies.
Workers use live-update style container sync for a tighter inner loop, while the backend follows the cluster deployment path expected by the Java application.
Step 2: Open The Local Frontend
Open http://localhost:3000 after Tilt reports the lumie-frontend resource
as running.
Expected success signal: the browser reaches the local Next.js app instead of a cluster hostname, and frontend edits hot-reload without redeploying the cluster.
How Browser Requests Reach The Backend
The browser does not call the cluster API origin directly during the normal local flow. Instead:
- The browser talks to the local frontend on
http://localhost:3000. - Frontend API calls go through same-origin
/api/...routes. app/api/[...path]/route.tsproxies those requests toNEXT_PUBLIC_API_BASE.- The proxy strips
DomainandSecurefromSet-Cookieheaders so auth cookies land correctly on localhost.
This keeps login and browser session behavior predictable in local development even though the backend itself is running in the cluster.
Verification
nc -z 127.0.0.1 6443
Expected success signal: the command exits successfully while Tilt is running, confirming the SSH tunnel is up.
curl -I http://localhost:3000
Expected success signal: you get an HTTP response from the local frontend
instead of connection refused.
Common Failures
ERROR: Tunnel not ready after 15susually means thek3sSSH alias is missing, the cluster is unreachable, or port6443is blocked.tilt: command not foundmeans Tilt is not installed on the laptop.- The
lumie-frontendresource fails immediately ifnpm run devcannot start, usually because dependencies are missing inlumie-frontend. - Login cookies break if you bypass the frontend proxy and browse
https://dev.lumie-infra.com/directly; that host serves API routes, and the bare root returns404. - Do not move
next devinto the cluster. The frontendTiltfileand workspace rules intentionally keep HMR local.
Where To Go Next
- Workspace for the repo layout around the Tilt workflow.
- Architecture Overview for the end-to-end request path.
- Tech Stack for the frameworks behind each runtime.