tinka alpha
tinkaalpha

FAQs

These are the questions people and agents ask most before building with Tinka, with short answers and links to the pages that explain more.

Is Tinka ready for production?

Not yet. Tinka is in early alpha, and its APIs will change before v1.0.0. You can build and deploy an App today, but expect to update your code between releases, and pin the version you build against in go.mod. Status and stability lists what ships.

Which Go version does Tinka need, and why?

Go 1.27 or later. Tinka relies on two parts of it: generic methods, which let a route such as app.Get take a Handler that returns any type and send that type as the response, and encoding/json/v2, which decodes request bodies and encodes JSON responses. Check your version with go version.

Can I use my existing net/http handlers and middleware?

Yes. app.Handle registers any http.Handler, such as http.FileServerFS, next to your routes, and tinka.Std adapts middleware with the func(http.Handler) http.Handler shape, such as a CORS or compression package, so it runs in the chain like any other. An App is itself an http.Handler, so another server or a test can run it directly. See serving other handlers and using net/http middleware.

Does Tinka use reflection or code generation?

No code generation step runs before go build, and nothing wraps go test or go run. The act make generators write ordinary Go files once, which you then own and edit like any other code.

The dependency injection container uses no reflection: each binding is a typed factory, keyed by its Go type, so the compiler checks the wiring. The body parser reads struct tags to decode form fields into your types, the way encoding/json reads json tags.

What does Tinka depend on?

The standard library and three modules maintained by the Go team: golang.org/x/crypto for password hashing, golang.org/x/sys and golang.org/x/term. Nothing else reaches your App. The tools that lint Tinka and build its docs live in a separate module, so their dependencies never appear in your go.sum.

Can I use one Tinka package without the rest?

Yes. Packages such as env, log, password, encryption, events, health, di and cli don’t import the rest of the framework, and Go compiles only the packages you import. Add github.com/mucolabs/tinka to your module with go get and import the package you need.

How do I use a database today?

Tinka has no data layer yet, so you use database/sql with the driver of your choice. Register the *sql.DB connection pool as a singleton in a service provider, and check the database is reachable in its Boot hook. The container closes the pool when the App shuts down, because *sql.DB has a Close method. Handlers get the pool from the container with c.Make, and health.Ping turns db.PingContext into a readiness check, as health checks shows.

What is the difference between tinka and act?

The Tinka CLI, tinka, creates Apps and needs no App to run. act works inside an App’s directory: it serves the App while you work, runs its tests, builds it for production and runs its Commands, including the ones you write. Installation installs both.

How do agents read the docs?

Every docs page has a Markdown twin at its address plus .md, such as /introduction.md. llms.txt at the root of the docs site lists every page with its description and the address of its twin, and llms-full.txt holds every twin in one file. A request that accepts text/markdown gets the twin at the page’s own address. Commands answer agents too, with one JSON result per run: see Agent mode.

Why does go install fail during the alpha?

The Tinka repository is private during the alpha, so Go’s public module proxy can’t fetch it, and go install fails with a 404 or an authentication error. Set GOPRIVATE so Go fetches Tinka directly from GitHub, and make sure git can authenticate to GitHub with an account that has access:

Terminal
go env -w GOPRIVATE=github.com/mucolabs/*

Check the same setting when tinka new creates the App but can’t download its dependencies. See Installation.

What license is Tinka released under?

The MIT License. You can use Tinka in commercial and open source Apps, as long as you keep the copyright and license notice.

See also: Introduction, Philosophy, Pick your path