Navigation: Root AGENTS.md → Web → Config
- Group related constants together in the same object or section.
- Use
as constfor immutable configuration arrays and objects. - Use TypeScript interfaces for all configuration types.
- Use environment variables (
import.meta.env.VITE_*) for deployment-specific config — never hardcode URLs or API keys. - Export getter functions for derived config values instead of mutable state.
// ✅ Good — typed, immutable configuration
export const ALLOWED_TYPES = ['image', 'video', 'audio'] as const;
type AllowedType = typeof ALLOWED_TYPES[number];
// ❌ Bad — untyped, mutable
export const ALLOWED_TYPES = ['image', 'video', 'audio'];// ✅ Good — environment-aware
export const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:7777';
// ❌ Bad — hardcoded
export const API_URL = 'http://localhost:7777';constants.ts— Application-wide constants (zoom levels, file limits, cache times)shortcuts.ts— Keyboard shortcut definitionsmodels.ts— Pre-configured AI model definitionsdata_types.tsx— Node data type definitions and colorsdefaultLayouts.ts— Default Dockview panel layouts
- New shortcut: Add a
ShortcutDefinitiontoshortcuts.ts. - New model: Add a
UnifiedModelentry to the appropriate array inmodels.ts. - New data type: Add to
DATA_TYPESindata_types.tsx. - New constant: Add to
constants.tswith proper typing.