Krewire Documentation
Mission: Krewire's mission is to make it nearly free โ in financial cost, operational burden, and cognitive effort โ for anyone to build, own, and operate digital products that are secure, sustainable, and scalable. Read more in Why Krewire.
Krewire is a set of independent Go packages driven by one CLI (kiw) and one config file (krewire.yaml). You use it to build websites, documentation, web applications, CLIs, and โ when you need them โ workers, microservices, gateways, and infrastructure.
You do not need to read about architecture to use it. Follow the stages below in order, or jump directly to the path that matches your goal.
Learning Path at a Glance
| Stage | Goal | Read |
|---|---|---|
| 0. Orient | Understand what Krewire is and whether it fits. | 1. Overview |
| 1. First success | Install kiw, scaffold a project, and build something runnable. |
2. Getting Started |
| 2. Build products | Choose the right workload and learn its lifecycle and commands. | 3. Workloads |
| 3. Learn the foundations | Understand the domain model, lifecycle, config, validation, and resilience. | 4. Core & Foundation Libraries |
| 4. Build interfaces | Add HTTP routing, application containers, WASM, and a design system. | 5. Web & UI Framework ยท 6. Krewire UI |
| 5. Add data and services | Persist data, cache, store files, send mail, and integrate payments. | 7. Data, Storage & Services |
| 6. Secure and scale | Apply security controls, identity, cloud, and AI platform capabilities. | 8. Security & Ecosystem Platforms |
| 7. Operate and reference | Look up commands, configuration, and production playbooks. | 9. CLI Reference ยท 10. Guides & Best Practices |
| 8. Go deep | Learn the architectural invariants that keep the ecosystem composable. | 11. Architecture Deep-Dive |
New Here? Start With the Beginner Track
Install kiw, scaffold a site, edit a page, add a component, run the dev server, and build. Zero prior knowledge of Krewire required.
A task manager with SQLite, .kiw pages, Krewire UI components, validated CSRF-protected forms, and a single binary at the end.
For platform engineers and contributors: the layered pyramid, the multi-repo DAG, scope levels, and how data flows between build time and request time. Optional for everyone else.
Choose a Path by Goal
"I want to build a static website or documentation" โ site, book
- Quickstart โ your first site in five minutes.
- The
.kiwDSL โ pages, layouts, components, scoped CSS. - Site workload or Book workload โ content collections, Markdown chapters, i18n.
- Krewire UI components โ 66 ready-made components.
- Deployment & Operations โ ship the static build.
"I want to build a web application with a backend API and database" โ app
- Quickstart โ learn the
kiwloop on a small site. - Build a Fullstack App in 15 Minutes โ SQLite, forms, CSRF, single binary.
- App workload and Application container (
pkg/app). - Web engine & routing (
pkg/web) and Database & ORM (pkg/orm). - Security controls and Authentication.
- Data flow: build time vs request time โ when to render statically and when per request.
"I want to build an enterprise platform with microservices" โ service, gateway, worker
- Why Krewire? and the workload matrix.
- Service, Gateway, and Worker workloads.
- Distributed systems (
pkg/cloud) and Resilience. - Architecture Deep-Dive โ pyramid, ecosystem DAG, scope levels.
- Deployment & Operations and Hybrid PaaS & Cloud.
Recommended Reading Order by Role
| Role | Read in this order |
|---|---|
| Frontend developer | Quickstart โ .kiw DSL โ UI components โ UI design system (pkg/ui) โ Web runtime & WASM โ Site workload |
| Backend developer | Quickstart โ Fullstack app tutorial โ pkg/web โ pkg/app โ Database & ORM โ Validation โ Data flow |
| DevOps engineer | Installation โ Configuration โ CLI commands โ Scripting & CI/CD โ Deployment & Operations โ Hybrid PaaS & Cloud |
| Platform engineer | Overview โ Workload matrix โ Architecture Deep-Dive โ Model & primitives โ Lifecycle kernel โ Open core & licensing |
All Chapters
| Chapter | What you will find |
|---|---|
| 1. Overview | Why Krewire exists, its philosophy, and the eight workload kinds. |
| 2. Getting Started | Beginner track: quickstart, fullstack tutorial, installation, configuration, .kiw DSL. |
| 3. Workloads | One guide per workload: app, cli, site, book, worker, service, gateway, infra. |
| 4. Core & Foundation Libraries | Model, lifecycle, config, validation, resilience, testing. |
| 5. Web & UI Framework | Router, application container, WASM runtime, and TUI. |
| 6. Krewire UI | The design system and all 66 components, with live previews. |
| 7. Data, Storage & Services | ORM, object storage, filesystem, cache, mail, payments. |
| 8. Security & Ecosystem Platforms | Security controls, auth, identity, cloud, AI agents. |
| 9. CLI Reference | Every kiw command and krewire.yaml field. |
| 10. Guides & Best Practices | Deployment, agentic development, hybrid cloud, open-core licensing. |
| 11. Architecture Deep-Dive | Platform engineering: pyramid, ecosystem DAG, scope levels, data flow, and the staged learning path for teams. |