How puruvj/macos-web works
Project Type and Purpose
• The README clearly explains that this project is a web-based recreation of the macOS desktop experience.
• It emphasizes that it is built in Svelte (previously in Preact), uses Vite for rapid development, and features styling with SCSS.
• Think of the system as a highly interactive, client-side user interface application that mimics the desktop operating system.
File Structure to Identify Main Components
• Top-level directories:
• “src”: The heart of the application, containing subdirectories for:
⮞ “components”: Organized by functionality (Desktop, Dock, TopBar, SystemUI, apps, and SVG components). These are the visual and interaction elements of the UI.
⮞ “actions”: Contains event and behavior helpers (e.g., click-outside, focus-outside, portal, trap-focus) that manage interactive behaviors.
⮞ “configs”: Holds configuration files for apps, menus, wallpapers, and themes, which guide how the UI is customized.
⮞ “helpers”: Utility functions to support various application needs such as fading animations, random values, or app configuration creation.
⮞ “state”: Svelte state management modules (using Svelte’s reactivity) for apps, dock, menubar, system settings, etc.
⮞ “assets”: Additional static resources (wallpapers, etc.) utilized by the components.
• “index.html” and “main.ts”: Serve as the application’s entry point, bootstrapping the Svelte app.
• Configuration and build files (e.g., package.json, vite.config.ts, svelte.config.js) which don’t map directly as components but are essential for project build and deployment.
Final Advice
• Be as detailed as possible — it’s best to break the application into every conceivable module rather than oversimplify.