export interface Config { // App Configuration app: { name: string version: string debug: boolean timezone: string } // Database Configuration database: { max_connections: number connection_timeout: number } // Kafka Configuration kafka: { max_retries: number retry_delay: number } // Security Configuration security: { session_timeout: number max_login_attempts: number } // Logging Configuration logging: { level: string max_files: number } // Cache Configuration cache: { ttl: number max_size: number } // Site Configuration site: { name: string locale_default: string locales_supported: string[] brand: { logo_url: string primary_color: string dark_mode_default: boolean } footer_links: Array<{ name: string url: string visible_to_guest: boolean }> } // Notice Configuration notice: { banner: { enabled: boolean text: Record } } // Maintenance Configuration maintenance: { window: { enabled: boolean start_time: string end_time: string message: Record } } // Modal Announcements modal: { announcements: Array<{ id: string title: Record content: Record start_time: string end_time: string audience: string[] priority: string }> } // Documentation Links docs: { links: Array<{ name: string url: string description: string }> } // Support Channels support: { channels: { email: string ticket_system: string chat_groups: Array<{ name: string url?: string qr_code?: string description: string }> working_hours: Record } } // Operations Configuration ops: { features: { registration_enabled: boolean invite_code_required: boolean email_verification: boolean } limits: { max_users: number max_invite_codes_per_user: number session_timeout_hours: number } notifications: { welcome_email: boolean system_announcements: boolean maintenance_alerts: boolean } } } export const defaultConfig: Config = { // App Configuration app: { name: "MMAP System", version: "1.0.0", debug: false, timezone: "UTC" }, // Database Configuration database: { max_connections: 10, connection_timeout: 30 }, // Kafka Configuration kafka: { max_retries: 3, retry_delay: 1000 }, // Security Configuration security: { session_timeout: 3600, max_login_attempts: 5 }, // Logging Configuration logging: { level: "info", max_files: 10 }, // Cache Configuration cache: { ttl: 300, max_size: 1000 }, // Site Configuration site: { name: "MMAP System", locale_default: "zh-CN", locales_supported: ["zh-CN", "en"], brand: { logo_url: "/images/logo.png", primary_color: "#3B82F6", dark_mode_default: false }, footer_links: [ { name: "关于我们", url: "/about", visible_to_guest: true }, { name: "联系我们", url: "/contact", visible_to_guest: true }, { name: "用户中心", url: "/dashboard", visible_to_guest: false } ] }, // Notice Configuration notice: { banner: { enabled: false, text: { "zh-CN": "欢迎使用MMAP系统", "en": "Welcome to MMAP System" } } }, // Maintenance Configuration maintenance: { window: { enabled: false, start_time: "2024-01-01T02:00:00Z", end_time: "2024-01-01T06:00:00Z", message: { "zh-CN": "系统维护中,请稍后再试", "en": "System maintenance in progress" } } }, // Modal Announcements modal: { announcements: [ { id: "welcome_2024", title: { "zh-CN": "2024新年快乐", "en": "Happy New Year 2024" }, content: { "zh-CN": "感谢您在过去一年的支持", "en": "Thank you for your support in the past year" }, start_time: "2024-01-01T00:00:00Z", end_time: "2024-01-31T23:59:59Z", audience: ["all"], priority: "high" } ] }, // Documentation Links docs: { links: [ { name: "API文档", url: "/docs/api", description: "完整的API接口文档" }, { name: "图例说明", url: "/docs/legend", description: "系统图例和符号说明" }, { name: "计费说明", url: "/docs/billing", description: "详细的计费规则和说明" }, { name: "用户手册", url: "/docs/user-guide", description: "用户操作指南" } ] }, // Support Channels support: { channels: { email: "support@mapp.com", ticket_system: "/support/tickets", chat_groups: [ { name: "官方QQ群", url: "https://qm.qq.com/xxx", description: "技术交流群" }, { name: "微信群", qr_code: "/images/wechat-qr.png", description: "扫码加入微信群" } ], working_hours: { "zh-CN": "周一至周五 9:00-18:00", "en": "Mon-Fri 9:00-18:00" } } }, // Operations Configuration ops: { features: { registration_enabled: true, invite_code_required: true, email_verification: false }, limits: { max_users: 1000, max_invite_codes_per_user: 10, session_timeout_hours: 24 }, notifications: { welcome_email: true, system_announcements: true, maintenance_alerts: true } } }