This guide walks you through creating a GulinApp from scratch — from enabling the builder UI all the way to seeing your component rendered as a live block inside GuLiN. Each step maps directly to the patterns used by the bundled demo apps inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jorgeurtubiam-ship-it/Gulin_ia/llms.txt
Use this file to discover all available pages before exploring further.
tsunami/demo/.
Prerequisites
You need a working Go installation (1.22+) and a clone of the GuLiN repository so the SDKreplace directive in go.mod can resolve locally. The Tsunami build system uses Task for build targets.
Creating Your First App
Enable the GulinApp Builder
Open your GuLiN This activates the GulinApp Builder panel in the GuLiN workspace. You can also configure the scaffold and SDK paths under the
settings.json (located at ~/.config/gulin/settings.json on macOS/Linux or %APPDATA%\gulin\settings.json on Windows) and set the feature flag:tsunami: namespace if you have non-default locations:Build the Tsunami scaffold
The scaffold provides the pre-built frontend bundle (Tailwind CSS v4, the Tsunami React renderer, and asset pipeline) that every GulinApp embeds. Build it once from the root of the GuLiN repository:The output lands in
dist/tsunamiscaffold/. The scaffold path is what tsunami:scaffoldpath points to in settings.Create your app directory and go.mod
Create a new directory for your app and initialize a Go module. Reference the Tsunami SDK via a
replace directive so Go resolves it from your local checkout:Write your entry point (main.go)
Every Tsunami app follows the same
main.go pattern. It embeds the built frontend assets and static files, registers app metadata, and calls app.RunMain():app.RegisterEmbeds wires the compiled frontend assets into the HTTP server that Tsunami spins up. app.RunMain starts the engine, connects to GuLiN, and begins the render loop.Define your app metadata and components
Create The
app.go alongside main.go. Declare an AppMeta value, define your component types, and compose the UI using vdom.H and app.DefineComponent:AppMeta variable declared here is referenced in main.go via app.SetAppMeta(AppMeta).Register an init function (optional)
If your app needs to set up connections, load configuration, or declare secrets before the first render, register an init function. The generated scaffold wires this automatically via an
init() call:app.RegisterAppInitFn accepts exactly one function. Calling it a second time replaces the previously registered function.Build and run your app
Use the Tsunami CLI or the bundled Taskfile targets to build and launch your app. To run the included todo demo as a reference:For your own app, invoke the Tsunami CLI build command directly:Or use the Once running, GuLiN will surface your app as an interactive block in the workspace.
run subcommand to build and immediately launch:Minimal App Structure
A minimal Tsunami app contains these files:dist/ directory is generated at build time and should be listed in .gitignore.
Bundled Demo Apps
The repository ships several ready-to-run demos undertsunami/demo/. Each demonstrates a different pattern:
| Demo | How to run | What it shows |
|---|---|---|
todo | task tsunami:demo:todo | Multi-component composition, UseLocal state, ForEach rendering |
cpuchart | cd tsunami && go run demo/cpuchart/*.go | UseTicker for periodic polling, recharts integration |
tabletest | cd tsunami && go run demo/tabletest/*.go | ui.MakeTableComponent with sorting and pagination |
pomodoro | cd tsunami && go run demo/pomodoro/*.go | Timer lifecycle with UseGoRoutine |
modaltest | cd tsunami && go run demo/modaltest/*.go | UseAlertModal and UseConfirmModal hooks |