# niraj1742/futurise-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/niraj1742/futurise-desktop
- Repository: https://github.com/niraj1742/futurise-desktop

## Overview

##### Project type and purpose
- From the file tree and README, this is a single‐page web application (“Futurise Desktop”) that simulates a desktop UI in the browser.
- It has no separate backend or microservices—everything runs client-side in React/TypeScript, packaged by Vite and styled with Tailwind + shadcn-ui.

##### File structure
- Top level:
- public/ (static assets, index.html)
- src/ (everything React/TS)
- config files (vite.config.ts, tsconfig*, postcss.config.js, tailwind.config.ts, eslint.config.js)
- src/main.tsx: application entry point
- src/App.tsx: root component
- src/components/: all UI components, subdivided into:
- apps/ (simulated desktop apps)
- desktop/ (window manager, widgets, taskbar, search modal)
- ui/ (building blocks from shadcn-ui + custom extensions)
- games/ (in-browser games)
- src/hooks/: custom React hooks (mobile detection, toast)
- src/lib & src/utils: pure functions and helpers
- src/pages/: fallback pages (Index, NotFound)

##### README for additional insights
- Core stack: React + TypeScript, Vite build tool, Tailwind CSS + shadcn-ui component library
- Deployed as a static site (e.g., Vercel)
- No external backend dependencies called out

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Infrastructure Layer
    subgraph "Development & Production Hosting"
        direction TB
        VITE["Vite Dev Server"]:::framework
        CDN["Static File Host / CDN"]:::infra
    end

    BROWSER["User's Web Browser"]:::infra

    %% Flows
    VITE -->|"HTTP GET (dev) index.html + JS/CSS"| BROWSER
    CDN -->|"HTTP GET (prod) index.html + JS/CSS"| BROWSER

    %% React Application inside Browser
    subgraph "React Application (SPA)" 
        direction TB
        ENTRY["main.tsx"]:::framework
        ROOT["App.tsx"]:::framework
        ENTRY -->|"initialize React root"| ROOT
    end

    BROWSER -->|"load JS bundle"| ENTRY

    %% Application Modules
    subgraph "Routing & Pages" 
        direction TB
        INDEX["Index.tsx"]:::app
        NOTFOUND["NotFound.tsx"]:::app
    end
    ROOT -->|"renders based on route"| INDEX
    ROOT -->|"renders based on route"| NOTFOUND

    subgraph "Desktop Shell" 
        direction TB
        DESKTOP["Desktop.tsx"]:::app
        DESKTOPBG["DesktopBackground.tsx"]:::app
        TASKBAR["Taskbar.tsx"]:::app
        WIDGET["Widget.tsx"]:::app
        WINMAN["desktop/WindowManager.tsx"]:::app
        WINDOW["Window.tsx"]:::app
        DWIDGETS["desktop/DesktopWidgets.tsx"]:::app
        CLOCK["desktop/ClockWidget.tsx"]:::app
        SBTN["desktop/SearchButton.tsx"]:::app
        SMODAL["desktop/SearchModal.tsx"]:::app
        APGRID["desktop/AppGrid.tsx"]:::app
        DESKTOP --> DESKTOPBG
        DESKTOP --> APGRID
        DESKTOP --> WINMAN
        WINMAN --> WINDOW
        TASKBAR --> WIDGET
        TASKBAR --> SBTN
        TASKBAR --> SMODAL
        DWIDGETS --> CLOCK
    end
    ROOT -->|"uses desktop shell"| DESKTOP
    ROOT -->|"uses desktop shell"| TASKBAR

    subgraph "App Modules" 
        direction TB
        BAPP["BrowserApp"]:::app
        CAL["CalendarApp"]:::app
        CLOUD["CloudApp"]:::app
        FILES["FilesApp"]:::app
        GAME["GameApp"]:::app
        MAIL["MailApp"]:::app
        MSG["MessagesApp"]:::app
        SETT["SettingsApp"]:::app
        TERM["TerminalApp"]:::app
    end
    DESKTOP -->|"launch app icon"| BAPP
    DESKTOP -->|"launch app icon"| CAL
    DESKTOP -->|"launch app icon"| CLOUD
    DESKTOP -->|"launch app icon"| FILES
    DESKTOP -->|"launch app icon"| GAME
    DESKTOP -->|"launch app icon"| MAIL
    DESKTOP -->|"launch app icon"| MSG
    DESKTOP -->|"launch app icon"| SETT
    DESKTOP -->|"launch app icon"| TERM

    subgraph "UI Library & Styles" 
        direction TB
        UI["src/components/ui/"]:::lib
        STYLES["index.css"]:::framework
        TWC["tailwind.config.ts"]:::framework
        POSTCSS["postcss.config.js"]:::framework
        UI --> STYLES
        STYLES --> TWC
        STYLES --> POSTCSS
    end
    ROOT -->|"renders UI with"| UI

    subgraph "Utilities & Hooks" 
        direction TB
        UMOBILE["use-mobile.tsx"]:::util
        UTOAST["use-toast.ts"]:::util
        ULIB["lib/utils.ts"]:::util
        AUTIL["utils/appUtils.ts"]:::util
    end
    ROOT -->|"calls hooks/utilities"| UMOBILE
    ROOT -->|"calls hooks/utilities"| UTOAST
    ROOT -->|"calls hooks/utilities"| ULIB
    ROOT -->|"calls hooks/utilities"| AUTIL

    %% Build & Config Files
    subgraph "Build & Config" 
        direction TB
        TSCONF["tsconfig.json"]:::framework
        TSCONFAPP["tsconfig.app.json"]:::framework
        TSCONFNODE["tsconfig.node.json"]:::framework
        ESLINT["eslint.config.js"]:::framework
        VITECONF["vite.config.ts"]:::framework
    end
    VITECONF --> VITE
    TSCONF --> ENTRY
    ESLINT --> ENTRY

    %% Click Events
    click VITECONF "https://github.com/niraj1742/futurise-desktop/blob/main/vite.config.ts"
    click CDN "https://github.com/niraj1742/futurise-desktop/tree/main/public/"
    click ENTRY "https://github.com/niraj1742/futurise-desktop/blob/main/src/main.tsx"
    click ROOT "https://github.com/niraj1742/futurise-desktop/blob/main/src/App.tsx"
    click INDEX "https://github.com/niraj1742/futurise-desktop/blob/main/src/pages/Index.tsx"
    click NOTFOUND "https://github.com/niraj1742/futurise-desktop/blob/main/src/pages/NotFound.tsx"
    click DESKTOP "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/Desktop.tsx"
    click DESKTOPBG "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/DesktopBackground.tsx"
    click TASKBAR "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/Taskbar.tsx"
    click WIDGET "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/Widget.tsx"
    click WINMAN "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/desktop/WindowManager.tsx"
    click WINDOW "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/Window.tsx"
    click DWIDGETS "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/desktop/DesktopWidgets.tsx"
    click CLOCK "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/desktop/ClockWidget.tsx"
    click SBTN "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/desktop/SearchButton.tsx"
    click SMODAL "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/desktop/SearchModal.tsx"
    click APGRID "https://github.com/niraj1742/futurise-desktop/blob/main/src/components/desktop/AppGrid.tsx"
    click UI "https://github.com/niraj1742/futurise-desktop/tree/main/src/components/ui/"
    click UMOBILE "https://github.com/niraj1742/futurise-desktop/blob/main/src/hooks/use-mobile.tsx"
    click UTOAST "https://github.com/niraj1742/futurise-desktop/blob/main/src/hooks/use-toast.ts"
    click ULIB "https://github.com/niraj1742/futurise-desktop/blob/main/src/lib/utils.ts"
    click AUTIL "https://github.com/niraj1742/futurise-desktop/blob/main/src/utils/appUtils.ts"

    %% Styles
    classDef infra fill:#f0f0f0,stroke:#888,stroke-width:1px
    classDef framework fill:#cce5ff,stroke:#004085,stroke-width:1px
    classDef app fill:#d4edda,stroke:#155724,stroke-width:1px
    classDef lib fill:#e2e3e5,stroke:#6c757d,stroke-width:1px
    classDef util fill:#fff3cd,stroke:#856404,stroke-width:1px
```
