# legitem2023/umbra_exam architecture

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

- Interactive diagram: https://gitdiagram.com/legitem2023/umbra_exam
- Repository: https://github.com/legitem2023/umbra_exam

## Overview

##### Project Type and Purpose
- **Project Type**: Full-stack web application.
- **Purpose**: A task management tool that enables users to create, edit, delete, and manage tasks with features like notifications, responsive design, and drag-and-drop functionality.

**Key Indicators:**
- **Framework**: Utilizes Next.js for server-side rendering and routing.
- **State Management**: Implements Redux for managing application state.
- **Styling**: Uses Tailwind CSS for consistent and responsive design.
- **Additional Libraries**: Integrates `react-beautiful-dnd` for drag-and-drop interactions and Iconify for iconography.

##### File Structure
- **Top-Level Files and Directories**:
- **Configuration Files**: `.gitignore`, `next.config.ts`, `eslint.config.mjs`, `postcss.config.mjs`, `tailwind.config.ts`, `tsconfig.json`, `package.json`, `package-lock.json`.
- **Public Assets**: `public/` directory for static assets.
- **Source Code**: `src/` directory containing the main application logic.

- **Inside `src/app/`**:
- **Redux**:
- `Redux/store.ts`: Configures the Redux store.
- `Redux/tagSlice.ts` & `Redux/taskSlice.ts`: Define Redux slices for tags and tasks.
- **Types**:
- `Types/types.ts`: Defines TypeScript types and interfaces.
- **Utilities**:
- `Utils/Script.ts`: Contains utility functions.
- **Components**:
- **Core Components**: `Board.tsx`, `Column.tsx`, `Task.tsx`, `EditTaskModal.tsx`.
- **Partial Components**: `components/Partial/Nav.tsx` for navigation.
- **Redux Provider**: `components/ReduxProvider/ReduxProvider.tsx` to connect Redux with React.
- **Stages**: `components/Stages/Done.tsx`, `Progress.tsx`, `Todo.tsx` representing task statuses.
- **UI Components**: `Loading.tsx`, `ReusableDropdown.tsx`, `ThreeDotMenu.tsx` for shared UI elements.
- **Global Styles and Layout**:
- `globals.css`: Global CSS styles.
- `layout.tsx` & `page.tsx`: Define the overall layout and main page content.

**Architectural Patterns Identified**:
- **Component-Based Architecture**: Modular and reusable React components.
- **State Management with Redux**: Centralized state handling for scalability.
- **Separation of Concerns**: Distinct directories for components, Redux logic, types, and utilities.

##### README for Additional Insights
- **Project Initialization**: Bootstrapped with `create-next-app`.
- **State Persistence**: Uses `localStorage` for temporary data persistence without a backend.
- **Responsive Design**: Tailwind CSS ensures the application is adaptable to mobile, tablet, and desktop views.
- **Task Management Features**:
- Notification system differentiating tasks based on deadlines.
- Editing and deletion capabilities via a three-dot menu.
- Drag-and-drop functionality for updating task statuses.

##### a. Main Components
- **Frontend Layers**:
- **Presentation Layer**: React components (`Board`, `Column`, `Task`, etc.).
- **State Management Layer**: Redux store (`store.ts`, `tagSlice.ts`, `taskSlice.ts`).
- **Styling Layer**: Tailwind CSS and global styles.
- **Utilities and Helpers**:
- Utility scripts (`Script.ts`).
- **External Services and Libraries**:
- `react-beautiful-dnd` for drag-and-drop.

##### b. Relationships and Interactions
- **Component Interactions**: Components like `Board` contain `Column` components, which in turn contain `Task` components.
- **State Flow**: Components dispatch actions to the Redux store to update state, which is then propagated back to components through selectors.
- **Styling Integration**: Tailwind CSS classes applied directly within component JSX.
- **Utility Functions**: Utilized by components for data manipulation or other helper tasks.
- **External Libraries**: Integrated within components to enhance functionality (e.g., drag-and-drop within `Board` and `Column`).

##### c. Architectural Patterns or Design Principles
- **Modularity**: Each component and Redux slice is self-contained for ease of maintenance.
- **Scalability**: Centralized state management allows the application to scale smoothly as features are added.
- **Reusability**: Shared UI components promote DRY (Don't Repeat Yourself) principles.
- **Separation of Concerns**: Clear distinction between UI, state management, and utilities.

##### d. Relevant Technologies, Frameworks, Libraries
- **Framework**: Next.js for React-based server-side rendering.
- **State Management**: Redux for managing application state.
- **Styling**: Tailwind CSS for utility-first styling.

##### Elements

- **Clear Labels for Each Component**:
- **Frontend Components**: `Board`, `Column`, `Task`, `EditTaskModal`, etc.
- **State Management**: `Redux Store`, `taskSlice`, `tagSlice`.
- **Utilities**: `Script.ts`.
- **External Libraries**: `react-beautiful-dnd`, Iconify.

- Dependencies between components (e.g., `Board` contains `Column`).

##### Emphasizing Detail and Essential Architectural Elements
- **Component Hierarchy**: Clearly show parent-child relationships among components.
- **State Flow**: Detail how state changes propagate through the Redux store and affect UI components.
- **Styling and Utility Integration**: Illustrate how Tailwind CSS classes are applied and how utility scripts support component functionality.
- **External Libraries Integration**: Show how external libraries are embedded within specific components to extend functionality.

**Summary:**

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Nodes
    Next["Next.js Framework"]:::framework
    subgraph State_Management
        Store["Redux Store"]:::state
        TagSlice["Tag Slice"]:::state
        TaskSlice["Task Slice"]:::state
    end
    subgraph Frontend_Components
        Board["Board Component"]:::frontend
        Column["Column Component"]:::frontend
        Task["Task Component"]:::frontend
        EditTaskModal["Edit Task Modal"]:::frontend
        Nav["Navigation Component"]:::frontend
        ReduxProvider["Redux Provider"]:::frontend
        Done["Done Stage Component"]:::frontend
        Progress["Progress Stage Component"]:::frontend
        Todo["Todo Stage Component"]:::frontend
        Loading["Loading UI Component"]:::frontend
        ReusableDropdown["Reusable Dropdown UI Component"]:::frontend
        ThreeDotMenu["Three Dot Menu UI Component"]:::frontend
        Layout["Layout Definition"]:::frontend
        Page["Main Page Content"]:::frontend
    end
    subgraph Styling
        Tailwind["Tailwind CSS Configuration"]:::styling
        Globals["Global Styles"]:::styling
    end
    subgraph Utilities
        Script["Utility Scripts"]:::utility
    end
    subgraph External_Libraries
        DnD["react-beautiful-dnd"]:::external
        Iconify["Iconify"]:::external
    end
    %% Connections
    Next --> Frontend_Components
    Frontend_Components --> Store
    Store --> TagSlice
    Store --> TaskSlice
    Frontend_Components --> Styling
    Frontend_Components --> Script
    Frontend_Components --> DnD
    Frontend_Components --> Iconify
    Board --> Column
    Column --> Task
    Nav --> Page
    ReduxProvider --> Store
    Done --> Task
    Progress --> Task
    Todo --> Task
    Loading --> Task
    ReusableDropdown --> Task
    ThreeDotMenu --> Task
    EditTaskModal --> Task
    Layout --> Page
    Page --> Board
    %% Click Events
    click Next "https://github.com/legitem2023/umbra_exam/blob/main/next.config.ts"
    click Store "https://github.com/legitem2023/umbra_exam/blob/main/src/app/Redux/store.ts"
    click TagSlice "https://github.com/legitem2023/umbra_exam/blob/main/src/app/Redux/tagSlice.ts"
    click TaskSlice "https://github.com/legitem2023/umbra_exam/blob/main/src/app/Redux/taskSlice.ts"
    click Script "https://github.com/legitem2023/umbra_exam/blob/main/src/app/Utils/Script.ts"
    click Board "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/Board.tsx"
    click Column "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/Column.tsx"
    click Task "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/Task.tsx"
    click EditTaskModal "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/EditTaskModal.tsx"
    click Nav "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/Partial/Nav.tsx"
    click ReduxProvider "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/ReduxProvider/ReduxProvider.tsx"
    click Done "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/Stages/Done.tsx"
    click Progress "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/Stages/Progress.tsx"
    click Todo "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/Stages/Todo.tsx"
    click Loading "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/UI/Loading.tsx"
    click ReusableDropdown "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/UI/ReusableDropdown.tsx"
    click ThreeDotMenu "https://github.com/legitem2023/umbra_exam/blob/main/src/app/components/UI/ThreeDotMenu.tsx"
    click Tailwind "https://github.com/legitem2023/umbra_exam/blob/main/tailwind.config.ts"
    click Globals "https://github.com/legitem2023/umbra_exam/blob/main/src/app/globals.css"
    click Layout "https://github.com/legitem2023/umbra_exam/blob/main/src/app/layout.tsx"
    click Page "https://github.com/legitem2023/umbra_exam/blob/main/src/app/page.tsx"
    %% Styles
    classDef framework fill:#ffeb3b,stroke:#333,stroke-width:1px;
    classDef state fill:#4caf50,stroke:#333,stroke-width:1px;
    classDef frontend fill:#2196f3,stroke:#333,stroke-width:1px;
    classDef styling fill:#ff9800,stroke:#333,stroke-width:1px;
    classDef utility fill:#ffeb3b,stroke:#333,stroke-width:1px;
    classDef external fill:#9c27b0,stroke:#333,stroke-width:1px;
```
