# saibot57/schedule-app2 architecture

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

- Interactive diagram: https://gitdiagram.com/saibot57/schedule-app2
- Repository: https://github.com/saibot57/schedule-app2

## Overview

##### Main Components

A. Client-Side Layer
- Next.js App Router (App Directory Structure)
- React Components Structure
- UI Component Library
- Schedule Management Logic

##### Detailed Component Breakdown

a) Top Level (Next.js Application)
- App Router layer (src/app)
- Static assets (public directory)

b) Core Application Component (ScheduleApp)
- Main ScheduleApp component
- Component hierarchy:
- BoxCreationForm
- BoxList
- FilterPanel
- HeaderActions
- RestrictionsPanel
- ScheduleGrid
- SearchPanel
- Statistics

c) UI Components Library
A separate section for reusable UI components:
- Button
- Card
- Input
- Select
- Tooltip

d) Utilities and Services
- Schedule Utils
- Export Utils
- Type Definitions

##### Specific Architectural Elements to Highlight

a) Next.js App Router Architecture:
- Relationship between layout.tsx and page.tsx
- Global styling and font management

b) Component Communication:
- State management patterns
- Prop drilling or context usage

c) Schedule Grid System:
- Detail the relationship between ScheduleGrid components
- How ScheduleSlot and SlotInfo interact

##### Technical Stack Highlights

A sidebar or footer showing:
- Next.js
- React
- TypeScript
- Tailwind CSS
- Custom UI Components

Remember to indicate the client-side nature of the application and any potential API integration points that might be added in the future. This will help other developers understand both the current state and potential expansion points of the system.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph NextApp["Next.js Application"]
        AppRouter["App Router"]:::nextjs
        click AppRouter "https://github.com/Saibot57/schedule-app2/tree/main/src/app"
        Layout["Layout"]:::nextjs
        click Layout "https://github.com/Saibot57/schedule-app2/blob/main/src/app/layout.tsx"
        GlobalStyles["Global Styles"]:::styles
        click GlobalStyles "https://github.com/Saibot57/schedule-app2/blob/main/src/app/globals.css"
        TailwindConfig["Tailwind Config"]:::config
        click TailwindConfig "https://github.com/Saibot57/schedule-app2/blob/main/tailwind.config.ts"
    end

    subgraph MainComponent["Main Application Component"]
        ScheduleApp["ScheduleApp"]:::component
        click ScheduleApp "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/index.tsx"
    end

    subgraph CoreComponents["Core Schedule Components"]
        BoxCreation["BoxCreationForm"]:::component
        click BoxCreation "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/components/BoxCreationForm.tsx"
        BoxList["BoxList"]:::component
        click BoxList "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/components/BoxList.tsx"
        Filter["FilterPanel"]:::component
        click Filter "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/components/FilterPanel.tsx"
        Header["HeaderActions"]:::component
        click Header "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/components/HeaderActions.tsx"
        Restrictions["RestrictionsPanel"]:::component
        click Restrictions "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/components/RestrictionsPanel.tsx"
        Grid["ScheduleGrid"]:::component
        click Grid "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/components/ScheduleGrid/index.tsx"
        Search["SearchPanel"]:::component
        click Search "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/components/SearchPanel.tsx"
        Stats["Statistics"]:::component
        click Stats "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/components/Statistics.tsx"
    end

    subgraph UILib["UI Component Library"]
        Button["Button"]:::ui
        click Button "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ui/button/button.tsx"
        Card["Card"]:::ui
        click Card "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ui/card/card.tsx"
        Input["Input"]:::ui
        click Input "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ui/input/input.tsx"
        Select["Select"]:::ui
        click Select "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ui/select/select.tsx"
        Tooltip["Tooltip"]:::ui
        click Tooltip "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ui/tooltip/tooltip.tsx"
    end

    subgraph Utils["Utilities and Services"]
        ColorMgmt["Color Management"]:::util
        click ColorMgmt "https://github.com/Saibot57/schedule-app2/blob/main/src/colorManagement.ts"
        ScheduleUtils["Schedule Utils"]:::util
        click ScheduleUtils "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/utils/schedule.ts"
        ExportUtils["Export Utils"]:::util
        click ExportUtils "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/utils/export.ts"
        GeneralUtils["General Utils"]:::util
        click GeneralUtils "https://github.com/Saibot57/schedule-app2/blob/main/src/lib/utils.ts"
    end

    subgraph Types["Type Definitions"]
        AppTypes["App Types"]:::type
        click AppTypes "https://github.com/Saibot57/schedule-app2/blob/main/src/app/types.ts"
        ScheduleTypes["Schedule App Types"]:::type
        click ScheduleTypes "https://github.com/Saibot57/schedule-app2/blob/main/src/components/ScheduleApp/types.ts"
        GlobalTypes["Global Types"]:::type
        click GlobalTypes "https://github.com/Saibot57/schedule-app2/blob/main/src/types.ts"
    end

    AppRouter --> Layout
    Layout --> ScheduleApp
    GlobalStyles --> Layout
    TailwindConfig --> Layout

    ScheduleApp --> BoxCreation
    ScheduleApp --> BoxList
    ScheduleApp --> Filter
    ScheduleApp --> Header
    ScheduleApp --> Restrictions
    ScheduleApp --> Grid
    ScheduleApp --> Search
    ScheduleApp --> Stats

    BoxCreation --> Button
    BoxCreation --> Input
    BoxCreation --> Select
    Grid --> Tooltip
    Search --> Input
    Filter --> Card
    Stats --> Card

    ScheduleApp --> ColorMgmt
    Grid --> ScheduleUtils
    Header --> ExportUtils
    ScheduleApp --> GeneralUtils

    ScheduleApp --> ScheduleTypes
    AppRouter --> AppTypes
    ScheduleApp --> GlobalTypes

    classDef nextjs fill:#1E40AF,color:white
    classDef component fill:#059669,color:white
    classDef ui fill:#CA8A04,color:white
    classDef util fill:#6B7280,color:white
    classDef type fill:#7C3AED,color:white
    classDef styles fill:#DB2777,color:white
    classDef config fill:#475569,color:white
```
