Skip to main content
All Seemodo configuration is centralized in config/app.config.ts. This page documents all available options.

Configuration File

config/app.config.ts
export const appConfig = {
  ai: { /* AI settings */ },
  modal: { /* Modal sandbox settings */ },
  e2b: { /* E2B sandbox settings */ },
  vercelSandbox: { /* Vercel sandbox settings */ },
  codeApplication: { /* Code processing */ },
  packages: { /* Package installation */ },
  ui: { /* UI behavior */ },
  files: { /* File handling */ },
  api: { /* API settings */ },
  dev: { /* Development options */ },
};

AI Configuration

Control AI model selection and behavior:
ai: {
  // Default model for generation
  defaultModel: 'google/gemini-3-pro-preview',
  
  // Available models for selection
  availableModels: [
    'openai/gpt-5',
    'moonshotai/kimi-k2-instruct-0905',
    'anthropic/claude-sonnet-4-20250514',
    'google/gemini-3-pro-preview'
  ],
  
  // Display names in UI
  modelDisplayNames: {
    'openai/gpt-5': 'GPT-5',
    'moonshotai/kimi-k2-instruct-0905': 'Kimi K2 (Groq)',
    'anthropic/claude-sonnet-4-20250514': 'Sonnet 4',
    'google/gemini-3-pro-preview': 'Gemini 3 Pro (Preview)'
  },
  
  // Temperature for creative variety
  defaultTemperature: 0.7,
  
  // Maximum tokens for generation
  maxTokens: 8000,
  
  // Tokens for truncation recovery
  truncationRecoveryMaxTokens: 4000,
}

Model Selection

Enable the model selector in the UI by adding ?model=true to the URL:
http://app.seemodo.ai/start?model=true
This reveals a dropdown to choose between available models.

Adding New Models

To add a new AI model:
  1. Add the model ID to availableModels
  2. Add a display name in modelDisplayNames
  3. Ensure the provider is configured in your .env

Sandbox Configuration

modal: {
  // Session duration (1-1440 minutes)
  timeoutMinutes: 60,
  
  // Backend URL (from environment)
  backendUrl: process.env.MODAL_BACKEND_URL,
  
  // Vite dev server port
  vitePort: 5173,
  
  // Time to wait for Vite startup
  viteStartupDelay: 5000,
  
  // Working directory in container
  workingDirectory: '/root/vite-app',
}

E2B Settings

e2b: {
  timeoutMinutes: 60,
  vitePort: 5173,
  viteStartupDelay: 10000,
  workingDirectory: '/home/user/app',
}

Vercel Sandbox Settings

vercelSandbox: {
  timeoutMinutes: 15,
  devPort: 3000,
  devServerStartupDelay: 7000,
  cssRebuildDelay: 2000,
  workingDirectory: '/app',
  runtime: 'node22',
}

Code Application

Configure how AI-generated code is applied:
codeApplication: {
  // Delay before refreshing preview (ms)
  defaultRefreshDelay: 2000,
  
  // Extra delay when packages are installed
  packageInstallRefreshDelay: 5000,
  
  // Auto-recover truncated code
  enableTruncationRecovery: false,
  
  // Max recovery attempts per file
  maxTruncationRecoveryAttempts: 1,
}

Package Management

packages: {
  // Use --legacy-peer-deps for npm
  useLegacyPeerDeps: true,
  
  // Installation timeout (ms)
  installTimeout: 60000,
  
  // Restart Vite after installing
  autoRestartVite: true,
}

UI Configuration

ui: {
  // Show model selector (also requires ?model=true)
  showModelSelector: true,
  
  // Show status indicators
  showStatusIndicator: true,
  
  // Animation duration (ms)
  animationDuration: 200,
  
  // Toast notification duration (ms)
  toastDuration: 3000,
  
  // Max chat messages in memory
  maxChatMessages: 100,
  
  // Context messages for AI
  maxRecentMessagesContext: 20,
}

File Handling

files: {
  // Patterns to exclude from file operations
  excludePatterns: [
    'node_modules/**',
    '.git/**',
    '.next/**',
    'dist/**',
    'build/**',
    '*.log',
    '.DS_Store'
  ],
  
  // Max file size to read (bytes)
  maxFileSize: 1024 * 1024, // 1MB
  
  // Extensions treated as text
  textFileExtensions: [
    '.js', '.jsx', '.ts', '.tsx',
    '.css', '.scss', '.sass',
    '.html', '.xml', '.svg',
    '.json', '.yml', '.yaml',
    '.md', '.txt', '.env',
    '.gitignore', '.dockerignore'
  ],
}

API Settings

api: {
  // Retry failed requests
  maxRetries: 3,
  
  // Delay between retries (ms)
  retryDelay: 1000,
  
  // Request timeout (ms)
  requestTimeout: 30000,
}

Development Options

dev: {
  // Enable debug console output
  enableDebugLogging: true,
  
  // Performance monitoring
  enablePerformanceMonitoring: false,
  
  // Log API responses
  logApiResponses: true,
}

Environment Variables

Required and optional environment variables:

Required

VariableDescription
GEMINI_API_KEYGoogle Gemini API key (default model)
SANDBOX_PROVIDERProvider: modal, e2b, or vercel

Provider-Specific

VariableRequired WhenDescription
MODAL_BACKEND_URLprovider=modalDeployed Modal backend URL
E2B_API_KEYprovider=e2bE2B API key

Optional AI Providers

VariableDescription
ANTHROPIC_API_KEYAnthropic Claude API key
OPENAI_API_KEYOpenAI API key
GROQ_API_KEYGroq API key (for Kimi K2)

Using the Config

Direct Access

import { appConfig } from '@/config/app.config';

// Access config values
const timeout = appConfig.modal.timeoutMinutes;
const defaultModel = appConfig.ai.defaultModel;

Type-Safe Getter

import { getConfig } from '@/config/app.config';

// Type-safe access to config sections
const aiConfig = getConfig('ai');
const modalConfig = getConfig('modal');

Nested Value Access

import { getConfigValue } from '@/config/app.config';

// Access nested values by path
const maxTokens = getConfigValue('ai.maxTokens');
const vitePort = getConfigValue('modal.vitePort');

Runtime Configuration

Some settings can be changed at runtime via URL parameters:
ParameterEffect
?model=trueShow model selector
?prompt=...Pre-fill prompt
?screen=mobileSet screen size
?image1=...Add reference image URL
Example:
/start?model=true&screen=mobile&prompt=Build%20a%20login%20page