Documentation
¶
Overview ¶
Package main — Kora Fieldwork Sample Application
This is the entry point for the Kora Fieldwork app. It starts the Kora 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/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 analytics provides the dynamic, per-site analytics engine for Kora.
|
Package analytics provides the dynamic, per-site analytics engine for Kora. |
|
Package api provides shared schema mapping from Kora field types to JSON Schema.
|
Package api provides shared schema mapping from Kora 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). |
|
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 Kora Engine execution fabric.
|
Package contract defines the provider-neutral, versioned messaging contracts for the Kora 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 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 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 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 mcp provides a Model Context Protocol server that auto-generates tools from Kora's doctype registry.
|
Package mcp provides a Model Context Protocol server that auto-generates tools from Kora'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 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 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 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 scheduler provides cron-based background job scheduling.
|
Package scheduler provides cron-based background job scheduling. |
|
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 Kora extensions.
|
Package webhook provides the webhook delivery system for Kora extensions. |
|
Package workspace provides the per-site workspace UI (config-driven SPA).
|
Package workspace provides the per-site workspace UI (config-driven SPA). |