Documentation
¶
Overview ¶
Command octarq is a single-binary domain / short-link / email management service (link · email · domain). It serves an embedded React dashboard, a JSON API, and a short-link redirector from one process.
This is the open-core binary: it runs the app with no Pro plugins. The commercial build (private octarq-core module) reuses the same app package and registers additional plugins before Run — see the plugin package.
Subcommands:
octarq run the HTTP server (default)
octarq mcp run the Model Context Protocol server over stdio, exposing
read-only short-link / email / domain tools (plus a guarded
read-only SQL tool) to AI clients such as Claude Code, Claude
Desktop and Cursor. See internal/mcp.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package app is the public composition root for octarq.
|
Package app is the public composition root for octarq. |
|
cmd
|
|
|
octarq-build
command
Command octarq-build wires third-party plugins into a custom Octarq binary at build time — the xcaddy model: pick plugins, build a binary.
|
Command octarq-build wires third-party plugins into a custom Octarq binary at build time — the xcaddy model: pick plugins, build a binary. |
|
openapi-gen
command
|
|
|
Package config loads runtime configuration from environment variables.
|
Package config loads runtime configuration from environment variables. |
|
examples
|
|
|
edition-nomail
command
Command edition-nomail is a worked example of a trimmed octarq edition: it composes only the dns and links Core plugins (no mail) by building its own composition root instead of using plugins/builtin.Default().
|
Command edition-nomail is a worked example of a trimmed octarq edition: it composes only the dns and links Core plugins (no mail) by building its own composition root instead of using plugins/builtin.Default(). |
|
plugin-hello
Package hello is a minimal, copy-me example of a octarq plugin: the Go half of a full-stack feature.
|
Package hello is a minimal, copy-me example of a octarq plugin: the Go half of a full-stack feature. |
|
internal
|
|
|
api
Package api implements octarq's JSON HTTP API.
|
Package api implements octarq's JSON HTTP API. |
|
auth
Package auth implements session authentication using a DB-backed session token stored in a signed cookie.
|
Package auth implements session authentication using a DB-backed session token stored in a signed cookie. |
|
cleanup
Package cleanup runs periodic maintenance: purging expired data based on the retention window.
|
Package cleanup runs periodic maintenance: purging expired data based on the retention window. |
|
crypto
Package crypto provides AES-GCM encryption for secrets at rest and HMAC signing for session cookies.
|
Package crypto provides AES-GCM encryption for secrets at rest and HMAC signing for session cookies. |
|
db
Package db opens the configured database (SQLite or Postgres) through GORM and runs migrations.
|
Package db opens the configured database (SQLite or Postgres) through GORM and runs migrations. |
|
dnsprovider
Package dnsprovider abstracts DNS record management across providers.
|
Package dnsprovider abstracts DNS record management across providers. |
|
geo
Package geo resolves a client IP into country/city (optional, via a MaxMind GeoLite2 mmdb) and parses a User-Agent into device/browser/os.
|
Package geo resolves a client IP into country/city (optional, via a MaxMind GeoLite2 mmdb) and parses a User-Agent into device/browser/os. |
|
mail
Package mail parses inbound MIME messages and sends outbound mail via SMTP.
|
Package mail parses inbound MIME messages and sends outbound mail via SMTP. |
|
mcp
Audit trail for AI database access through the MCP server.
|
Audit trail for AI database access through the MCP server. |
|
models
Package models defines the GORM persistence schema for octarq.
|
Package models defines the GORM persistence schema for octarq. |
|
notify
Package notify delivers best-effort notifications about octarq events.
|
Package notify delivers best-effort notifications about octarq events. |
|
safehttp
Package safehttp provides an HTTP client hardened against SSRF for any server-side fetch or POST of a user-supplied URL (link previews, outbound webhooks, notification channels, SNS confirmations).
|
Package safehttp provides an HTTP client hardened against SSRF for any server-side fetch or POST of a user-supplied URL (link previews, outbound webhooks, notification channels, SNS confirmations). |
|
server
Package server wires the API, short-link redirector, and embedded SPA behind a single http.Handler.
|
Package server wires the API, short-link redirector, and embedded SPA behind a single http.Handler. |
|
Claude (Anthropic Messages API) backend for llmprovider.
|
Claude (Anthropic Messages API) backend for llmprovider. |
|
Package plugin defines the public, importable contract that anyone implements to extend octarq without forking it.
|
Package plugin defines the public, importable contract that anyone implements to extend octarq without forking it. |
|
plugins
|
|
|
builtin
Package builtin is the OSS edition's default Core feature set.
|
Package builtin is the OSS edition's default Core feature set. |
|
dns
Package dns is a built-in Core plugin: domain management and DNS — the operator's zones, per-zone DNS-provider credentials (Cloudflare, …), live record CRUD through the provider, and the DNS-verification posture (SPF/DMARC/ DKIM for mail hosts, CNAME health for link hosts).
|
Package dns is a built-in Core plugin: domain management and DNS — the operator's zones, per-zone DNS-provider credentials (Cloudflare, …), live record CRUD through the provider, and the DNS-verification posture (SPF/DMARC/ DKIM for mail hosts, CNAME health for link hosts). |
|
links
Package shortlink resolves slugs to targets, records click events asynchronously, and renders the password gate when a link is protected.
|
Package shortlink resolves slugs to targets, records click events asynchronously, and renders the password gate when a link is protected. |
|
Package webembed embeds the built React dashboard into the binary.
|
Package webembed embeds the built React dashboard into the binary. |
Click to show internal directories.
Click to hide internal directories.