Documentation
Guides

Getting Started

Smeldr is a Go web framework built around content modules. Define a struct, embed smeldr.Node, and Smeldr wires routing, storage, feeds, and AI indexing automatically.

This guide assumes Go 1.26.2 or later. Run go version to check your toolchain before proceeding.

Install

Add Smeldr to your Go module:

terminal
go get smeldr.dev/core

Define a content type

Content types are plain Go structs embedding smeldr.Node:

post.go
type Post struct {
    smeldr.Node
    Title string `smeldr:"required,min=3"`
    Body  string `smeldr:"required"`
    Tags  []string
}

Wire a module

Pass the struct to smeldr.NewModule inside app.Content:

main.go
app.Content(smeldr.NewModule((*Post)(nil),
    smeldr.Repo(smeldr.NewSQLRepo[*Post](db)),
    smeldr.At("/blog"),
    smeldr.Templates("templates/blog"),
))

Run

terminal
go run .

Your list page is at /blog, individual posts at /blog/{slug}. The REST API and MCP tools are available immediately — no extra configuration needed.