# robbiebyrd/classicy architecture

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

- Interactive diagram: https://gitdiagram.com/robbiebyrd/classicy
- Repository: https://github.com/robbiebyrd/classicy

## Overview

##### Project type and purpose
- This is a React-based UI framework and demo application (“Classicy”) built on Next.js.
- It provides a library of Mac OS 8–style components (Desktop, Finder, Windows, Buttons, Menus, etc.), plus a reference Next.js app to demo them.

##### File structure
- Top-level:
– package.json, next.config.js, tsconfig.json → Next.js + TypeScript configuration
– .github/workflows/nextjs.yml → CI/CD pipeline (build & deploy)
– bin/make_audio_sprites.sh → build script for generating audio sprites
– jest.config.ts, src/tests → unit test setup with Jest
- public & resources → static assets (images, sounds, fonts, theme JSON, exports)
- src/app → Next.js “app” directory containing both:
– /Applications → example apps (Browser, EPG, News, TV, etc.)
– /SystemFolder → core framework components (Desktop, ControlPanels, Finder, QuickTime, SystemResources subcomponents)
- src/globals.module.scss, component .module.scss files → theming and styling via CSS Modules / SASS

##### Extracted insights from README
- Tech stack: Next.js, React, TypeScript, SASS, Jest, Yarn, GitHub Actions
- Architecture overview:
– `<ClassicyDesktopProvider>` supplies global system state (themes, sounds, active app/window)
– Individual `<ClassicyApp>` instances host `<ClassicyWindow>` children, which host UI controls
– React Contexts + event dispatchers manage theme changes, window focus, drag/resize, sound events
- Extensibility: Apps plug in via Context, static assets are consumed at runtime, themes defined in JSON

##### Essential details to capture
- The separation between build/CI, server, and client layers
- The top-level DesktopContext feeding into nested components
- The plugin relationship: Desktop → Apps → Windows → Controls
- The event-reducer loop for theme changes, window focus, sound playback
- Static asset hosting and consumption

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development & CI Layer
    subgraph "Development & CI"
        direction TB
        Dev["Developer Local Env\n(Node.js, Yarn)"]:::dev
        GitHub["GitHub Repository"]:::dev
        CI["CI/CD Pipeline\n(GitHub Actions)"]:::dev
        Test["Test Suite\n(Jest)"]:::dev
        Build["Audio Sprite Build Script"]:::dev
    end

    Dev -->|pushes code| GitHub
    GitHub -->|triggers| CI
    CI -->|runs| Test
    CI -->|runs| Build
    Build -->|"generates JSON"| Assets

    click CI "https://github.com/robbiebyrd/classicy/blob/main/.github/workflows/nextjs.yml"
    click Build "https://github.com/robbiebyrd/classicy/blob/main/bin/make_audio_sprites.sh"
    click Test "https://github.com/robbiebyrd/classicy/blob/main/jest.config.ts"
    click Test "https://github.com/robbiebyrd/classicy/tree/main/src/tests/"

    %% Hosting
    subgraph "Hosting"
        direction TB
        Host["Vercel / GitHub Pages"]:::server
    end
    CI -->|deploy| Host

    %% Server/Runtime Layer
    subgraph "Server/Runtime"
        direction TB
        NextServer["Next.js Server\n(SSR + Routing)"]:::server
        Configs["Next.js & TS Config"]:::server
    end
    Host --> NextServer
    NextServer -->|serves| Browser

    click Configs "https://github.com/robbiebyrd/classicy/blob/main/next.config.js"
    click Configs "https://github.com/robbiebyrd/classicy/blob/main/tsconfig.json"
    click Configs "https://github.com/robbiebyrd/classicy/blob/main/package.json"

    %% Static Assets Layer
    subgraph "Static Assets"
        direction TB
        Assets["Public & Resources\n(images, sounds, fonts, themes)"]:::asset
        Themes["Theme JSON"]:::asset
        AudioSprites["Audio Sprite JSON"]:::asset
    end
    Assets --> Themes
    Assets --> AudioSprites

    click Assets "https://github.com/robbiebyrd/classicy/tree/main/public/"
    click Assets "https://github.com/robbiebyrd/classicy/tree/main/resources/"

    %% Client UI Layer
    subgraph "Client Browser"
        direction TB
        Browser["User Browser"]:::client
        ReactRoot["React App Mount"]:::client
        Context["ClassicyDesktopContext\n(Provider)"]:::client
        Desktop["ClassicyDesktop\n(Desktop UI)"]:::client
        IconCtx["ClassicyDesktopIconContext"]:::client
        MenuBar["Menu Bar & Widgets"]:::client
        EventSys["Event & Theme Subsystem"]:::client
        AudioPlayer["Audio Player"]:::client
        Apps["ClassicyApp\n(Plugin Host)"]:::client
        Windows["ClassicyWindow\n(Window)"]:::client
        Controls["UI Controls"]:::client
    end

    Browser -->|HTTP Request| NextServer
    NextServer -->|HTML+JS| Browser
    Browser -->|hydrate| ReactRoot
    ReactRoot --> Context
    Context --> Desktop
    Desktop --> IconCtx
    Desktop --> MenuBar
    Desktop --> Apps
    Apps --> Windows
    Windows --> Controls
    Controls -->|user events| EventSys
    EventSys --> Context
    EventSys --> AudioPlayer
    AudioSprites --> AudioPlayer
    Themes --> Context

    click Context "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/ClassicyDesktopManager.tsx"
    click Context "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/ClassicyDesktopWindowManagerContext.tsx"
    click Desktop "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/ClassicyDesktop.tsx"
    click Desktop "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/ClassicyDesktop.module.scss"
    click IconCtx "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/ClassicyDesktopIconContext.tsx"
    click IconCtx "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/ClassicyDesktopIcon.module.scss"
    click MenuBar "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/MenuBar/ClassicyDesktopMenuBar.tsx"
    click MenuBar "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/MenuBar/ClassicyDesktopMenuBar.module.scss"
    click MenuBar "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/MenuBar/Widgets/Time/ClassicyDesktopMenuWidgetTime.tsx"
    click MenuBar "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Desktop/MenuBar/Widgets/Sound/ClassicyDesktopMenuWidgetSound.tsx"
    click Apps "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/App/ClassicyApp.tsx"
    click Apps "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/App/ClassicyAppUtils.tsx"
    click Windows "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Window/ClassicyWindow.tsx"
    click Windows "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Window/ClassicyWindowContext.ts"
    click Windows "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Window/ClassicyWindow.module.scss"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Button/ClassicyButton.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Checkbox/ClassicyCheckbox.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Menu/ClassicyMenu.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/PopUpMenu/ClassicyPopUpMenu.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/ProgressBar/ClassicyProgressBar.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/ContextualMenu/ClassicyContextualMenu.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Input/ClassicyInput.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/RadioInput/ClassicyRadioInput.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/ControlGroup/ClassicyControlGroup.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/ControlLabel/ClassicyControlLabel.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Tabs/ClassicyTabs.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/TextEditor/ClassicyTextEditor.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/DatePicker/ClassicyDatePicker.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/TimePicker/ClassicyTimePicker.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Disclosure/ClassicyDisclosure.tsx"
    click Controls "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/RichTextEditor/ClassicyRichTextEditor.tsx"
    click EventSys "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/ControlPanels/AppearanceManager/ClassicyAppearanceManager.tsx"
    click EventSys "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/ControlPanels/AppearanceManager/styles/themes.json"
    click EventSys "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/ControlPanels/SoundManager/ClassicySoundManagerContext.tsx"
    click EventSys "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/SystemResources/Finder/FinderContext.tsx"
    click EventSys "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/QuickTime/MoviePlayer/MoviePlayerContext.tsx"
    click EventSys "https://github.com/robbiebyrd/classicy/blob/main/src/app/SystemFolder/QuickTime/PictureViewer/PictureViewerContext.tsx"

    %% Example Applications (Plugins)
    subgraph "Example Apps"
        direction TB
        BrowserApp["Browser"]:::client
        EPG["EPG"]:::client
        News["News"]:::client
        TV["TV"]:::client
        Text["SimpleText"]:::client
        DemoApp["Demo"]:::client
    end
    Apps --> BrowserApp
    Apps --> EPG
    Apps --> News
    Apps --> TV
    Apps --> Text
    Apps --> DemoApp

    click BrowserApp "https://github.com/robbiebyrd/classicy/blob/main/src/app/Applications/Browser/Browser.tsx"
    click EPG "https://github.com/robbiebyrd/classicy/blob/main/src/app/Applications/EPG/EPG.tsx"
    click News "https://github.com/robbiebyrd/classicy/blob/main/src/app/Applications/News/News.tsx"
    click TV "https://github.com/robbiebyrd/classicy/blob/main/src/app/Applications/TV/TV.tsx"
    click Text "https://github.com/robbiebyrd/classicy/blob/main/src/app/Applications/SimpleText/SimpleText.tsx"
    click DemoApp "https://github.com/robbiebyrd/classicy/blob/main/src/app/Applications/Demo/Demo.tsx"

    %% Styles
    subgraph "Global Styles"
        direction TB
        Globals["globals.module.scss"]:::asset
    end
    click Globals "https://github.com/robbiebyrd/classicy/blob/main/src/app/globals.module.scss"

    classDef dev fill:#e0f7e9,stroke:#27ae60,stroke-width:2px
    classDef server fill:#e8f4fc,stroke:#2980b9,stroke-width:2px
    classDef client fill:#fff3e0,stroke:#e67e22,stroke-width:2px
    classDef asset fill:#ecedef,stroke:#7f8c8d,stroke-width:2px
```
