Native Apps with
Go + HTMX
Build native iOS, Android, and desktop apps using Go, HTML, and HTMX. The richness of a webapp in a native app. No JavaScript frameworks required.
One Codebase. Every Platform.
Write your app logic once in Go. Deploy everywhere.
iOS
Native iOS apps via gomobile
Android
Native Android apps via gomobile
Desktop
macOS, Windows, Linux with webview
Web
Standard HTTP server for browsers
Why irgo?
The hypermedia approach to native app development
Go-Powered Runtime
Write your backend logic in Go. Compile to native mobile frameworks or desktop apps with full access to the Go ecosystem.
HTMX for Interactivity
Use HTMX's hypermedia approach instead of complex JavaScript frameworks. Return HTML, not JSON. Simple and powerful.
Type-Safe Templates
Use templ for compile-time checked HTML templates. Catch errors at build time, not runtime. Full Go type safety.
Virtual HTTP (Mobile)
No network sockets on mobile. Requests are intercepted and handled directly by Go in-process. Fast and secure.
Hot Reload Development
Edit Go and templ code and see changes instantly. Full hot reload support for rapid development.
Powerful CLI
Create, develop, and build projects with simple commands. irgo new, irgo dev, irgo build - that's it.
Simple, Expressive Code
Build interactive UIs with Go handlers and templ templates
Handler
string">"keyword">func CreateTodo(ctx *router.Context) (string, error) { title := ctx.FormValue(string">"title") string">"keyword">if title == string">"" { string">"keyword">return string">"", ctx.BadRequest(string">"Title required") } todo := db.CreateTodo(title) // Return HTML fragment - HTMX appends it string">"keyword">return renderer.Render(templates.TodoItem(todo)) }
Template
templ TodoItem(todo Todo) {
<attr">class="tag">div attr">id={ "todo-" + todo.ID } attr">class="todo-item">
<attr">class="tag">input
attr">type="checkbox"
checked?={ todo.Done }
attr">hx-post={ "/todos/" + todo.ID + "/toggle" }
attr">hx-target={ "#todo-" + todo.ID }
attr">hx-swap="outerHTML"
/>
<attr">class="tag">span attr">class={ templ.KV("done", todo.Done) }>
{ todo.Title }
</attr">class="tag">span>
<attr">class="tag">button
attr">hx-delete={ "/todos/" + todo.ID }
attr">hx-swap="delete"
attr">hx-confirm="Delete this todo?"
>×</attr">class="tag">button>
</attr">class="tag">div>
}How It Works
Different architectures optimized for each platform
Mobile Architecture
Desktop Architecture
Platform Comparison
Choose the right mode for your target platform
| Aspect | Mobile (iOS/Android) | Desktop | Web |
|---|---|---|---|
| HTTP | Virtual (no sockets) | Real localhost server | Real HTTP server |
| Bridge | gomobile + native code | None (direct HTTP) | None |
| Entry Point | main.go | main_desktop.go | main.go (serve) |
| Build Tag | !desktop | desktop | !desktop |
| CGO Required | No | Yes (webview) | No |
Ready to Build?
Get started in minutes. Create your first irgo app and deploy to any platform.
