# butaud/shared-tasks architecture

> Architecture diagram of the GitHub repository butaud/shared-tasks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/butaud/shared-tasks
- Repository: https://github.com/butaud/shared-tasks

## Overview

##### Main Application Architecture

a) Application Layer (Top Level)
- Main App.tsx component as the root
- GitHub Pages deployment workflow
- Create React App foundation

b) Core Features Layer
- Components into logical sections:
- Header (HeaderComponent)
- Main Content (MainComponent)
- Profile Management (ProfileComponent)
- Authentication (TransientAuth)
- Task Management (TaskDisplay, DraggableList)
- Sharing Features (ShareDialog)

c) State Management & Data Flow Layer
- Custom Hooks Layer:
- useJazzGroups
- useJazzList
- Models and Utils:
- models.ts
- jazz.ts utility functions

##### Specific Implementation Details

- Drag and Drop Context (DragAndDropContext)
- Editable Components (EditableText)
- UI Components:
- FlyoutMenu
- SectionComponent
- TaskDisplay

**┌─ Application Shell ─────────────┐**
- ┌─ UI Components ────────────┐  │

- Header    Main    Profile│  │

- ┘  │
- ┌─ Features ─────────────────┐ │
- Auth    Tasks    Sharing  │ │
- ┘  │
- ┌─ State & Data ────────────┐  │
- Hooks    Models    Utils │  │
- ┘  │
- ┘

##### Important Elements

- Entry point (index.tsx)
- Component hierarchy
- Data flow patterns
- Hook dependencies
- Authentication flow
- Drag and drop functionality
- Share dialog interactions

##### Technical Details to Highlight

- TypeScript integration
- CSS modules usage
- React hooks architecture
- GitHub Pages deployment
- Testing setup

Remember to emphasize:
- Component reusability patterns
- State management approach
- Authentication flow
- Task management features
- UI/UX interaction patterns

This will provide a comprehensive view of the application's architecture while maintaining clarity and usefulness for development team members.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Application Shell"
        Entry["Entry Point"]:::entry
        App["App.tsx"]:::app
        GHPages["GitHub Pages Deploy"]:::deploy
        CRA["Create React App"]:::foundation
    end

    subgraph "UI Components"
        Header["HeaderComponent"]:::ui
        Main["MainComponent"]:::ui
        Profile["ProfileComponent"]:::ui
        Section["SectionComponent"]:::ui
        Editable["EditableText"]:::ui
        Flyout["FlyoutMenu"]:::ui
    end

    subgraph "Core Features"
        Auth["TransientAuth"]:::feature
        TaskDisp["TaskDisplay"]:::feature
        DragList["DraggableList"]:::feature
        Share["ShareDialog"]:::feature
        DnDContext["DragAndDropContext"]:::feature
    end

    subgraph "State & Data"
        direction TB
        Hooks["Custom Hooks"]:::state
        Models["Models"]:::data
        Utils["Utilities"]:::data
        
        subgraph "Hook Implementation"
            JazzGroups["useJazzGroups"]:::hook
            JazzList["useJazzList"]:::hook
        end
    end

    %% Relationships
    Entry --> App
    App --> Header
    App --> Main
    App --> Profile
    App --> Auth
    
    Main --> TaskDisp
    Main --> DragList
    Main --> Share
    Main --> Section
    
    TaskDisp --> DnDContext
    DragList --> DnDContext
    
    TaskDisp --> Editable
    Profile --> Flyout
    
    Auth -.-> JazzGroups
    TaskDisp -.-> JazzList
    DragList -.-> JazzList
    
    JazzGroups --> Models
    JazzList --> Models
    Models --> Utils

    %% Click Events
    click Entry "https://github.com/butaud/shared-tasks/blob/main/src/index.tsx"
    click App "https://github.com/butaud/shared-tasks/blob/main/src/ui/App.tsx"
    click GHPages "https://github.com/butaud/shared-tasks/blob/main/.github/workflows/deploy-to-pages.yml"
    click Header "https://github.com/butaud/shared-tasks/blob/main/src/ui/HeaderComponent.tsx"
    click Main "https://github.com/butaud/shared-tasks/blob/main/src/ui/MainComponent.tsx"
    click Profile "https://github.com/butaud/shared-tasks/blob/main/src/ui/ProfileComponent.tsx"
    click Auth "https://github.com/butaud/shared-tasks/blob/main/src/ui/auth/TransientAuth.tsx"
    click TaskDisp "https://github.com/butaud/shared-tasks/blob/main/src/ui/TaskDisplay.tsx"
    click DragList "https://github.com/butaud/shared-tasks/blob/main/src/ui/DraggableList.tsx"
    click Share "https://github.com/butaud/shared-tasks/blob/main/src/ui/ShareDialog.tsx"
    click JazzGroups "https://github.com/butaud/shared-tasks/blob/main/src/ui/hooks/useJazzGroups.ts"
    click JazzList "https://github.com/butaud/shared-tasks/blob/main/src/ui/hooks/useJazzList.ts"
    click Models "https://github.com/butaud/shared-tasks/blob/main/src/models.ts"
    click Utils "https://github.com/butaud/shared-tasks/blob/main/src/util/jazz.ts"
    click DnDContext "https://github.com/butaud/shared-tasks/blob/main/src/ui/DragAndDropContext.tsx"
    click Editable "https://github.com/butaud/shared-tasks/blob/main/src/ui/EditableText.tsx"
    click Flyout "https://github.com/butaud/shared-tasks/blob/main/src/ui/FlyoutMenu.tsx"
    click Section "https://github.com/butaud/shared-tasks/blob/main/src/ui/SectionComponent.tsx"

    %% Styling
    classDef entry fill:#f9f,stroke:#333
    classDef app fill:#aaf,stroke:#333
    classDef deploy fill:#c9f,stroke:#333
    classDef foundation fill:#ffc,stroke:#333
    classDef ui fill:#9cf,stroke:#333
    classDef feature fill:#fc9,stroke:#333
    classDef state fill:#9f9,stroke:#333
    classDef data fill:#ff9,stroke:#333
    classDef hook fill:#9f9,stroke:#333
```
