Documentation

Configuration Reference

Quick map of configuration files in src/features/dashboard/config, src/lib, and src/features.

Open inChatGPT (opens in a new tab)Claude (opens in a new tab)Cursor (opens in a new tab)Quick map of configuration files in src/features/dashboard/config, src/lib, and src/features.

Motoko Base keeps secrets in environment variables and product choices in TypeScript config files. This page is a quick index — details live in Configuration and integration docs.

Root-level config (outside src/)

FilePurpose
.env.exampleEnv var template
drizzle.config.tsDrizzle Kit — schema path, migrations output
next.config.tsNext.js + MDX + Sentry build wrapper
source.config.tsFumadocs MDX collections
openspec/config.yamlAI agent context and OpenSpec rules

src/features/dashboard/config/

Dashboard navigation (feature-local, not a global src/config/ directory).

FileControls
nav.tsDashboard sidebar groups and demo nav items
settings-nav.tsSettings sidebar, page titles, active state

src/lib/

Shared infrastructure. Integration config modules and main entry points:

PathControls
lib/auth/auth.tsBetter Auth setup (providers, verification, email hooks)
lib/auth/social.tsGoogle/GitHub “configured” checks
lib/db/index.tsPostgres client (prepare: false, pool settings)
lib/db/schema/Drizzle table definitions
lib/billing/config.tsProvider id, plan IDs, feature→plan gating
lib/billing/index.tsPublic billing API (checkout, hasPlan, canAccess)
lib/email/config.tsResend env readers
lib/analytics/config.tsPostHog hosts and enable checks
lib/analytics/events.tsEvent name taxonomy
lib/monitoring/config.tsSentry enable rules, trace sampling
lib/r2.tsR2 client, presigned URLs, bucket/prefix parsing

README deep-dives: lib/db/README.md, lib/email/README.md, lib/monitoring/README.md, lib/security/README.md.

src/features/

Feature-local config — limits, labels, marketing content:

FileControls
features/marketing/marketing-structure.tsLanding page structure — section IDs, hrefs, ordering (copy in messages/{locale}/marketing.json)
lib/billing/config/plans.tsFree/Pro plan labels and feature lists (billing UI)
features/dashboard/config/preferences.tsTheme and language options
features/dashboard/schemas/security.tsPassword length rules
features/dashboard/lib/avatar.tsAvatar size and MIME limits
features/dashboard/config/notifications.tsNotification defaults
features/links/config.tsLink list pagination (LINKS_PAGE_SIZE)
features/storage/config.tsUpload size, MIME allowlist, pagination
features/ai-email/config.tsTone/length/language options, max email length

Features without a config.ts still follow the same folder pattern (components/, actions.ts, queries.ts, schemas.ts) — config files appear when a feature has tunable constants.

Site metadata

FileControls
src/app/layout.tsxRoot SEO title template, Open Graph defaults
src/app/(marketing)/(site)/page.tsxLanding page metadata
src/lib/email/templates/shared.tsxEmail brand name

Quick rules

  • Env vars → secrets and external service credentials (Environment Variables)
  • src/features/dashboard/config/ → dashboard nav and settings nav
  • src/lib/*/config.ts → integration enable logic and defaults
  • src/features/*/config.ts → feature limits and display copy
  • Do not put API keys in TypeScript config files

Configuration — How to change nav, billing, metadata.

Environment Variables — Full env reference.