Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
backyard
command
Command backyard is the single Backyard binary: the server (serve, gateway, dev) and the CLI/MCP server developers and agents use to build and deploy sites.
|
Command backyard is the single Backyard binary: the server (serve, gateway, dev) and the CLI/MCP server developers and agents use to build and deploy sites. |
|
backyard-lambda
command
Command backyard-lambda runs the Backyard deploy gateway (SPEC §7) as an AWS Lambda function behind a function URL (or an API Gateway HTTP API).
|
Command backyard-lambda runs the Backyard deploy gateway (SPEC §7) as an AWS Lambda function behind a function URL (or an API Gateway HTTP API). |
|
deploy
|
|
|
helm/charttest
Package charttest holds tests for the Helm chart in deploy/helm/backyard.
|
Package charttest holds tests for the Helm chart in deploy/helm/backyard. |
|
terraform/aws/configcheck
Package configcheck holds an integration test for the AWS Terraform module in deploy/terraform/aws: it runs every scenario of the module's tests/module.tftest.hcl (terraform test with mocked providers) and loads the backyard.yaml each one renders, for the ECS service and for the Lambda deploy gateway, with Backyard's own loader in internal/config, in the environment the container or function would get (Secrets Manager values replaced by placeholders).
|
Package configcheck holds an integration test for the AWS Terraform module in deploy/terraform/aws: it runs every scenario of the module's tests/module.tftest.hcl (terraform test with mocked providers) and loads the backyard.yaml each one renders, for the ECS service and for the Lambda deploy gateway, with Backyard's own loader in internal/config, in the environment the container or function would get (Secrets Manager values replaced by placeholders). |
|
terraform/azure/configcheck
Package configcheck holds an integration test for the Azure Terraform module in deploy/terraform/azure: it runs every scenario of the module's tests/module.tftest.hcl (terraform test with mocked providers) and loads the backyard.yaml each one gives the Container App with Backyard's own loader in internal/config, in the environment the container would get (Container Apps secrets replaced by placeholders).
|
Package configcheck holds an integration test for the Azure Terraform module in deploy/terraform/azure: it runs every scenario of the module's tests/module.tftest.hcl (terraform test with mocked providers) and loads the backyard.yaml each one gives the Container App with Backyard's own loader in internal/config, in the environment the container would get (Container Apps secrets replaced by placeholders). |
|
terraform/gcp/configcheck
Package configcheck holds an integration test for the Google Cloud Terraform module in deploy/terraform/gcp: it renders backyard.yaml for the scenarios in testdata/render.tftest.hcl and for every run of the module's own tests/module.tftest.hcl (terraform test with mocked Google providers), and loads each result with Backyard's own loader in internal/config, the same way the server does at startup (strict YAML, ${ENV} expansion, environment overrides, defaults and validation).
|
Package configcheck holds an integration test for the Google Cloud Terraform module in deploy/terraform/gcp: it renders backyard.yaml for the scenarios in testdata/render.tftest.hcl and for every run of the module's own tests/module.tftest.hcl (terraform test with mocked Google providers), and loads each result with Backyard's own loader in internal/config, the same way the server does at startup (strict YAML, ${ENV} expansion, environment overrides, defaults and validation). |
|
Package docs holds Backyard's user and operator documentation (Markdown, including the normative design specification in spec/SPEC.md).
|
Package docs holds Backyard's user and operator documentation (Markdown, including the normative design specification in spec/SPEC.md). |
|
internal
|
|
|
ai
Package ai defines provider-neutral types for the AI proxy (backyard.ai).
|
Package ai defines provider-neutral types for the AI proxy (backyard.ai). |
|
ai/anthropic
Package anthropic implements ai.Provider for Claude using the official Anthropic Go SDK (github.com/anthropics/anthropic-sdk-go).
|
Package anthropic implements ai.Provider for Claude using the official Anthropic Go SDK (github.com/anthropics/anthropic-sdk-go). |
|
ai/bedrock
Package bedrock implements ai.Provider for Amazon Bedrock using the AWS SDK for Go v2 (bedrockruntime).
|
Package bedrock implements ai.Provider for Amazon Bedrock using the AWS SDK for Go v2 (bedrockruntime). |
|
ai/gemini
Package gemini implements ai.Provider for Google's Gemini models over raw HTTP, either through the Gemini API in Google AI Studio (api_key, https://generativelanguage.googleapis.com/v1beta) or through Vertex AI (project_id + location with Application Default Credentials; location "global" uses https://aiplatform.googleapis.com).
|
Package gemini implements ai.Provider for Google's Gemini models over raw HTTP, either through the Gemini API in Google AI Studio (api_key, https://generativelanguage.googleapis.com/v1beta) or through Vertex AI (project_id + location with Application Default Credentials; location "global" uses https://aiplatform.googleapis.com). |
|
ai/internal/claudemodel
Package claudemodel encodes per-model request rules for Claude models that are shared by the anthropic provider (first-party, Vertex AI, Bedrock Mantle) and the bedrock provider (Converse API).
|
Package claudemodel encodes per-model request rules for Claude models that are shared by the anthropic provider (first-party, Vertex AI, Bedrock Mantle) and the bedrock provider (Converse API). |
|
ai/internal/httpx
Package httpx holds HTTP helpers shared by the raw-HTTP AI providers (openai, gemini): JSON requests, bounded response decoding and conversion of upstream error bodies into *ai.UpstreamError.
|
Package httpx holds HTTP helpers shared by the raw-HTTP AI providers (openai, gemini): JSON requests, bounded response decoding and conversion of upstream error bodies into *ai.UpstreamError. |
|
ai/internal/imagefetch
Package imagefetch downloads remote images referenced by URL in chat requests for providers that only accept inline bytes (Gemini, Bedrock, Claude on Vertex AI/Bedrock, Ollama and other self-hosted OpenAI-compatible servers).
|
Package imagefetch downloads remote images referenced by URL in chat requests for providers that only accept inline bytes (Gemini, Bedrock, Claude on Vertex AI/Bedrock, Ollama and other self-hosted OpenAI-compatible servers). |
|
ai/internal/sse
Package sse is a small, allocation-conscious reader for the text/event-stream format (https://html.spec.whatwg.org/multipage/server-sent-events.html) as emitted by OpenAI-compatible and Gemini streaming endpoints.
|
Package sse is a small, allocation-conscious reader for the text/event-stream format (https://html.spec.whatwg.org/multipage/server-sent-events.html) as emitted by OpenAI-compatible and Gemini streaming endpoints. |
|
ai/openai
Package openai implements ai.Provider for the OpenAI Chat Completions, Images and Embeddings APIs and for compatible servers: provider types "openai" (api.openai.com or any OpenAI-compatible base_url such as vLLM, LiteLLM, LM Studio or OpenRouter), "ollama" (OpenAI-compatible endpoint of a local Ollama) and "azure-openai" (Azure OpenAI / Azure AI Foundry, API key or Entra ID authentication).
|
Package openai implements ai.Provider for the OpenAI Chat Completions, Images and Embeddings APIs and for compatible servers: provider types "openai" (api.openai.com or any OpenAI-compatible base_url such as vLLM, LiteLLM, LM Studio or OpenRouter), "ollama" (OpenAI-compatible endpoint of a local Ollama) and "azure-openai" (Azure OpenAI / Azure AI Foundry, API key or Entra ID authentication). |
|
ai/router
Package router maps client-facing model aliases to configured providers and implements ai.Service.
|
Package router maps client-facing model aliases to configured providers and implements ai.Service. |
|
app
Package app wires configuration into running components and serves them.
|
Package app wires configuration into running components and serves them. |
|
auth
Package auth authenticates requests (SPEC §8): browser sessions via the built-in OIDC login (Okta, Entra ID, Google…), identity-aware proxies (Google IAP, AWS ALB OIDC, trusted headers), Backyard API tokens, static tokens and IdP-issued bearer JWTs (device flow).
|
Package auth authenticates requests (SPEC §8): browser sessions via the built-in OIDC login (Okta, Entra ID, Google…), identity-aware proxies (Google IAP, AWS ALB OIDC, trusted headers), Backyard API tokens, static tokens and IdP-issued bearer JWTs (device flow). |
|
blob
Package blob defines the object storage abstraction that holds site files, metadata and user uploads.
|
Package blob defines the object storage abstraction that holds site files, metadata and user uploads. |
|
blob/azure
Package azure implements blob.Store on Azure Blob Storage (and Azurite).
|
Package azure implements blob.Store on Azure Blob Storage (and Azurite). |
|
blob/backends
Package backends constructs a blob.Store from configuration.
|
Package backends constructs a blob.Store from configuration. |
|
blob/blobtest
Package blobtest is a conformance test-suite for blob.Store implementations.
|
Package blobtest is a conformance test-suite for blob.Store implementations. |
|
blob/fs
Package fs implements blob.Store on a local directory tree.
|
Package fs implements blob.Store on a local directory tree. |
|
blob/gcs
Package gcs implements blob.Store on Google Cloud Storage.
|
Package gcs implements blob.Store on Google Cloud Storage. |
|
blob/internal/blobutil
Package blobutil holds helpers shared by the blob.Store implementations: key/prefix validation, content-type detection on streams, exact-size enforcement, chunked reading for multi-part uploads, synthetic ETags, presign TTL clamping and small concurrency utilities.
|
Package blobutil holds helpers shared by the blob.Store implementations: key/prefix validation, content-type detection on streams, exact-size enforcement, chunked reading for multi-part uploads, synthetic ETags, presign TTL clamping and small concurrency utilities. |
|
blob/s3
Package s3 implements blob.Store on Amazon S3 and S3-compatible object stores (MinIO, Cloudflare R2, Ceph RGW, Backblaze B2, ...).
|
Package s3 implements blob.Store on Amazon S3 and S3-compatible object stores (MinIO, Cloudflare R2, Ceph RGW, Backblaze B2, ...). |
|
cli
Package cli implements the `backyard` command line (SPEC §13): the server entry points (serve, gateway, dev), the developer workflow (init, deploy, login, sites, open, pull, token, skill), the MCP server for agents, and `backyard cloudflare setup|domain|access|status` for the Workers edition.
|
Package cli implements the `backyard` command line (SPEC §13): the server entry points (serve, gateway, dev), the developer workflow (init, deploy, login, sites, open, pull, token, skill), the MCP server for agents, and `backyard cloudflare setup|domain|access|status` for the Workers edition. |
|
cli/clitest
Package clitest provides an in-memory fake of a Backyard server's client surface (the deploy gateway protocol of SPEC §7, the CLI login handoff of §8.3 and POST /__backyard/api/tokens) for testing the CLI and the MCP server without running the real server.
|
Package clitest provides an in-memory fake of a Backyard server's client surface (the deploy gateway protocol of SPEC §7, the CLI login handoff of §8.3 and POST /__backyard/api/tokens) for testing the CLI and the MCP server without running the real server. |
|
cli/scaffold
Package scaffold writes the files of a new Backyard project (`backyard init` and the MCP tool backyard_init) and provides SafeJoin, the path guard used whenever the CLI writes files whose names come from elsewhere (templates, `backyard pull`).
|
Package scaffold writes the files of a new Backyard project (`backyard init` and the MCP tool backyard_init) and provides SafeJoin, the path guard used whenever the CLI writes files whose names come from elsewhere (templates, `backyard pull`). |
|
clientconfig
Package clientconfig manages the local state of the Backyard CLI and MCP server (SPEC §13): the per-user config file with named profiles ($XDG_CONFIG_HOME/backyard/config.json, mode 0600), environment overrides, the per-project .backyard.json file, gateway URL resolution, token expiry awareness and the OAuth device-flow helpers used to obtain and refresh IdP-issued tokens.
|
Package clientconfig manages the local state of the Backyard CLI and MCP server (SPEC §13): the per-user config file with named profiles ($XDG_CONFIG_HOME/backyard/config.json, mode 0600), environment overrides, the per-project .backyard.json file, gateway URL resolution, token expiry awareness and the OAuth device-flow helpers used to obtain and refresh IdP-issued tokens. |
|
config
Package config defines Backyard's configuration schema, loading (YAML with ${ENV} expansion), defaults and validation.
|
Package config defines Backyard's configuration schema, loading (YAML with ${ENV} expansion), defaults and validation. |
|
deploy
Package deploy implements the deploy gateway protocol (SPEC §7): the server side (Gateway, mountable inside the main server, as `backyard gateway`, or as an AWS Lambda function), the Go client used by the CLI and MCP server, and the local file collection/ignore rules shared by every deploy method.
|
Package deploy implements the deploy gateway protocol (SPEC §7): the server side (Gateway, mountable inside the main server, as `backyard gateway`, or as an AWS Lambda function), the Go client used by the CLI and MCP server, and the local file collection/ignore rules shared by every deploy method. |
|
docstore
Package docstore defines Backyard's schemaless JSON document database (backyard.db).
|
Package docstore defines Backyard's schemaless JSON document database (backyard.db). |
|
docstore/backends
Package backends constructs a docstore.Store from configuration.
|
Package backends constructs a docstore.Store from configuration. |
|
docstore/conformance
Package conformance is the shared semantic test-suite for docstore.Store implementations.
|
Package conformance is the shared semantic test-suite for docstore.Store implementations. |
|
docstore/dynamodb
Package dynamodb is the docstore.Store for Amazon DynamoDB (and DynamoDB Local / LocalStack for development).
|
Package dynamodb is the docstore.Store for Amazon DynamoDB (and DynamoDB Local / LocalStack for development). |
|
docstore/internal/dsutil
Package dsutil holds helpers shared by the docstore backends: argument validation, canonicalisation of document bodies and JSON encoding.
|
Package dsutil holds helpers shared by the docstore backends: argument validation, canonicalisation of document bodies and JSON encoding. |
|
docstore/memory
Package memory is an in-process docstore.Store backed by maps.
|
Package memory is an in-process docstore.Store backed by maps. |
|
docstore/postgres
Package postgres is the docstore.Store for PostgreSQL (Cloud SQL, RDS, Aurora, Azure Database for PostgreSQL Flexible Server, self-hosted…) using pgx/v5 and JSONB.
|
Package postgres is the docstore.Store for PostgreSQL (Cloud SQL, RDS, Aurora, Azure Database for PostgreSQL Flexible Server, self-hosted…) using pgx/v5 and JSONB. |
|
docstore/sqlite
Package sqlite is the embedded, single-node docstore.Store backed by SQLite (modernc.org/sqlite, pure Go, driver name "sqlite").
|
Package sqlite is the embedded, single-node docstore.Store backed by SQLite (modernc.org/sqlite, pure Go, driver name "sqlite"). |
|
identity
Package identity defines the user profile shared by authentication, the identity API (backyard.id), presence and audit logging.
|
Package identity defines the user profile shared by authentication, the identity API (backyard.id), presence and audit logging. |
|
identity/identitytest
Package identitytest holds integration tests that run the identity user cache against the real docstore backends (memory, SQLite and, when the BACKYARD_TEST_* services are available, PostgreSQL and DynamoDB Local).
|
Package identitytest holds integration tests that run the identity user cache against the real docstore backends (memory, SQLite and, when the BACKYARD_TEST_* services are available, PostgreSQL and DynamoDB Local). |
|
keys
Package keys derives purpose-specific keys from server.secret so that a session key can never be used to forge an API token or an upload URL.
|
Package keys derives purpose-specific keys from server.secret so that a session key can never be used to forge an API token or an upload URL. |
|
mcpremote
Package mcpremote serves the remote MCP endpoint of the Claude connector, POST /__backyard/mcp (SPEC §14.1): Streamable HTTP, stateless, JSON responses only, protocol versions 2025-11-25 and 2025-06-18.
|
Package mcpremote serves the remote MCP endpoint of the Claude connector, POST /__backyard/mcp (SPEC §14.1): Streamable HTTP, stateless, JSON responses only, protocol versions 2025-11-25 and 2025-06-18. |
|
mcpserver
Package mcpserver implements `backyard mcp`: a Model Context Protocol server (stdio) that lets coding agents read the Backyard docs, scaffold sites, deploy them and look at — or reuse code from — other sites, using the credentials of the current CLI profile (SPEC §14).
|
Package mcpserver implements `backyard mcp`: a Model Context Protocol server (stdio) that lets coding agents read the Backyard docs, scaffold sites, deploy them and look at — or reuse code from — other sites, using the credentials of the current CLI profile (SPEC §14). |
|
netguard
Package netguard guards outbound HTTP requests whose target comes from outside the server (an end user's image URL, an MCP client metadata document) against server-side request forgery: connections to loopback, private, link-local, multicast or otherwise non-public addresses are refused.
|
Package netguard guards outbound HTTP requests whose target comes from outside the server (an end user's image URL, an MCP client metadata document) against server-side request forgery: connections to loopback, private, link-local, multicast or otherwise non-public addresses are refused. |
|
pubsub
Package pubsub is the cross-instance message bus used by realtime to fan out database events, room messages and presence between server instances.
|
Package pubsub is the cross-instance message bus used by realtime to fan out database events, room messages and presence between server instances. |
|
pubsub/backends
Package backends constructs a pubsub.Broker from configuration.
|
Package backends constructs a pubsub.Broker from configuration. |
|
pubsub/internal/fanout
Package fanout is the local delivery engine shared by the pubsub brokers.
|
Package fanout is the local delivery engine shared by the pubsub brokers. |
|
pubsub/memory
Package memory is the in-process pubsub.Broker used for single-instance deployments, development and tests.
|
Package memory is the in-process pubsub.Broker used for single-instance deployments, development and tests. |
|
pubsub/postgres
Package postgres implements pubsub.Broker on PostgreSQL LISTEN/NOTIFY, so a horizontally scaled deployment that already uses Postgres for documents needs no extra infrastructure.
|
Package postgres implements pubsub.Broker on PostgreSQL LISTEN/NOTIFY, so a horizontally scaled deployment that already uses Postgres for documents needs no extra infrastructure. |
|
pubsub/pubsubtest
Package pubsubtest is the conformance suite every pubsub.Broker implementation must pass.
|
Package pubsubtest is the conformance suite every pubsub.Broker implementation must pass. |
|
pubsub/redis
Package redis implements pubsub.Broker on Redis (or Valkey, ElastiCache, Memorystore) PUBLISH/SUBSCRIBE.
|
Package redis implements pubsub.Broker on Redis (or Valkey, ElastiCache, Memorystore) PUBLISH/SUBSCRIBE. |
|
ratelimit
Package ratelimit implements Backyard's per-instance request limits (SPEC §11): token buckets per category and key, and a daily budget of AI tokens.
|
Package ratelimit implements Backyard's per-instance request limits (SPEC §11): token buckets per category and key, and a daily budget of AI tokens. |
|
realtime
Package realtime implements the per-site websocket hub described in docs/spec/SPEC.md §6: database change subscriptions, rooms with broadcast/direct messages and presence, fanned out across instances through a pubsub.Broker.
|
Package realtime implements the per-site websocket hub described in docs/spec/SPEC.md §6: database change subscriptions, rooms with broadcast/direct messages and presence, fanned out across instances through a pubsub.Broker. |
|
server
Package server is Backyard's HTTP layer (SPEC §2–§6): host/path routing, static site serving, the site API (identity, db, files, ai, warehouse, websocket), the hub (UI, docs, llms.txt, site list, tokens), the embedded deploy gateway mount, health checks, rate limiting and metrics.
|
Package server is Backyard's HTTP layer (SPEC §2–§6): host/path routing, static site serving, the site API (identity, db, files, ai, warehouse, websocket), the hub (UI, docs, llms.txt, site list, tokens), the embedded deploy gateway mount, health checks, rate limiting and metrics. |
|
server/servertest
Package servertest holds end-to-end tests that run the HTTP server against real components: the filesystem blob store, the SQLite (and, when BACKYARD_TEST_POSTGRES_DSN is set, PostgreSQL) document store, the realtime hub over in-memory (and, when BACKYARD_TEST_REDIS_URL is set, Redis) pub/sub, the auth package in mode "none" and the embedded deploy gateway.
|
Package servertest holds end-to-end tests that run the HTTP server against real components: the filesystem blob store, the SQLite (and, when BACKYARD_TEST_POSTGRES_DSN is set, PostgreSQL) document store, the realtime hub over in-memory (and, when BACKYARD_TEST_REDIS_URL is set, Redis) pub/sub, the auth package in mode "none" and the embedded deploy gateway. |
|
sites
Package sites owns site naming, metadata and manifests stored in the blob store (SPEC §7.2, §9).
|
Package sites owns site naming, metadata and manifests stored in the blob store (SPEC §7.2, §9). |
|
sites/sitestest
Package sitestest provides test helpers for code built on the sites registry and the deploy gateway: an in-memory blob.Store with optional presigned uploads served by an http.Handler.
|
Package sitestest provides test helpers for code built on the sites registry and the deploy gateway: an in-memory blob.Store with optional presigned uploads served by an http.Handler. |
|
version
Package version holds build information injected with -ldflags.
|
Package version holds build information injected with -ldflags. |
|
warehouse
Package warehouse provides read-only analytics queries (backyard.warehouse) against BigQuery, Postgres-compatible databases (incl.
|
Package warehouse provides read-only analytics queries (backyard.warehouse) against BigQuery, Postgres-compatible databases (incl. |
|
warehouse/athena
Package athena implements warehouse.Source for Amazon Athena (Trino SQL) with the AWS SDK for Go v2.
|
Package athena implements warehouse.Source for Amazon Athena (Trino SQL) with the AWS SDK for Go v2. |
|
warehouse/bigquery
Package bigquery implements warehouse.Source for Google BigQuery (GoogleSQL) with cloud.google.com/go/bigquery.
|
Package bigquery implements warehouse.Source for Google BigQuery (GoogleSQL) with cloud.google.com/go/bigquery. |
|
warehouse/internal/conv
Package conv holds JSON-friendly value conversions shared by the warehouse sources (sqlsource, bigquery, athena), so every engine renders numbers, decimals, bytes and timestamps the same way (SPEC §5.5).
|
Package conv holds JSON-friendly value conversions shared by the warehouse sources (sqlsource, bigquery, athena), so every engine renders numbers, decimals, bytes and timestamps the same way (SPEC §5.5). |
|
warehouse/service
Package service implements warehouse.Service on top of the configured sources (SPEC §5.5).
|
Package service implements warehouse.Service on top of the configured sources (SPEC §5.5). |
|
warehouse/sqlsource
Package sqlsource implements warehouse.Source for PostgreSQL and Postgres-compatible engines (Amazon Redshift, AlloyDB, Aurora, Neon, CockroachDB, …) on a pgx/v5 connection pool.
|
Package sqlsource implements warehouse.Source for PostgreSQL and Postgres-compatible engines (Amazon Redshift, AlloyDB, Aurora, Neon, CockroachDB, …) on a pgx/v5 connection pool. |
|
scripts
|
|
|
checkconfig
command
Command checkconfig validates Backyard server configuration files exactly the way `backyard serve` loads them (strict YAML with ${ENV} expansion, environment overrides, defaults and validation, see internal/config), but without needing the real secrets.
|
Command checkconfig validates Backyard server configuration files exactly the way `backyard serve` loads them (strict YAML with ${ENV} expansion, environment overrides, defaults and validation, see internal/config), but without needing the real secrets. |
|
mkzip
command
Command mkzip writes a zip archive of the given files, each stored at the archive root under its base name.
|
Command mkzip writes a zip archive of the given files, each stored at the archive root under its base name. |
|
tfrender
Package tfrender renders Backyard's Terraform modules for tests.
|
Package tfrender renders Backyard's Terraform modules for tests. |
|
Package skills embeds the Backyard agent skill (skills/backyard/**), the single source of truth for agent-facing documentation.
|
Package skills embeds the Backyard agent skill (skills/backyard/**), the single source of truth for agent-facing documentation. |
|
Package templates renders the files written by `backyard init` (and the MCP tool backyard_init): the starter page(s), .backyard.json, .backyardignore, and the instructions for coding agents — CLAUDE.md plus the embedded Backyard skill for Claude Code, AGENTS.md for Codex and other AGENTS.md-aware agents, a Cursor project rule and GitHub Copilot repository instructions.
|
Package templates renders the files written by `backyard init` (and the MCP tool backyard_init): the starter page(s), .backyard.json, .backyardignore, and the instructions for coding agents — CLAUDE.md plus the embedded Backyard skill for Claude Code, AGENTS.md for Codex and other AGENTS.md-aware agents, a Cursor project rule and GitHub Copilot repository instructions. |
|
Package web embeds the browser assets: the client SDK (web/sdk/) served at /__backyard/backyard.{js,mjs,d.ts} on every host and the hub UI (web/hub/).
|
Package web embeds the browser assets: the client SDK (web/sdk/) served at /__backyard/backyard.{js,mjs,d.ts} on every host and the hub UI (web/hub/). |
Click to show internal directories.
Click to hide internal directories.