Documentation
Configuration Reference
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/)
| File | Purpose |
|---|---|
.env.example | Env var template |
drizzle.config.ts | Drizzle Kit — schema path, migrations output |
next.config.ts | Next.js + MDX + Sentry build wrapper |
source.config.ts | Fumadocs MDX collections |
openspec/config.yaml | AI agent context and OpenSpec rules |
src/features/dashboard/config/
Dashboard navigation (feature-local, not a global src/config/ directory).
| File | Controls |
|---|---|
nav.ts | Dashboard sidebar groups and demo nav items |
settings-nav.ts | Settings sidebar, page titles, active state |
src/lib/
Shared infrastructure. Integration config modules and main entry points:
| Path | Controls |
|---|---|
lib/auth/auth.ts | Better Auth setup (providers, verification, email hooks) |
lib/auth/social.ts | Google/GitHub “configured” checks |
lib/db/index.ts | Postgres client (prepare: false, pool settings) |
lib/db/schema/ | Drizzle table definitions |
lib/billing/config.ts | Provider id, plan IDs, feature→plan gating |
lib/billing/index.ts | Public billing API (checkout, hasPlan, canAccess) |
lib/email/config.ts | Resend env readers |
lib/analytics/config.ts | PostHog hosts and enable checks |
lib/analytics/events.ts | Event name taxonomy |
lib/monitoring/config.ts | Sentry enable rules, trace sampling |
lib/r2.ts | R2 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:
| File | Controls |
|---|---|
features/marketing/marketing-structure.ts | Landing page structure — section IDs, hrefs, ordering (copy in messages/{locale}/marketing.json) |
lib/billing/config/plans.ts | Free/Pro plan labels and feature lists (billing UI) |
features/dashboard/config/preferences.ts | Theme and language options |
features/dashboard/schemas/security.ts | Password length rules |
features/dashboard/lib/avatar.ts | Avatar size and MIME limits |
features/dashboard/config/notifications.ts | Notification defaults |
features/links/config.ts | Link list pagination (LINKS_PAGE_SIZE) |
features/storage/config.ts | Upload size, MIME allowlist, pagination |
features/ai-email/config.ts | Tone/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
| File | Controls |
|---|---|
src/app/layout.tsx | Root SEO title template, Open Graph defaults |
src/app/(marketing)/(site)/page.tsx | Landing page metadata |
src/lib/email/templates/shared.tsx | Email brand name |
Quick rules
- Env vars → secrets and external service credentials (Environment Variables)
src/features/dashboard/config/→ dashboard nav and settings navsrc/lib/*/config.ts→ integration enable logic and defaultssrc/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.