# devwithjay/boardify architecture

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

- Interactive diagram: https://gitdiagram.com/devwithjay/boardify
- Repository: https://github.com/devwithjay/boardify

## Overview

##### Main Components
- User Interface (Presentation Layer):
- index.html: The main HTML entry point that serves as the container for the application.
- css/style.css (or Tailwind CSS integration): Handles styling and responsive design.
- assets folder: Contains images and other static resources (e.g., the tech-stack image, board screenshots, etc.).

- JavaScript Functionality (Application/Business Logic Layer):
- js/script.js and js/broadify.js: Main entry and integration scripts for initializing and controlling application flow.
- js/modules folder: Contains distinct modules each handling different functionalities:
▸ board-manager.js: Organizes the overall board structure.
▸ task-manager.js: Manages creating, editing, and deleting tasks.
▸ drag-drop-manager.js: Provides functionality for drag-and-drop task reordering.
▸ search-manager.js: Handles task searching and filtering.
▸ theme-manager.js: Controls dark/light theme switching.
▸ ui-manager.js: Manages the dynamic update of the user interface.
▸ constants.js: Provides shared constants across modules.

- Project Configuration and Build Tools:
- package.json, vite.config.js, and related configuration files (e.g., .prettierrc, .editorconfig): Define project dependencies, code style, and bundler settings.
- pnpm-lock.yaml: Indicates the use of pnpm for package management.

- Deployment:
- Public folder (if applicable) and deployment files that indicate hosting on Vercel.

##### Relationships and Interactions
- The index.html ties together the CSS and JavaScript components.
- The main JavaScript files (script.js and broadify.js) act as the glue that imports the various modules.
- Modules work together in a loosely coupled manner:
- The board-manager orchestrates board-level events and delegates specific tasks to task-manager, ui-manager, and drag-drop-manager.
- User interactions (e.g., dragging tasks, clicking to edit, toggling themes) trigger events managed by their respective modules.
- The constants.js module supplies invariant values to ensure consistency across the modules.
- All updates to the UI and business logic communicate soundly with the browser’s local storage for persistence.
- Vite config and package files define build transformations and bundling processes for development and production.

##### Architectural Patterns and Technologies
- Modular Architecture: The separation into multiple modules (UI, board, task, theme, search, drag-and-drop) promotes maintainability.
- Separation of Concerns: Distinct responsibilities are assigned to presentation (HTML/CSS), logic (JavaScript modules), and configuration (Vite, package.json).
- Local Storage Persistence: The application stores task data and user preferences locally.
- Build and Deployment: Utilizes Vite for a streamlined development workflow and Vercel for hosting.
- Tools: HTML5, Tailwind CSS, and JavaScript form the core tech stack, supported by Git for version control.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        UI_index["index.html"]:::ui
        UI_css["css/style.css"]:::ui
        UI_assets["assets/"]:::ui
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        JS_entry["js/script.js"]:::logic
        JS_broad["js/broadify.js"]:::logic
        subgraph "Modules"
            board["js/modules/board-manager.js"]:::logic
            task["js/modules/task-manager.js"]:::logic
            dnd["js/modules/drag-drop-manager.js"]:::logic
            search["js/modules/search-manager.js"]:::logic
            theme["js/modules/theme-manager.js"]:::logic
            uiManager["js/modules/ui-manager.js"]:::logic
            constants["js/modules/constants.js"]:::logic
        end
    end

    %% Configuration/Build Tools
    subgraph "Configuration/Build Tools"
        config["Build & Config"]:::config
    end

    %% Deployment
    subgraph "Deployment"
        deployment["Deployment (Vercel)"]:::deployment
        public_folder["public/"]:::deployment
    end

    %% Persistence
    subgraph "Persistence"
        localStorage["Local Storage"]:::persistence
    end

    %% Relationships
    UI_index -->|"loads"| JS_entry
    UI_index -->|"loads"| JS_broad
    
    JS_entry -->|"initiates"| board
    JS_entry -->|"initiates"| task
    JS_broad -->|"integrates"| board
    JS_broad -->|"integrates"| uiManager

    board -->|"manages"| task
    board -->|"updates"| uiManager
    board -->|"supports"| dnd
    board -->|"triggers"| search
    board -->|"toggles"| theme

    board -->|"uses"| constants
    task -->|"uses"| constants
    dnd -->|"uses"| constants
    search -->|"uses"| constants
    theme -->|"uses"| constants
    uiManager -->|"uses"| constants

    uiManager -->|"persists"| localStorage
    task -->|"persists"| localStorage

    config -->|"builds"| JS_entry
    config -->|"builds"| JS_broad
    config -->|"bundles"| board
    config -->|"bundles"| task
    config -->|"bundles"| dnd
    config -->|"bundles"| search
    config -->|"bundles"| theme
    config -->|"bundles"| uiManager
    config -->|"bundles"| constants

    JS_entry -->|"bundled_output"| deployment
    JS_broad -->|"bundled_output"| deployment
    config -->|"defines_build"| deployment
    UI_index -->|"served_by"| deployment
    public_folder -->|"contributes_to"| deployment

    %% Click Events
    click UI_index "https://github.com/devwithjay/boardify/blob/main/index.html"
    click UI_css "https://github.com/devwithjay/boardify/blob/main/css/style.css"
    click UI_assets "https://github.com/devwithjay/boardify/tree/main/assets/"
    click JS_entry "https://github.com/devwithjay/boardify/blob/main/js/script.js"
    click JS_broad "https://github.com/devwithjay/boardify/blob/main/js/broadify.js"
    click board "https://github.com/devwithjay/boardify/blob/main/js/modules/board-manager.js"
    click task "https://github.com/devwithjay/boardify/blob/main/js/modules/task-manager.js"
    click dnd "https://github.com/devwithjay/boardify/blob/main/js/modules/drag-drop-manager.js"
    click search "https://github.com/devwithjay/boardify/blob/main/js/modules/search-manager.js"
    click theme "https://github.com/devwithjay/boardify/blob/main/js/modules/theme-manager.js"
    click uiManager "https://github.com/devwithjay/boardify/blob/main/js/modules/ui-manager.js"
    click constants "https://github.com/devwithjay/boardify/blob/main/js/modules/constants.js"
    click config "https://github.com/devwithjay/boardify/blob/main/package.json"
    click public_folder "https://github.com/devwithjay/boardify/tree/main/public/"

    %% Styles
    classDef ui fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef logic fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef config fill:#FFA500,stroke:#000,stroke-width:2px;
    classDef deployment fill:#DDA0DD,stroke:#000,stroke-width:2px;
    classDef persistence fill:#FFB6C1,stroke:#000,stroke-width:2px;
```
