Documentation
¶
Overview ¶
Package main — Kigae Fieldwork Sample Application
This is the entry point for the Kigae Fieldwork app. It starts the Kigae engine which loads site configs, bootstraps the database, builds the DocType registry, runs schema migrations, and starts the HTTP server.
The application is defined entirely in YAML config files under config/v0/fieldwork/. No application-specific Go code is needed beyond what the engine provides. Custom business logic can be added via Go hooks (see hooks/ directory).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api provides shared schema mapping from Kigae field types to JSON Schema.
|
Package api provides shared schema mapping from Kigae field types to JSON Schema. |
|
oidc
Package oidc implements the OIDC authorization-code + PKCE profile (AUTH-002).
|
Package oidc implements the OIDC authorization-code + PKCE profile (AUTH-002). |
|
cmd
|
|
|
contractgen
command
Command contractgen produces a deterministic JSON Schema snapshot for the stable wire types in contract.
|
Command contractgen produces a deterministic JSON Schema snapshot for the stable wire types in contract. |
|
routeinventory
command
Command routeinventory records the routes registered by the Engine's public API composition.
|
Command routeinventory records the routes registered by the Engine's public API composition. |
|
Package component defines the typed component manifest (PLUGIN-004): what a component provides, what it requires, and which events it emits and handles.
|
Package component defines the typed component manifest (PLUGIN-004): what a component provides, what it requires, and which events it emits and handles. |
|
Package configstore manages reading and writing DocType configuration to/from the database (_kora_doctype and _kora_field tables).
|
Package configstore manages reading and writing DocType configuration to/from the database (_kora_doctype and _kora_field tables). |
|
Package contract defines the provider-neutral, versioned messaging contracts for the Kigae Engine execution fabric.
|
Package contract defines the provider-neutral, versioned messaging contracts for the Kigae Engine execution fabric. |
|
Package db provides database abstraction via a Dialect interface.
|
Package db provides database abstraction via a Dialect interface. |
|
Package doctype — computed field expression evaluation.
|
Package doctype — computed field expression evaluation. |
|
Package effect implements the effect-scope contract (PLUGIN-003, invariant 7): every runtime effect — a timer, subscription, temp state, blob handle, or outbox listener — has an owner, a scope, a disposer, and observable cleanup evidence.
|
Package effect implements the effect-scope contract (PLUGIN-003, invariant 7): every runtime effect — a timer, subscription, temp state, blob handle, or outbox listener — has an owner, a scope, a disposer, and observable cleanup evidence. |
|
Package email provides SMTP email sending.
|
Package email provides SMTP email sending. |
|
Package eventstream defines the runtime change-event model and the bus contract shared by persistence, routing, and analytics adapters.
|
Package eventstream defines the runtime change-event model and the bus contract shared by persistence, routing, and analytics adapters. |
|
Package expression defines the single shared expression and rule evaluation contract (PLUGIN-007).
|
Package expression defines the single shared expression and rule evaluation contract (PLUGIN-007). |
|
Package extension owns installed tenant extensions and their API credentials.
|
Package extension owns installed tenant extensions and their API credentials. |
|
sqlstore
Package sqlstore persists tenant extensions in the tenant database.
|
Package sqlstore persists tenant extensions in the tenant database. |
|
tokencache
Package tokencache caches extension token verification for one Engine process.
|
Package tokencache caches extension token verification for one Engine process. |
|
Package fieldtype implements the semantic field-type registry (GRAPH-007).
|
Package fieldtype implements the semantic field-type registry (GRAPH-007). |
|
Package graph owns resource identity resolution and canonical hashing (GRAPH-001).
|
Package graph owns resource identity resolution and canonical hashing (GRAPH-001). |
|
Package ingress is the Engine's compatibility router for site requests whose deployment assignment belongs to another Engine.
|
Package ingress is the Engine's compatibility router for site requests whose deployment assignment belongs to another Engine. |
|
internal
|
|
|
application/process
Package process composes local request decisions with protected domain operations in one tenant transaction.
|
Package process composes local request decisions with protected domain operations in one tenant transaction. |
|
application/purchasing
Package purchasing owns the governed Purchase Request approval policy.
|
Package purchasing owns the governed Purchase Request approval policy. |
|
application/purchasing/engineadapter
Package engineadapter wires the purchasing domain into Engine's generic tenant-service extension points.
|
Package engineadapter wires the purchasing domain into Engine's generic tenant-service extension points. |
|
application/purchasing/sqlstore
Package sqlstore implements the tenant-backed data reads for purchasing approval policy.
|
Package sqlstore implements the tenant-backed data reads for purchasing approval policy. |
|
application/workflow
Package workflow contains transport-neutral authorization for durable workflow definitions and instances.
|
Package workflow contains transport-neutral authorization for durable workflow definitions and instances. |
|
dbaccess
Package dbaccess bounds physical database connections shared by tenant and platform sql.DB pools in one Engine process.
|
Package dbaccess bounds physical database connections shared by tenant and platform sql.DB pools in one Engine process. |
|
engine
Package engine owns the running Engine process boundary.
|
Package engine owns the running Engine process boundary. |
|
netguard
Package netguard decides whether outbound requests may reach a host.
|
Package netguard decides whether outbound requests may reach a host. |
|
tenantruntime
Package tenantruntime contains the typed, immutable service references captured by one tenant runtime generation.
|
Package tenantruntime contains the typed, immutable service references captured by one tenant runtime generation. |
|
Package kernel implements the single operation kernel (architecture specification invariants 2–3, KERNEL-001..007): every mutation from every source — HTTP, SDK, MCP, AI, CLI, UI, integrations, workers — enters one pipeline that resolves tenant and actor, authorizes, validates, checks idempotency and concurrency, executes one SQL transaction containing the business mutation plus the idempotency receipt, the audit row, and the outbox events, and returns a typed OperationResult.
|
Package kernel implements the single operation kernel (architecture specification invariants 2–3, KERNEL-001..007): every mutation from every source — HTTP, SDK, MCP, AI, CLI, UI, integrations, workers — enters one pipeline that resolves tenant and actor, authorizes, validates, checks idempotency and concurrency, executes one SQL transaction containing the business mutation plus the idempotency receipt, the audit row, and the outbox events, and returns a typed OperationResult. |
|
Package management owns durable control-plane operations accepted by an Engine.
|
Package management owns durable control-plane operations accepted by an Engine. |
|
Package mcp provides a Model Context Protocol server that auto-generates tools from Kigae's doctype registry.
|
Package mcp provides a Model Context Protocol server that auto-generates tools from Kigae's doctype registry. |
|
Package net provides the Go-native HTTP server with TLS, multi-site routing, and all production middleware (security headers, CORS, rate limiting, CSRF).
|
Package net provides the Go-native HTTP server with TLS, multi-site routing, and all production middleware (security headers, CORS, rate limiting, CSRF). |
|
Package notifications owns durable recipient-specific delivery attempts.
|
Package notifications owns durable recipient-specific delivery attempts. |
|
sqlstore
Package sqlstore owns durable notification event receipts and delivery rows.
|
Package sqlstore owns durable notification event receipts and delivery rows. |
|
Package numeric holds exact decimal values for Float, Currency and Percent fields.
|
Package numeric holds exact decimal values for Float, Currency and Percent fields. |
|
Package org contains the provider-neutral organizational execution seam.
|
Package org contains the provider-neutral organizational execution seam. |
|
Package orm — filter parsing utilities.
|
Package orm — filter parsing utilities. |
|
Package outbox implements the transactional outbox for durable event delivery (RFC §8.1).
|
Package outbox implements the transactional outbox for durable event delivery (RFC §8.1). |
|
Package payment models payment intents, providers and the request/confirm service.
|
Package payment models payment intents, providers and the request/confirm service. |
|
mpesa
Package mpesa holds provider-pure Safaricom M-Pesa helpers.
|
Package mpesa holds provider-pure Safaricom M-Pesa helpers. |
|
Package plugin implements provider binding via capability handles (PLUGIN-005): components bind to providers exclusively through PLUGIN-001 handles, so removing a provider degrades only its dependents.
|
Package plugin implements provider binding via capability handles (PLUGIN-005): components bind to providers exclusively through PLUGIN-001 handles, so removing a provider degrades only its dependents. |
|
Package policy contains transport-neutral identity and authorization contracts.
|
Package policy contains transport-neutral identity and authorization contracts. |
|
Package print defines print-format templates and renders them to text.
|
Package print defines print-format templates and renders them to text. |
|
Package query parses and validates declarative published queries (D2).
|
Package query parses and validates declarative published queries (D2). |
|
Package recon implements reconciliation primitives (RECON-001/002): a typed comparison between desired generations and observed state that produces deterministic drift records.
|
Package recon implements reconciliation primitives (RECON-001/002): a typed comparison between desired generations and observed state that produces deterministic drift records. |
|
Package requests owns durable human requests and assignments.
|
Package requests owns durable human requests and assignments. |
|
sqlstore
Package sqlstore owns SQL schema details for durable human requests.
|
Package sqlstore owns SQL schema details for durable human requests. |
|
Package scheduler provides cron-based background job scheduling.
|
Package scheduler provides cron-based background job scheduling. |
|
sqlstore
Package sqlstore persists scheduled definitions and their occurrences.
|
Package sqlstore persists scheduled definitions and their occurrences. |
|
Package schema manages database schema migration.
|
Package schema manages database schema migration. |
|
Package script provides the JavaScript runtime using goja (pure Go ES5.1+).
|
Package script provides the JavaScript runtime using goja (pure Go ES5.1+). |
|
Package secret provides an encrypted key-value store for site-specific secrets (AI API keys, SMTP credentials, etc.).
|
Package secret provides an encrypted key-value store for site-specific secrets (AI API keys, SMTP credentials, etc.). |
|
Package site manages site configuration and multi-tenancy.
|
Package site manages site configuration and multi-tenancy. |
|
Package storage provides a pluggable backend for file attachments.
|
Package storage provides a pluggable backend for file attachments. |
|
Package webhook provides the webhook delivery system for Kigae extensions.
|
Package webhook provides the webhook delivery system for Kigae extensions. |
|
sqlstore
Package sqlstore persists immutable workflow definitions in a tenant DB.
|
Package sqlstore persists immutable workflow definitions in a tenant DB. |
|
Package workspace provides the per-site workspace UI (config-driven SPA).
|
Package workspace provides the per-site workspace UI (config-driven SPA). |