Skip to content

Configuration

Client site configuration lives in two files: portal.config.mjs wires up the runtime providers, and src/content/site-config.json controls the brand presentation.

portal.config.mjs is the entry point for the portal framework. It must import defineConfig from @drawnagency/core/confignot the root @drawnagency/core export, which includes Node-only integration code and will break in the browser during editor hydration.

import { defineConfig, supabaseDeployStatus } from "@drawnagency/core/config";
import { supabaseAuth } from "@drawnagency/auth-supabase";
import { githubStorage } from "@drawnagency/github";
export default defineConfig({
auth: supabaseAuth(),
storage: githubStorage(),
deployStatus: supabaseDeployStatus(),
site: { name: "Acme Brand Portal" },
});

To add your own section types, create a src/sections.ts file at the repo root — see Building custom sections. You can optionally also pass that array to defineConfig’s sections field for a type-check, but registration happens through src/sections.ts regardless of the config field.

KeyDescription
authAuthentication provider. supabaseAuth() for OAuth + email/password; see Auth & audiences setup.
storageContent storage backend. githubStorage() saves edits back to the GitHub repository.
deployStatusDeploy status provider. supabaseDeployStatus() exposes Netlify build state in the editor UI.
sectionsOptional, type-only. Custom section types register from a root src/sections.ts file, not this field — see Building custom sections. Passing the array here only adds a type-check.
assetsOptional. Bucket storage for self-hosted video over the git cap. r2Assets() from @drawnagency/assets-r2 — the template’s default. Omit and video falls back to small git-backed loops plus YouTube/Vimeo embeds.
documentsOptional. Private-bucket storage for the files behind document sections over the 2.5 MB git cap. r2Documents() from @drawnagency/assets-r2 — the template’s default.
collabOptional. Live multi-editor presence and section locks. supabaseCollab() from @drawnagency/auth-supabase. Absent, the editor degrades cleanly to solo.
mediaOptional. The media provider (image resolution/upload). Defaults to the GitHub-backed one; this is where the adapter is chosen, not in site-config.json.
builtinsOptional, "core" | "all". A typed seam that is not yet wired — both built-in groups always register today, so setting it has no effect.
site.nameThe site’s display name, shown in the editor header and page <title>.

Every optional key above is documented field-by-field in the Config reference, including its env-var requirements in platform vs standalone mode.

site-config.json controls brand presentation — colors, typography, and media pipeline settings. The provisioner writes this file when creating a new site; update it manually or via the /populate-site skill.

{
"siteName": "Brand Portal",
"primaryColor": "#a84300",
"primaryContrast": "#f0f0f0",
"darkMode": "dark",
"headingFont": "system-ui",
"bodyFont": "system-ui",
"googleFontsUrl": null,
"media": {
"sizes": [640, 1080, 1920],
"maxFileSize": 5242880,
"quality": 85
}
}
FieldTypeDescription
siteNamestringSite display name (used in metadata and editor UI).
primaryColorstringBrand primary color as a 6-digit hex (#RRGGBB).
primaryContraststringThe accent color — text on primary-colored buttons and the text-selection color, as a 6-digit hex. Editable in the Display tab.
darkMode"light" | "dark" | "optional"Color scheme. "optional" respects the viewer’s OS preference.
headingFontstringCSS font-family value for headings. Use "system-ui" or a Google Font name.
bodyFontstringCSS font-family value for body text.
googleFontsUrlstring | nullFull https://fonts.googleapis.com/css2?... URL, or null for system fonts.
media.sizesnumber[]Output widths (px) for processed images. Default: [640, 1080, 1920].
media.maxFileSizenumberMaximum upload size in bytes. Default: 5242880 (5 MB).
media.qualitynumberWebP compression quality (1–100). Default: 85.

For the full reference of every accepted field and its validation rules, see the Config reference.