/** * CatOS Application Manager Module * Handles app registration, launching, and management */ class AppManager { constructor(core) { this.core = core; this.projects = { 'sneaky-cat-proxy': { title: 'Sneaky Cat Proxy', icon: '🔗', description: 'A purr-fessional proxy that helps cats navigate the internet stealthily! 🕵️‍♀️', technologies: ['Node.js', 'Express', 'Stealth'], features: [ 'Stealth browsing capabilities', 'Cat-safe internet filtering', 'Automatic mouse toy detection', 'Built-in treat dispenser API' ], github: 'https://github.com/catcoder/sneaky-proxy', demo: 'https://sneaky-cat-proxy.vercel.app' }, 'cat-photo-gallery': { title: 'Cat Photo Gallery', icon: '📸', description: 'A claw-some gallery to showcase all your favorite cat pics with purr-fect filtering! 😻', technologies: ['React', 'TypeScript', 'Tailwind'], features: [ 'Advanced cat photo filtering', 'Automatic whisker detection', 'Paw print watermarking', 'Social sharing for cat influencers' ], github: 'https://github.com/catcoder/cat-gallery', demo: 'https://cat-gallery.vercel.app' }, 'robo-cat-manager': { title: 'Robo-Cat Manager', icon: '🤖', description: 'Managing Discord bots like herding cats! Keep your digital kitties in line with style! 🐱‍💻', technologies: ['Discord.js', 'MongoDB', 'Docker'], features: [ 'Multi-bot management dashboard', 'Automatic yarn ball deployment', 'Cat behavior analytics', 'Emergency tuna button' ], github: 'https://github.com/catcoder/robo-cat-manager', demo: 'https://discord-bot-manager.vercel.app' } }; } registerAllApps(core) { this.core = core; // Register core apps (only if Terminal module is available) if (window.CatOSTerminal) { this.core.apps.set('terminal', { title: 'CatOS Terminal', icon: '💻', create: this.createTerminalApp.bind(this) }); } this.core.apps.set('project-viewer', { title: 'Project Viewer', icon: '📁', create: this.createProjectViewer.bind(this) }); this.core.apps.set('about', { title: 'About CatOS', icon: '📋', create: this.createAboutApp.bind(this) }); this.core.apps.set('contact', { title: 'Contact', icon: '📧', create: this.createContactApp.bind(this) }); this.core.apps.set('file-explorer', { title: 'File Explorer', icon: '📁', create: this.createFileExplorer.bind(this) }); } launchApp(appType, options = {}) { const app = this.core.apps.get(appType); if (!app) { this.core.showNotification('Error', `App "${appType}" not found! 😿`); return; } // Check if app is already running (for singleton apps) if (appType === 'about' || appType === 'contact') { for (let [windowId, window] of this.core.windows) { if (window.appType === appType) { // Focus existing window instead of creating new one this.core.windowManager.focusWindow(windowId); return; } } } const content = app.create(options); const windowId = this.core.windowManager.createWindow({ title: app.title, icon: app.icon, content: content, appType: appType }); this.core.windowManager.addToTaskbar(windowId, app); return windowId; } createTerminalApp() { const terminalId = `terminal-${Date.now()}`; setTimeout(() => { if (window.CatOSTerminal) { window.CatOSTerminal.initialize(terminalId, this.core); } }, 100); return `
cat@catos:~$ Welcome to CatOS Terminal! 🐱
cat@catos:~$ Type 'help' for available commands or 'meow' for cat wisdom
cat@catos:~$
`; } createProjectViewer(options) { const projectId = options.projectId; const project = this.projects[projectId]; if (!project) { return `
😿
Project Not Found
The requested project could not be found.
`; } return `
${project.icon}

${project.title}

${project.description}

🛠️ Technologies

${project.technologies.map(tech => `${tech}`).join('')}

✨ Features

    ${project.features.map(feature => `
  • 🐾 ${feature}
  • `).join('')}
`; } createAboutApp() { return `
🐱‍💻

Rafael - Cat Developer

Crafting purr-fessional software with whiskers and code

🎯 About Me

Welcome to my digital litter box! I'm a passionate developer who believes that the best code is written with cat-like curiosity and precision. When I'm not debugging, you'll find me contemplating the philosophical implications of yarn balls and infinite loops.

🛠️ Skills

JavaScript
TypeScript
React
Node.js
Python
Cat Psychology

🐾 Philosophy

"In coding, as in cat life, the best solutions often come from patient observation, strategic planning, and the occasional strategic nap." - The Cat Developer's Manifesto
`; } createContactApp() { return `
📧

Get in Touch

Let's discuss your next purr-fect project!

📧

Email

hello@catcoder.dev

💼

LinkedIn

linkedin.com/in/catdeveloper

🐱

GitHub

github.com/catcoder

Quick Message

`; } createFileExplorer() { return `
🏠 / Users / cat
📁
Projects
--
Today
📁
Documents
--
Yesterday
📄
resume.pdf
2.1 MB
Mar 15
🖼️
cat_memes.jpg
856 KB
Mar 14
💻
startup.sh
1.2 KB
Mar 13
`; } handleContactForm(event) { event.preventDefault(); const formData = new FormData(event.target); const data = Object.fromEntries(formData.entries()); // Simulate form submission this.core.showNotification( '✅ Message Sent!', `Thanks ${data.name}! I'll get back to you faster than a cat chasing a laser pointer! 🐱` ); event.target.reset(); return false; } } // Export for use in main system window.CatOSAppManager = AppManager;