othra

module
v0.0.0-...-292d0d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0

README

Othra

Othra is Altalune's identity provider: a multi-tenant OAuth 2.1 / OpenID Connect authorization server. Every project gets its own issuer at /p/<handle>, with its own end users, branding and upstream IdPs. It is one Go binary that serves:

  • an API (Connect RPC)
  • an MCP server, with an MCP App UI for the admin tools
  • a CLI
  • a web console, the hosted sign-in pages and an end-user portal

It covers authorize, token, userinfo, revoke, RFC 7662 introspection and RP-initiated logout; registered and CIMD clients; resource servers verified through RFC 9728 metadata; magic-link and Google sign-in; personal tokens; and webhooks. The console itself signs in through Othra's own /p/system issuer. The oidcrp and oauthrs modules are the relying-party and resource-server libraries for apps.

Requirements

  • Go 1.26.11
  • Node 24.15 or newer
  • pnpm 10 (corepack enable picks the version pinned in package.json)
  • Docker, for local dependencies and the integration tests

Set up the repo

  1. Clone the repo and install the JavaScript dependencies. This also installs the git hooks.

    git clone <repo-url> othra && cd othra
    corepack enable
    pnpm install
    
  2. Turn on signed commits and the commit template. Pushes with unsigned commits are refused (see .husky/README.md).

    git config commit.gpgsign true
    git config commit.template .gitmessage.txt
    
  3. Start Postgres, Redis, NATS, Garage and Mailpit. On its first start the compose Postgres creates the Othra roles (see Database roles). To start only the database: podman compose up -d postgres.

    docker compose up -d
    

    A Postgres volume created before the roles existed is not provisioned again. Drop it once with docker compose down -v (this deletes the dev data), or run scripts/db/provision.sh against it.

  4. Create your config. config.example.yml already points at the compose Postgres as othra_service and othra_migrator; generate the two secrets with openssl rand -hex 32.

    cp config.example.yml config.yml
    

    Every key can also be set from the environment: see .env.example and the full list in config.reference.yml.

  5. Build the embedded UI (console, MCP views, sign-in page assets; the console and sign-in assets also get brotli and gzip copies), then run the server.

    make ui
    make run
    
  6. Open the one-time install link printed in the log, create the first owner account, and you land in the console at http://localhost:5150/console/.

Database roles

Othra's tenant tables use Postgres row-level security, so the app connects as a role that cannot bypass it. scripts/db/provision.sh creates the database and three roles on any Postgres (self-hosted, RDS, Neon and others).

Role Attributes Used by Purpose
othra_owner NOLOGIN, BYPASSRLS postgres.migrator.role (the migrator's SET ROLE) owns the schema, the tables and the SECURITY DEFINER lookups; nobody logs in as it
othra_migrator LOGIN, NOBYPASSRLS postgres.migrator.dsn runs migrations as the owner; use a direct (not pooled) connection
othra_service LOGIN, NOBYPASSRLS postgres.dsn (and postgres.reader.dsn) the running app; reads and writes rows under row-level security, owns nothing, no members
ADMIN_URL='postgres://admin:...@db.example.com:5432?sslmode=require' \
MIG_PW=gen SVC_PW=gen scripts/db/provision.sh
  • The admin needs CREATEROLE and either SUPERUSER or BYPASSRLS, because it hands BYPASSRLS to othra_owner.
  • Run it without the variables to be asked for each value. It is safe to re-run, and a re-run sets the passwords you pass and repairs role attributes and grants.
  • gen creates a password and writes it to othra-db-credentials.env (mode 0600). Passwords are never printed.
  • SCHEMA and TABLE_PREFIX must match postgres.schema and postgres.tablePrefix.
  • It ends by running scripts/db/verify.template.sql, which fails loudly on any drift; it prints the command to run that check again later.
  • The app logs in as othra_service directly; Othra never runs SET ROLE on the app pool, because behind a transaction-mode pooler it would not stick. postgres.role is optional: when set, it names the role the DSN must log in as, and boot refuses any other.
  • At boot, after migrating, Othra refuses to start if its role can bypass row-level security (superuser, BYPASSRLS, a table or schema owner, or a member of one) or if an org-owned table is not forced. In development only, db.rls.allowBypass: true turns the role check into a warning.
  • Local dev: the compose Postgres runs the same script on its first start (docker/postgres/init), with dev-only passwords from compose.yaml.

Run with Docker

You don't need Go or Node to run Othra. The image holds the same binary with the UI embedded.

docker build -t othra .
docker run --rm -p 5150:5150 \
  -e OTHRA_POSTGRES_DSN=postgres://... \
  -e OTHRA_POSTGRES_MIGRATOR_DSN=postgres://... \
  -e OTHRA_HTTP_STATE_SECRET=$(openssl rand -hex 32) \
  -e OTHRA_SECRETS_ENCRYPTION_KEY=$(openssl rand -hex 32) \
  othra
  • The image runs serve by default. Pass any other command after the image name, for example docker run --rm othra version.
  • To run the whole stack in containers: docker compose --profile app up -d --build.
Queue (NATS)

The queue is off unless queue.enabled is true; queue.driver picks what carries it (nats, the only driver). nats.* is only the connection, and Othra opens it only when a feature uses it. Othra connects as user othra in its own account, OTHRA, as on the shared Altalune NATS (altalune-id/nats). Every app uses the same stream names, so the account is what keeps apps apart: never share one between apps.

OTHRA_QUEUE_ENABLED=true
OTHRA_NATS_URL=nats://<nats-service>.railway.internal:4222
OTHRA_NATS_USER=othra
OTHRA_NATS_PASSWORD=...   # the server's OTHRA_NATS_PASSWORD, at least 16 characters

The credentials may also go in the URL (nats://othra:<password>@host:4222). nats.token is for a NATS server without accounts; set it or the user and password, not both. Deploy the server on private networking only, with a volume at /data (see the shared server's README). Locally, docker compose up -d runs NATS with the accounts in docker/nats/nats-server.conf (OTHRA and OTHER, dev passwords of 16 characters or more). To run Othra on the host against it: OTHRA_NATS_URL=nats://localhost:4222, OTHRA_NATS_USER=othra and OTHRA_NATS_PASSWORD=othra-dev-nats-password (the compose default).

File storage (S3)

Uploads are off unless storage.driver is set. With storage.driver: s3, the browser uploads straight to an S3-compatible bucket with a presigned PUT; Othra never receives the file. s3.* is only the connection, and one bucket can serve several Altalune apps (storage.app is the second key segment).

Cloudflare R2:

OTHRA_STORAGE_DRIVER=s3
OTHRA_STORAGE_PUBLIC_BASE_URL=https://files.altalune.id     # the bucket's custom domain
OTHRA_STORAGE_IMAGE_TRANSFORM=cloudflare                    # optional: resized images via /cdn-cgi/image/
OTHRA_S3_ENDPOINT=https://<account-id>.r2.cloudflarestorage.com
OTHRA_S3_REGION=auto
OTHRA_S3_BUCKET=altalune-files
OTHRA_S3_ACCESS_KEY_ID=...        # an R2 API token scoped to the bucket
OTHRA_S3_SECRET_ACCESS_KEY=...
  • CORS: the bucket needs a rule for each console origin, with methods PUT, GET, HEAD, allowed header content-type and exposed header etag. Without it the browser's preflight fails and uploads never start.
  • Browser endpoint: presigned URLs are signed for one exact host. Set s3.browserEndpoint only when browsers reach the S3 API on another host than Othra does (compose: Othra calls http://garage:3900, the browser http://localhost:3900). It must be exactly the host the browser uses, or every upload gets 403.
  • Public reads: files are read from storage.publicBaseURL, never through Othra. On R2, attach the custom domain, disable the r2.dev URL, and add a WAF custom rule that blocks paths starting with /private/ on that domain; private files are only ever read through short-lived signed URLs.

Locally, docker compose up -d runs Garage (dxflrs/garage) and garage-init, which creates the bucket altalune-files, a fixed dev key and the CORS rule for http://localhost:${OTHRA_PORT:-5150}. Public files are served at http://altalune-files.localhost:3902. To run Othra on the host against it:

OTHRA_STORAGE_DRIVER=s3
OTHRA_STORAGE_PUBLIC_BASE_URL=http://altalune-files.localhost:3902
OTHRA_S3_ENDPOINT=http://localhost:3900
OTHRA_S3_REGION=garage
OTHRA_S3_BUCKET=altalune-files
OTHRA_S3_ACCESS_KEY_ID=GK000000000000000000000001
OTHRA_S3_SECRET_ACCESS_KEY=0000000000000000000000000000000000000000000000000000000000000001
Signing keys

Every project signs its tokens with its own RS256 keys, sealed at rest with secrets.encryptionKey, which is therefore required in every mode. A rotation publishes the new key first and makes it sign after keys.rotation.prePublish (10 minutes); the old key stays published for keys.rotation.overlap (7 days). Project editors rotate from the console or with othra project keys rotate <project>; --now makes the new key sign at once, and verifiers that cached the old key set reject new tokens until they fetch it again.

Changing secrets.encryptionKey makes every sealed private key unreadable (the published public keys stay servable). After a key change, run othra project keys rotate <project> --now for every project.

Console sign-in and break-glass

Admins sign in at /login with a password (self-hosted, when auth.password.enabled is on) or with Continue with Othra, which goes through the deployment's own /p/system issuer. Cloud has no passwords.

Locked out? Both commands need database access, like othra serve:

  • othra admin set-password --email <email> --password-stdin sets a console password and signs out every session. It is refused when passwords are off.
  • othra admin sign-in-link <email> prints a one-time sign-in link for an existing console account, or for the first owner an install with passwords off invited. It works once, for the magic-link TTL (15 minutes by default), and needs no email server. It needs http.baseURL. Treat it like a password.

Use one public URL (http.baseURL) per deployment. Every othra serve boot points the console's sign-in back at it, so instances with different URLs would keep undoing each other. Operator commands never change it.

Sign in to MCP with OAuth

With mcp.enabled: true, an MCP client given only <http.baseURL>/mcp signs a person in at Othra's console issuer, /p/system, and calls the admin tools as that person. API keys keep working on /mcp; othra mcp (stdio) is unchanged. Basic auth mode has no console issuer, so MCP OAuth is off there.

OTHRA_MCP_ENABLED=true
OTHRA_MCP_CLIENT_HOSTS=claude.ai                     # hosts whose metadata document clients may sign in; empty keeps them out
OTHRA_MCP_AUDIENCE=https://othra.example.com/mcp     # optional; default <http.baseURL><http.basePath>/mcp
OTHRA_MCP_AUDIENCE_OVERRIDE=true                     # only when a proxy serves /mcp at another public URL

Othra registers its own /mcp resource server in the console project, at install and at every boot, from these keys; the console shows it read-only. The console project takes no registered clients, so an MCP client signs in through a Client ID Metadata Document (CIMD). Claude Code publishes one on claude.ai.

The client finds everything else itself: /mcp answers 401 with WWW-Authenticate: Bearer resource_metadata="…", and /.well-known/oauth-protected-resource<http.basePath>/mcp names the issuer and the scopes.

What a token can do:

  • it acts as the console account linked to that /p/system identity, so the person must have signed in to the console with Continue with Othra at least once; anyone else gets 401;
  • it acts in the person's only organization and its first project; someone in several organizations reaches nothing;
  • it holds the scopes the person granted, limited by their role there, and is never an operator;
  • it can draft an invite (member_invite) and discard a draft, but never send one: a person sends it from the console;
  • a tool whose scope the token was never granted answers 403 with error="insufficient_scope", so the client asks for it; an outage answers 503 with GEN009 and no challenge, so the client keeps its token.

Turning mcp.enabled off closes this sign-in at the next boot. An access token lives up to oauth.accessTokenTTL, so revoking a grant takes effect on /mcp when the current token expires. At startup Othra logs boot: mcp oauth on with the audience and the document's path.

Everyday commands

Command What it does
make check vet, every linter, unit tests
make cover unit + integration tests; fails when a package is under 85% coverage
make ui-test UI tests
make generate regenerate protos, MCP tools, scopes, error codes and templ views
make fmt / pnpm lint:fix format Go / fix JS, TS, Vue, JSON, Markdown and CSS
make help every target

Docs

  • AGENTS.md: the rules for contributors and coding agents
  • docs/: architecture and how-to recipes

License

Apache License 2.0. See NOTICE.

Directories

Path Synopsis
cmd
comment-lint command
Command comment-lint enforces the repository comment discipline over Go sources.
Command comment-lint enforces the repository comment discipline over Go sources.
gen-apperror command
Command gen-apperror regenerates apperror/codes.gen.go from apperror/codes.json.
Command gen-apperror regenerates apperror/codes.gen.go from apperror/codes.json.
gen-config-example command
Command gen-config-example regenerates .env.reference and config.reference.yml from config struct tags.
Command gen-config-example regenerates .env.reference and config.reference.yml from config struct tags.
gen-scope command
Command gen-scope regenerates scope/names.gen.go from scope/scopes.json.
Command gen-scope regenerates scope/names.gen.go from scope/scopes.json.
othra command
Command othra runs the Othra identity provider.
Command othra runs the Othra identity provider.
protoc-gen-mcp command
Command protoc-gen-mcp generates MCP tool bindings for every RPC annotated with mcp.v1.tool.
Command protoc-gen-mcp generates MCP tool bindings for every RPC annotated with mcp.v1.tool.
Package config loads runtime configuration from defaults, a YAML file and OTHRA_* env vars.
Package config loads runtime configuration from defaults, a YAML file and OTHRA_* env vars.
Package emailaddr normalizes email addresses the same way for admins and end users.
Package emailaddr normalizes email addresses the same way for admins and end users.
examples
webhook-pong command
Command webhook-pong is a localhost webhook receiver that verifies X-Othra-Signature and answers 200 PONG!!!.
Command webhook-pong is a localhost webhook receiver that verifies X-Othra-Signature and answers 200 PONG!!!.
gen
Package genassets embeds the buf-generated OpenAPI specs so the running binary can serve them without touching the filesystem.
Package genassets embeds the buf-generated OpenAPI specs so the running binary can serve them without touching the filesystem.
Package httpclient builds outbound HTTP clients that are SSRF-filtered, traced and bounded by default.
Package httpclient builds outbound HTTP clients that are SSRF-filtered, traced and bounded by default.
Package httpserver adapts an http.Server into a worker.Worker.
Package httpserver adapts an http.Server into a worker.Worker.
internal
apiclient
Package apiclient is the Connect client the CLI uses to reach a remote Othra; it imports no domain package.
Package apiclient is the Connect client the CLI uses to reach a remote Othra; it imports no domain package.
apikey
Package apikey mints and manages the machine credentials clients present to Othra.
Package apikey mints and manages the machine credentials clients present to Othra.
auth
Package auth signs people in with a password, checks basic credentials and rebuilds a Principal's authority.
Package auth signs people in with a password, checks basic credentials and rebuilds a Principal's authority.
auth/views
templ: version: v0.3.1070
templ: version: v0.3.1070
boot
Package boot is the composition root: it wires config into the runtime graph.
Package boot is the composition root: it wires config into the runtime graph.
cli
Package cli builds the cobra command tree — every command is a factory so tests get a fresh tree.
Package cli builds the cobra command tree — every command is a factory so tests get a fresh tree.
client
Package client holds a project's OAuth clients: their redirect URIs, secrets and consent policy.
Package client holds a project's OAuth clients: their redirect URIs, secrets and consent policy.
consent
Package consent holds the scopes an end user approved for an OAuth client and a resource server, and decides when to ask again.
Package consent holds the scopes an end user approved for an OAuth client and a resource server, and decides when to ask again.
controlplane
Package controlplane wires the Connect-RPC handlers into an http.Handler.
Package controlplane wires the Connect-RPC handlers into an http.Handler.
enduser
Package enduser holds a project's end users: magic-link sign-in, browser and user sessions, and terms consent.
Package enduser holds a project's end users: magic-link sign-in, browser and user sessions, and terms consent.
federation
Package federation signs end users in through a project's upstream IdPs and links their identities.
Package federation signs end users in through a project's upstream IdPs and links their identities.
health
Package health answers the liveness and readiness probes.
Package health answers the liveness and readiness probes.
install
Package install performs the first-boot setup: the first owner, the system org and its default project.
Package install performs the first-boot setup: the first owner, the system org and its default project.
install/views
templ: version: v0.3.1070
templ: version: v0.3.1070
kernel
Package kernel holds the cross-cutting primitives every service receives.
Package kernel holds the cross-cutting primitives every service receives.
kernel/authn
Package authn turns the credential a request presents into a Principal and checks it against a permission table.
Package authn turns the credential a request presents into a Principal and checks it against a permission table.
kernel/authz
Package authz answers whether a Principal may perform a permission.
Package authz answers whether a Principal may perform a permission.
kernel/capabilities
Package capabilities derives the feature switches surfaces check instead of reading the deployment mode.
Package capabilities derives the feature switches surfaces check instead of reading the deployment mode.
kernel/db
Package db is the database feature: the writer/reader pool, the unit of work and the Postgres error checks.
Package db is the database feature: the writer/reader pool, the unit of work and the Postgres error checks.
kernel/db/dbtest
Package dbtest helps sqlmock tests expect the transactions kernel/db opens around every store call.
Package dbtest helps sqlmock tests expect the transactions kernel/db opens around every store call.
kernel/events
Package events is the hardcoded catalog of outbound webhook event types and their payload versions, the public contract tenants receive.
Package events is the hardcoded catalog of outbound webhook event types and their payload versions, the public contract tenants receive.
kernel/mailqueue
Package mailqueue is the durable mail queue on Postgres: messages are sealed at rest and erased once settled.
Package mailqueue is the durable mail queue on Postgres: messages are sealed at rest and erased once settled.
kernel/outbox
Package outbox is the durable, tenant-scoped delivery queue on Postgres.
Package outbox is the durable, tenant-scoped delivery queue on Postgres.
kernel/queue
Package queue declares jobs and broadcasts and the Queue a driver carries them on.
Package queue declares jobs and broadcasts and the Queue a driver carries them on.
kernel/queue/nats
Package nats is the queue driver on NATS JetStream: streams WORK, DLQ and BROADCAST in one account.
Package nats is the queue driver on NATS JetStream: streams WORK, DLQ and BROADCAST in one account.
kernel/ratelimit
Package ratelimit defines the Limiter contract that the memory and Redis stores implement.
Package ratelimit defines the Limiter contract that the memory and Redis stores implement.
kernel/ratelimit/memory
Package memory is the in-process ratelimit store: GCRA over a bounded map, so limits are per instance.
Package memory is the in-process ratelimit store: GCRA over a bounded map, so limits are per instance.
kernel/ratelimit/ratelimittest
Package ratelimittest is the contract test every ratelimit store runs.
Package ratelimittest is the contract test every ratelimit store runs.
kernel/ratelimit/redis
Package redis is the shared ratelimit store: GCRA in one Lua script on Redis, so every server counts against one limit.
Package redis is the shared ratelimit store: GCRA in one Lua script on Redis, so every server counts against one limit.
kernel/secret
Package secret mints and hashes Othra's credentials: prefixed secrets shown once and opaque tokens, stored only as hashes.
Package secret mints and hashes Othra's credentials: prefixed secrets shown once and opaque tokens, stored only as hashes.
kernel/session
Package session models the authenticated caller (Principal) and the store that keeps browser sessions.
Package session models the authenticated caller (Principal) and the store that keeps browser sessions.
kernel/session/sessiontest
Package sessiontest holds the behavior every session.Store must share.
Package sessiontest holds the behavior every session.Store must share.
kernel/storage
Package storage is the file storage feature: signed direct uploads, their verification, object keys and URLs.
Package storage is the file storage feature: signed direct uploads, their verification, object keys and URLs.
kernel/storage/memory
Package memory is an in-process storage driver for tests: presigned URLs are fake and Put stands in for the browser.
Package memory is an in-process storage driver for tests: presigned URLs are fake and Put stands in for the browser.
kernel/storage/s3
Package s3 is the storage driver on an S3-compatible bucket: presigned PUT and GET, HEAD, ranged GET and DELETE.
Package s3 is the storage driver on an S3-compatible bucket: presigned PUT and GET, HEAD, ranged GET and DELETE.
kernel/tenant
Package tenant carries the OrgID/ProjectID/UserID triple through the request lifecycle.
Package tenant carries the OrgID/ProjectID/UserID triple through the request lifecycle.
kernel/tokens
Package tokens verifies the access tokens of one issuer for one resource server through oauthrs.
Package tokens verifies the access tokens of one issuer for one resource server through oauthrs.
kernel/usage
Package usage batches last-used writes on a ticker, so authenticating a credential never waits on one.
Package usage batches last-used writes on a ticker, so authenticating a credential never waits on one.
keys
Package keys holds each project's token signing keys: sealed RS256 keys, their rotation, the JWKS and the signer.
Package keys holds each project's token signing keys: sealed RS256 keys, their rotation, the JWKS and the signer.
legal
Package legal ships the Terms of Service and Privacy Policy and records that a person accepted them.
Package legal ships the Terms of Service and Privacy Policy and records that a person accepted them.
legal/views
templ: version: v0.3.1070
templ: version: v0.3.1070
mcp
Package mcp wires the MCP surface: request authentication, the scopes a caller holds and error payloads.
Package mcp wires the MCP surface: request authentication, the scopes a caller holds and error payloads.
mcp/ui
Package ui embeds the built MCP App bundle, published at ui://othra/app.
Package ui embeds the built MCP App bundle, published at ui://othra/app.
oauth/hosted
Package hosted serves the branded sign-in pages of each project's issuer: login, magic links, the account picker and terms.
Package hosted serves the branded sign-in pages of each project's issuer: login, magic links, the account picker and terms.
oauth/hosted/views
templ: version: v0.3.1070
templ: version: v0.3.1070
oauth/oidc
Package oidc serves each issuer's public OAuth and OpenID Connect endpoints: discovery, metadata, the JWKS, token and userinfo.
Package oidc serves each issuer's public OAuth and OpenID Connect endpoints: discovery, metadata, the JWKS, token and userinfo.
oauth/redirecturi
Package redirecturi holds the redirect URI rules OAuth clients register under and the matcher /authorize checks them with.
Package redirecturi holds the redirect URI rules OAuth clients register under and the matcher /authorize checks them with.
org
Package org models organizations.
Package org models organizations.
org/invite
Package invite brings people into an org by email, through a single-use link and a transactional accept.
Package invite brings people into an org by email, through a single-use link and a transactional accept.
org/invite/views
templ: version: v0.3.1070
templ: version: v0.3.1070
org/member
Package member models who belongs to an org and with which role.
Package member models who belongs to an org and with which role.
org/member/views
Package views renders the member notice emails.
Package views renders the member notice emails.
pat
Package pat holds end users' personal tokens: opaque bearer tokens for one resource server, validated only by introspection.
Package pat holds end users' personal tokens: opaque bearer tokens for one resource server, validated only by introspection.
permission
Package permission holds the one table of the permissions each Connect procedure needs, for /api and MCP alike.
Package permission holds the one table of the permissions each Connect procedure needs, for /api and MCP alike.
project
Package project models projects within an organization.
Package project models projects within an organization.
prompt
Package prompt reads answers from a command's stdin: hidden on a terminal, one line otherwise.
Package prompt reads answers from a command's stdin: hidden on a terminal, one line otherwise.
render
Package render dispatches CLI output to text tables, JSON, or NDJSON.
Package render dispatches CLI output to text tables, JSON, or NDJSON.
resourceserver
Package resourceserver holds a project's resource servers, their scopes, their links to OAuth clients and their RFC 9728 verification.
Package resourceserver holds a project's resource servers, their scopes, their links to OAuth clients and their RFC 9728 verification.
testutil/cptest
Package cptest holds controlplane test helpers that would cycle inside fakes.
Package cptest holds controlplane test helpers that would cycle inside fakes.
testutil/fakes
Package fakes holds hand-written test doubles shared across packages.
Package fakes holds hand-written test doubles shared across packages.
testutil/natstest
Package natstest starts an in-process NATS JetStream server for tests.
Package natstest starts an in-process NATS JetStream server for tests.
tool/commentlint
Package commentlint enforces the repository comment discipline over Go sources.
Package commentlint enforces the repository comment discipline over Go sources.
tool/protocmcp
Package gen turns MCP-annotated RPCs into mcp.ToolSpec registrations over their Connect handlers.
Package gen turns MCP-annotated RPCs into mcp.ToolSpec registrations over their Connect handlers.
user
Package user models the people who sign in to Othra.
Package user models the people who sign in to Othra.
web
Package web builds the HTTP surface: the mux and its middleware.
Package web builds the HTTP surface: the mux and its middleware.
web/assets
Package assets serves embedded files with strong ETags and their build-time brotli and gzip siblings.
Package assets serves embedded files with strong ETags and their build-time brotli and gzip siblings.
web/console
Package console embeds the built console SPA.
Package console embeds the built console SPA.
web/i18n
Package i18n holds the message catalogs of the hosted pages and mail, and picks a locale from Accept-Language.
Package i18n holds the message catalogs of the hosted pages and mail, and picks a locale from Accept-Language.
web/layout
templ: version: v0.3.1070
templ: version: v0.3.1070
web/middleware
Package middleware holds the web surface's HTTP middleware.
Package middleware holds the web surface's HTTP middleware.
web/portal
Package portal embeds the built end-user portal SPA.
Package portal embeds the built end-user portal SPA.
web/spa
Package spa serves an embedded single-page app build: its files with build-aware caching and one index.html rebased at boot.
Package spa serves an embedded single-page app build: its files with build-aware caching and one index.html rebased at boot.
webhook
Package webhook is the outbound webhooks bounded context: tenant endpoints and their delivery attempts.
Package webhook is the outbound webhooks bounded context: tenant endpoints and their delivery attempts.
Package mailer defines the Message and Mailer contract that the console, smtp and resend drivers implement.
Package mailer defines the Message and Mailer contract that the console, smtp and resend drivers implement.
console
Package console is the development mail driver that prints each message instead of sending it.
Package console is the development mail driver that prints each message instead of sending it.
resend
Package resend is the mail driver that sends through the Resend HTTP API.
Package resend is the mail driver that sends through the Resend HTTP API.
smtp
Package smtp is the mail driver that sends through an SMTP server with STARTTLS, implicit TLS or no TLS.
Package smtp is the mail driver that sends through an SMTP server with STARTTLS, implicit TLS or no TLS.
Package mcp wraps the Model Context Protocol Go SDK's streamable-HTTP server with a scope-checked tool registry.
Package mcp wraps the Model Context Protocol Go SDK's streamable-HTTP server with a scope-checked tool registry.
Package migrator runs goose migrations with schema, prefix and role templating.
Package migrator runs goose migrations with schema, prefix and role templating.
Package nanoid produces URL-safe short public IDs.
Package nanoid produces URL-safe short public IDs.
Package nats opens, drains and watches the one NATS connection the drivers share.
Package nats opens, drains and watches the one NATS connection the drivers share.
oauthrs module
oidcrp module
Package password hashes and verifies passwords with Argon2id in PHC string format.
Package password hashes and verifies passwords with Argon2id in PHC string format.
Package pg opens, health-checks and locks Postgres connections, and holds Postgres identifier helpers.
Package pg opens, health-checks and locks Postgres connections, and holds Postgres identifier helpers.
Package redis opens and watches the one Redis connection the drivers share.
Package redis opens and watches the one Redis connection the drivers share.
Package reqid propagates a request identifier across a single call via context.
Package reqid propagates a request identifier across a single call via context.
Package s3 opens and watches the one S3-compatible bucket (R2, Garage, AWS) the storage driver uses.
Package s3 opens and watches the one S3-compatible bucket (R2, Garage, AWS) the storage driver uses.
Package scheduler runs registered Jobs on wall-clock or interval schedules inside one process.
Package scheduler runs registered Jobs on wall-clock or interval schedules inside one process.
Package schema embeds the Othra migrations and wires them to migrator.
Package schema embeds the Othra migrations and wires them to migrator.
entity
Package entity holds go-jet table bindings for the Othra schema.
Package entity holds go-jet table bindings for the Othra schema.
Package scope is the single catalog of API scopes, read from scopes.json, which the console shares verbatim.
Package scope is the single catalog of API scopes, read from scopes.json, which the console shares verbatim.
Package sealer seals secrets at rest with AES-256-GCM bound to caller-supplied additional data.
Package sealer seals secrets at rest with AES-256-GCM bound to caller-supplied additional data.
Package slug generates URL-safe default slugs.
Package slug generates URL-safe default slugs.
Package telemetry wires OTel tracer + meter providers and the Prometheus endpoint.
Package telemetry wires OTel tracer + meter providers and the Prometheus endpoint.
Package version exposes build metadata stamped at link time via -ldflags.
Package version exposes build metadata stamped at link time via -ldflags.
Package worker supervises long-running loops (HTTP servers, background clients) under one errgroup.
Package worker supervises long-running loops (HTTP servers, background clients) under one errgroup.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL