// Enhanced configuration for the improved DeepSite platform export const APP_CONFIG = { name: 'DeepSite', version: '2.0.0', description: 'AI-Powered Web Development Platform', // API Configuration api: { baseUrl: process.env.NEXT_PUBLIC_API_URL || '/api', timeout: 30000, retries: 3, }, // AI Configuration ai: { defaultProvider: 'fireworks-ai', // Changed from 'google' to supported provider defaultModel: 'deepseek-ai/DeepSeek-V3-0324', // Changed to supported model maxTokens: 8192, temperature: 0.7, providers: { google: { name: 'Google AI', models: [ 'gemini-2.5-flash', 'gemini-2.5-pro', 'gemini-2.5-flash-lite', 'gemma-3-27b-it', 'gemini-2.0-flash' ], maxTokens: 2_097_152, features: ['text', 'code', 'multimodal', 'reasoning'] }, huggingface: { name: 'Hugging Face', models: [ 'deepseek-ai/DeepSeek-V3-0324', 'deepseek-ai/DeepSeek-R1-0528', 'Qwen/Qwen3-Coder-480B-A35B-Instruct', 'moonshotai/Kimi-K2-Instruct' ], maxTokens: 131_000, features: ['text', 'code'] }, openrouter: { name: 'OpenRouter', models: [ 'google/gemini-2.5-flash-image-preview:free', 'deepseek/deepseek-chat-v3.1:free', 'openai/gpt-oss-120b:free', 'openai/gpt-oss-20b:free', 'z-ai/glm-4.5-air:free', 'qwen/qwen3-coder:free', 'moonshotai/kimi-k2:free', 'tngtech/deepseek-r1t2-chimera:free' ], maxTokens: 131_000, features: ['text', 'code', 'reasoning'] } } }, // File System Configuration fileSystem: { maxFileSize: 10 * 1024 * 1024, // 10MB maxProjectFiles: 1000, supportedTypes: [ 'html', 'css', 'js', 'ts', 'jsx', 'tsx', 'vue', 'json', 'md', 'txt', 'py', 'php', 'xml', 'svg', 'yaml', 'yml', 'png', 'jpg', 'jpeg', 'gif', 'ico', 'webp', 'pdf' ], autoSave: { enabled: true, interval: 2000, // 2 seconds }, versioning: { enabled: true, maxVersions: 50, autoCreateOnSave: true } }, // Editor Configuration editor: { theme: 'deepsite-dark', fontSize: 14, fontFamily: 'JetBrains Mono, Consolas, Monaco, "Courier New", monospace', tabSize: 2, insertSpaces: true, wordWrap: 'off', minimap: true, lineNumbers: 'on', bracketPairColorization: true, formatOnSave: true, formatOnPaste: true, autoIndent: 'full', suggestions: { enabled: true, showKeywords: true, showSnippets: true, showFunctions: true } }, // UI Configuration ui: { theme: 'dark', sidebarWidth: 300, panelSizes: { explorer: 25, editor: 50, preview: 25 }, animations: { enabled: true, duration: 200 }, notifications: { position: 'bottom-right', duration: 5000, maxVisible: 5 } }, // Project Templates templates: { website: { name: 'Website', description: 'Static or dynamic website', files: ['index.html', 'style.css', 'script.js'], framework: 'vanilla' }, webapp: { name: 'Web Application', description: 'Interactive web application', files: ['index.html', 'app.js', 'style.css'], framework: 'vanilla' }, react: { name: 'React App', description: 'React application with modern setup', files: ['App.jsx', 'index.html', 'style.css'], framework: 'react' }, vue: { name: 'Vue App', description: 'Vue.js application', files: ['App.vue', 'index.html', 'style.css'], framework: 'vue' } }, // Feature Flags features: { aiAssistant: true, projectGenerator: true, smartEditor: true, promptSystem: true, fileVersioning: true, realTimeCollaboration: false, // Coming soon cloudSync: false, // Coming soon deployment: false, // Coming soon analytics: true, errorReporting: true }, // Performance Configuration performance: { debounceDelay: 300, throttleDelay: 100, maxConcurrentRequests: 5, cacheTimeout: 5 * 60 * 1000, // 5 minutes lazyLoading: true, virtualScrolling: true }, // Security Configuration security: { maxRequestSize: 50 * 1024 * 1024, // 50MB allowedOrigins: [ 'http://localhost:3000', 'https://deepsite.vercel.app' ], rateLimiting: { enabled: true, maxRequests: 100, windowMs: 15 * 60 * 1000 // 15 minutes } }, // Analytics Configuration analytics: { enabled: process.env.NODE_ENV === 'production', trackingId: process.env.NEXT_PUBLIC_GA_ID, events: { fileCreated: 'file_created', fileEdited: 'file_edited', aiGeneration: 'ai_generation', projectCreated: 'project_created' } }, // Development Configuration development: { debug: process.env.NODE_ENV === 'development', mockData: false, showPerformanceMetrics: false, enableHotReload: true } }; // Environment-specific overrides if (process.env.NODE_ENV === 'development') { APP_CONFIG.development.debug = true; APP_CONFIG.development.showPerformanceMetrics = true; APP_CONFIG.security.rateLimiting.enabled = false; } if (process.env.NODE_ENV === 'production') { APP_CONFIG.analytics.enabled = true; APP_CONFIG.development.debug = false; APP_CONFIG.performance.lazyLoading = true; } // Utility functions export const getConfig = (path: string): unknown => { return path.split('.').reduce((obj, key) => { if (obj && typeof obj === 'object' && key in (obj as Record)) { return (obj as Record)[key]; } return undefined; }, APP_CONFIG as unknown as Record); }; export const isFeatureEnabled = (feature: keyof typeof APP_CONFIG.features): boolean => { return APP_CONFIG.features[feature] === true; }; export const getAIProvider = (providerId: string) => { return APP_CONFIG.ai.providers[providerId as keyof typeof APP_CONFIG.ai.providers]; }; export const getSupportedFileTypes = () => { return APP_CONFIG.fileSystem.supportedTypes; }; export const getEditorConfig = () => { return APP_CONFIG.editor; }; export const getUIConfig = () => { return APP_CONFIG.ui; }; // Type definitions export type AIProvider = keyof typeof APP_CONFIG.ai.providers; export type FileType = typeof APP_CONFIG.fileSystem.supportedTypes[number]; export type ProjectTemplate = keyof typeof APP_CONFIG.templates; export type FeatureFlag = keyof typeof APP_CONFIG.features; // Constants export const SUPPORTED_FILE_TYPES = APP_CONFIG.fileSystem.supportedTypes; export const MAX_FILE_SIZE = APP_CONFIG.fileSystem.maxFileSize; export const MAX_PROJECT_FILES = APP_CONFIG.fileSystem.maxProjectFiles; export const AUTO_SAVE_INTERVAL = APP_CONFIG.fileSystem.autoSave.interval; export const DEFAULT_AI_MODEL = APP_CONFIG.ai.defaultModel; export const DEFAULT_AI_PROVIDER = APP_CONFIG.ai.defaultProvider; export default APP_CONFIG;