# jiwon79/macos-web-react architecture

> Architecture diagram of the GitHub repository jiwon79/macos-web-react, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jiwon79/macos-web-react
- Repository: https://github.com/jiwon79/macos-web-react

## Overview

##### Main Architecture Components

**┌─ User Interface Layer ─────────────────────┐**
- Desktop View                             │
- Menu System                             │
- Dock                                    │
- Windows                                 │
- ┘
- ↑
**┌─ Domain Layer ──────────────────────────┐**
- App Domain                            │
- Window Management                     │
- Menu Domain                           │
- Dock Domain                           │
- ┘
- ↑
**┌─ Core Modules Layer ────────────────────┐**
- Event Manager                         │
- Movable                              │
- Resizable                            │
- ┘
- ↑
**┌─ Utility Layer ──────────────────────────┐**
- Browser Utils                          │
- React Utils                           │
- Style Utils                           │
- Type Utils                            │
- ┘

##### Component Relationships

- Blue rectangles for UI components
- Green rectangles for domain logic
- Yellow rectangles for core modules
- Gray rectangles for utilities

##### Specific Components Detail

Window Management System:
**┌─ Window System ────────────────────┐**
- ┌─ WindowRenderer ─┐  ┌─ Window ─┐ │

- ┘  └──────────┘ │
- ┌─ WindowControl ─┐  ┌─ Resize ─┐  │

- ┘  └──────────┘  │
- ┘

Menu System:
**┌─ Menu System ──────────────────────┐**
- ┌─ MenuLeft ────┐ ┌─ FloatingMenu┐ │
- Apple Menu  │ │              │ │
- Submenus    │ │              │ │
- ┘ └──────────────┘ │
- ┘

##### State Management

A section showing Zustand stores:
**┌─ State Management ────────────────┐**
- Window Store                    │
- Calculator Store               │
- Theme Store                    │
- ┘

##### Key Features to Highlight

- Window Management:
- Movable windows
- Resizable windows
- Window controls (minimize, maximize, close)

- Desktop Experience:
- Dock with applications
- Menu bar system
- Dark mode support

##### Technical Implementation Details

Technology stack:
**┌─ Technology Stack ───────────────┐**
- React                         │
- TypeScript                    │
- Vanilla Extract (CSS)         │
- Zustand (State Management)    │
- ┘

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI["User Interface Layer"]
        DV["Desktop View"]
        MS["Menu System"]
        DK["Dock"]
        WS["Windows"]
    end

    subgraph Domain["Domain Layer"]
        AD["App Domain"]
        WM["Window Management"]
        MD["Menu Domain"]
        DD["Dock Domain"]
    end

    subgraph Core["Core Modules Layer"]
        EM["Event Manager"]
        MV["Movable"]
        RS["Resizable"]
    end

    subgraph Util["Utility Layer"]
        BU["Browser Utils"]
        RU["React Utils"]
        SU["Style Utils"]
        TU["Type Utils"]
    end

    subgraph Window["Window System"]
        WR["Window Renderer"]
        WN["Window"]
        WC["Window Controls"]
        RZ["Resize"]
    end

    subgraph Menu["Menu System"]
        ML["Menu Left"]
        FM["Floating Menu"]
    end

    subgraph State["State Management"]
        WST["Window Store"]
        CST["Calculator Store"]
        TST["Theme Store"]
    end

    subgraph Tech["Technology Stack"]
        React["React"]
        TS["TypeScript"]
        VE["Vanilla Extract"]
        ZS["Zustand"]
    end

    UI --> Domain
    Domain --> Core
    Core --> Util
    
    classDef ui fill:#a8d1f0
    classDef domain fill:#90EE90
    classDef core fill:#FFE5B4
    classDef util fill:#E5E4E2
    classDef state fill:#FFB6C1
    classDef tech fill:#DDA0DD

    class DV,MS,DK,WS ui
    class AD,WM,MD,DD domain
    class EM,MV,RS core
    class BU,RU,SU,TU util
    class WST,CST,TST state
    class React,TS,VE,ZS tech

    click DV "https://github.com/jiwon79/macos-web-react/blob/main/src/views/pages/desktop/views/Desktop.tsx"
    click MS "https://github.com/jiwon79/macos-web-react/blob/main/src/domains/menu/views/menu/Menu.tsx"
    click DK "https://github.com/jiwon79/macos-web-react/blob/main/src/domains/dock/views/Dock/Dock.tsx"
    click WM "https://github.com/jiwon79/macos-web-react/blob/main/src/domains/window/views/Window/Window.tsx"
    click AD "https://github.com/jiwon79/macos-web-react/blob/main/src/domains/app/applications.ts"
    click EM "https://github.com/jiwon79/macos-web-react/blob/main/src/modules/event-manager/EventManager.ts"
    click MV "https://github.com/jiwon79/macos-web-react/blob/main/src/modules/movable/Movable.ts"
    click RS "https://github.com/jiwon79/macos-web-react/blob/main/src/modules/resizable/Resizable.ts"
    click WST "https://github.com/jiwon79/macos-web-react/blob/main/src/domains/window/store/store.ts"
    click CST "https://github.com/jiwon79/macos-web-react/tree/main/src/domains/app/applications/calculator/"
    click ML "https://github.com/jiwon79/macos-web-react/blob/main/src/domains/menu/views/menu-left/MenuLeft.tsx"
    click FM "https://github.com/jiwon79/macos-web-react/blob/main/src/domains/menu/views/floating-menu/FloatingMenu.tsx"
    click WC "https://github.com/jiwon79/macos-web-react/blob/main/src/domains/window/views/WindoeControl/WindowControl.tsx"
    click BU "https://github.com/jiwon79/macos-web-react/tree/main/src/utils/broswer/"
    click RU "https://github.com/jiwon79/macos-web-react/tree/main/src/utils/react/"
    click SU "https://github.com/jiwon79/macos-web-react/tree/main/src/utils/style/"
    click TU "https://github.com/jiwon79/macos-web-react/tree/main/src/utils/type/"
```
