# madcamp04/flower_frontend architecture

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

- Interactive diagram: https://gitdiagram.com/madcamp04/flower_frontend
- Repository: https://github.com/madcamp04/flower_frontend

## Overview

##### Main Application Architecture Components

a) Frontend Layer (Client-Side)
- Main React application container
- Vite development server

b) State Management Layer
- Context API (AppContext.tsx) as a central state management component

c) Feature Modules
Three main modules identified from the pages directory:
- Authentication Module (Login.tsx, Register.tsx)
- Management Module (GroupSelectionPage)
- Project Management Module (GroupViewPage, ProjectViewPage)

##### Component Relationships

**[Authentication Module] → [Group Selection] → [Group View] → [Project View]**

##### Detailed Component Breakdown

For each major module, create a sub-section showing:

a) Selection Module
- AppBarComponent
- GroupListComponent
- Dialog Components (Add/Delete/Rename)

b) View Module
- Header Component
- Timeline Component
- Project Management Features
- Worker Management
- Tag Management

c) Project View Module
- Project Details
- Task Management
- Project Sidebar

##### Data Flow Patterns

Following patterns:

- Context Provider wrapper (AppContext.tsx) around all components
- State updates flowing down from context to components
- User interactions flowing up to context

##### Technical Stack Indicators

A technical stack section showing:
- React + TypeScript
- Vite Build Tool
- CSS Modules (indicated by .css files)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Technical Stack"
        TS["TypeScript + React"]
        Vite["Vite Build Tool"]:::build
        CSS["CSS Modules"]
    end

    subgraph "Frontend Layer"
        App["App Container"]:::frontend
        Main["Main Entry Point"]:::frontend
    end

    subgraph "State Management"
        Context["AppContext Provider"]:::state
    end

    subgraph "Authentication Module"
        Login["Login Page"]:::auth
        Register["Register Page"]:::auth
    end

    subgraph "Group Management"
        GSP["Group Selection Page"]:::group
        GLC["Group List Component"]:::group
        ABC["App Bar Component"]:::group

        subgraph "Group Dialogs"
            AGD["Add Group Dialog"]:::dialog
            DGD["Delete Group Dialog"]:::dialog
            RGD["Rename Group Dialog"]:::dialog
        end
    end

    subgraph "Group View Module"
        GVP["Group View Page"]:::group
        Header["Header Component"]:::ui
        Timeline["Timeline Component"]:::ui

        subgraph "Management Features"
            AWD["Add Worker Dialog"]:::dialog
            ATD["Add Tag Dialog"]:::dialog
            TS["Tags Selector"]:::ui
        end
    end

    subgraph "Project View Module"
        PVP["Project View Page"]:::project
        PD["Project Details"]:::project
        PS["Project Sidebar"]:::project
        TD["Task Details"]:::project
    end

    %% Relationships
    App --> Context
    Context --> Login
    Context --> Register
    Login --> GSP
    Register --> GSP
    GSP --> GLC
    GSP --> ABC
    GLC --> AGD
    GLC --> DGD
    GLC --> RGD
    GSP --> GVP
    GVP --> Header
    GVP --> Timeline
    GVP --> AWD
    GVP --> ATD
    GVP --> TS
    GVP --> PVP
    PVP --> PD
    PVP --> PS
    PVP --> TD

    %% Click Events
    click App "https://github.com/madcamp04/flower_frontend/blob/main/src/App.tsx"
    click Main "https://github.com/madcamp04/flower_frontend/blob/main/src/main.tsx"
    click Context "https://github.com/madcamp04/flower_frontend/blob/main/src/context/AppContext.tsx"
    click Login "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/Login.tsx"
    click Register "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/Register.tsx"
    click GSP "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupSelectionPage/GroupSelectionPage.tsx"
    click GLC "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupSelectionPage/GroupListComponent.tsx"
    click ABC "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupSelectionPage/AppBarComponent.tsx"
    click AGD "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupSelectionPage/AddGroupDialog.tsx"
    click DGD "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupSelectionPage/DeleteGroupDialog.tsx"
    click RGD "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupSelectionPage/RenameGroupDialog.tsx"
    click GVP "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupViewPage/GroupViewPage.tsx"
    click PVP "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/ProjectViewPage/ProjectViewPage.tsx"
    click Timeline "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupViewPage/TimelineComponent.tsx"
    click PD "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/ProjectViewPage/ProjectDetails.tsx"
    click PS "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/ProjectViewPage/ProjectSidebar.tsx"
    click TD "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/ProjectViewPage/TaskDetails.tsx"
    click AWD "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupViewPage/AddWorkerDialog.tsx"
    click ATD "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupViewPage/AddTagDialog.tsx"
    click TS "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupViewPage/TagsSelector.tsx"
    click Header "https://github.com/madcamp04/flower_frontend/blob/main/src/pages/GroupViewPage/Header.tsx"
    click Vite "https://github.com/madcamp04/flower_frontend/blob/main/vite.config.ts"

    %% Styling
    classDef frontend fill:#2196F3,color:white
    classDef state fill:#9C27B0,color:white
    classDef auth fill:#FF5722,color:white
    classDef group fill:#4CAF50,color:white
    classDef dialog fill:#FF9800,color:white
    classDef project fill:#607D8B,color:white
    classDef ui fill:#00BCD4,color:white
    classDef build fill:#795548,color:white

    %% Legend
    subgraph Legend
        L1["Frontend Components"]:::frontend
        L2["State Management"]:::state
        L3["Authentication"]:::auth
        L4["Group Components"]:::group
        L5["Dialog Components"]:::dialog
        L6["Project Components"]:::project
        L7["UI Components"]:::ui
        L8["Build Tools"]:::build
    end
```
