# jimhuertas123/task-manager-challenge-app architecture

> Architecture diagram of the GitHub repository jimhuertas123/task-manager-challenge-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jimhuertas123/task-manager-challenge-app
- Repository: https://github.com/jimhuertas123/task-manager-challenge-app

## Overview

##### Project type and purpose
- This is a single-page application (SPA) “Task Manager App” built with React, TypeScript, Vite, and Apollo Client for GraphQL.
- Purpose: Provide a dashboard UI for users to create, view, update, and delete tasks organized by status (Backlog, Todo, In Progress, Done, Cancelled).

##### File structure
- Top-level build & config:
- vite.config.ts, package.json, tsconfig.json (build tooling)
- codegen.ts and src/__generated__ (GraphQL Code Generator)
- .github/workflows/*.yml (CI/CD pipelines)
- .husky and lint configs (pre-commit hooks, linting)
- src/
- pages/ – Route-level pages (DashboardPage, MyTasksPage, ErrorPage, NotFoundPage)
- components/
– layout/ (MainLayout, NavBar, PhoneNavBar, NavLinkCard)
– features/ (FormNewTask, ModalTask, SearchTasks, TaskCards)
– ui/ (generic UI primitives: GridCards, ListCards, Popover, etc.)
- graphql/ (fragments, queries, mutations)
- lib/ (apolloClient setup, constants, router)
- contexts/ (UsersContext, EditTaskModalContext, custom hooks)
- hooks/ (useMediaQuery)
- main.tsx & index.html (app entry point)

##### README for additional insights
- Feature-driven development: structure groups related features under src/components/features.
- CI/CD via GitHub Actions and Vercel for preview/production.
- Tech stack: React, TypeScript, Vite, React Router DOM, Apollo Client, GraphQL Code Generator, linting/formatting/husky.

##### Final recommendations
- Be detailed: break the SPA into individual modules (pages, features, UI, contexts, lib).
- Data flow: from user event, through React components, through Apollo to the API and back.
- Lifecycle: local dev (Vite) → codegen → build → deploy → runtime.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External entities
    User["User"]:::external
    Browser["Browser"]:::external

    %% Client SPA
    subgraph "Client SPA" 
        direction TB

        subgraph "Entry & Setup"
            direction TB
            IndexHTML["index.html"]:::presentation
            MainTSX["src/main.tsx"]:::presentation
            AppRoot["src/TodoManagerApp.tsx"]:::presentation
        end

        subgraph "Routing (Pages)"
            direction TB
            Dashboard["DashboardPage.tsx"]:::presentation
            MyTasks["MyTasksPage.tsx"]:::presentation
            ErrorPage["ErrorPage.tsx"]:::presentation
            NotFound["NotFoundPage.tsx"]:::presentation
        end

        subgraph "Layout Components"
            direction TB
            MainLayout["MainLayout.tsx"]:::presentation
            NavBar["NavBar.tsx"]:::presentation
            PhoneNavBar["PhoneNavBar.tsx"]:::presentation
            NavLinkCard["NavLinkCard.tsx"]:::presentation
        end

        subgraph "Feature Modules"
            direction TB
            FormNewTask["FormNewTask.tsx"]:::presentation
            ModalTask["ModalTask.tsx"]:::presentation
            MobileModal["MobileModalTask.tsx"]:::presentation
            SearchTasks["SearchTasks.tsx"]:::presentation
            GridCard["GridCard.tsx"]:::presentation
            ListCard["ListCard.tsx"]:::presentation
        end

        subgraph "UI Primitives"
            direction TB
            GridCardsUI["GrigCards.tsx"]:::presentation
            ListCardsUI["ListCards.tsx"]:::presentation
            ListTaskCard["ListTaskCard.tsx"]:::presentation
            PopoverUI["Popover.tsx"]:::presentation
            NavigationForm["NavigationForm.tsx"]:::presentation
            UICardComponents["UICardComponents"]:::presentation
            ViewModeSwitch["ViewModeSwitch.tsx"]:::presentation
        end

        subgraph "Contexts & Hooks"
            direction TB
            UsersContext["UsersContext.tsx"]:::data
            EditTaskModal["EditTaskModalContext.tsx"]:::data
            UseUsers["useUsers.ts"]:::data
            UseEditModal["useEditTaskModal.ts"]:::data
            UseMediaQuery["useMediaQuery.ts"]:::data
        end

        subgraph "Data Layer"
            direction TB
            ApolloClient["apolloClient.ts"]:::data
            Constants["constants.ts"]:::data
            RouterLib["router.tsx"]:::data
            Fragments["GraphQL Fragments"]:::data
            Queries["GraphQL Queries"]:::data
            Mutations["GraphQL Mutations"]:::data
            GeneratedTypes["__generated__"]:::data
        end

        subgraph "Assets & Styles"
            direction TB
            GlobalStyles["index.css"]:::presentation
            Assets["assets/icons"]:::presentation
        end
    end

    %% External services
    API["GraphQL API"]:::external
    DB["Database"]:::external

    %% CI/CD Pipeline
    subgraph "CI/CD & Tooling"
        direction TB
        Codegen["codegen.ts & __generated__"]:::ci
        GitHubActions[".github/workflows"]:::ci
        Vercel["Vercel"]:::ci
    end

    %% Connections
    User --> Browser
    Browser --> IndexHTML
    IndexHTML --> MainTSX --> AppRoot
    AppRoot --> Dashboard
    AppRoot --> MyTasks
    AppRoot --> ErrorPage
    AppRoot --> NotFound
    Dashboard --> MainLayout
    MyTasks --> MainLayout
    MainLayout --> NavBar --> PhoneNavBar --> NavLinkCard
    Dashboard --> FormNewTask --> TaskFields["TaskFields"] 
    Dashboard --> ModalTask --> MobileModal
    Dashboard --> SearchTasks
    Dashboard --> GridCard --> ListCard
    GridCard --> GridCardsUI
    ListCard --> ListCardsUI --> ListTaskCard
    FormNewTask --> PopoverUI
    FormNewTask --> NavigationForm
    GridCardsUI --> UICardComponents
    ListTaskCard --> UICardComponents
    Dashboard --> ViewModeSwitch
    AppRoot --> UsersContext --> UseUsers
    AppRoot --> EditTaskModal --> UseEditModal
    AppRoot --> UseMediaQuery
    AppRoot --> ApolloClient --> Fragments --> Queries --> Mutations --> GeneratedTypes
    ApolloClient --> API --> DB
    GitHubActions --> Codegen --> GeneratedTypes
    GitHubActions --> Vercel
    Vercel --> Browser

    %% Click Events
    click IndexHTML "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/index.html"
    click MainTSX "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/main.tsx"
    click AppRoot "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/TodoManagerApp.tsx"
    click Dashboard "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/pages/DashboardPage.tsx"
    click MyTasks "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/pages/MyTasksPage.tsx"
    click ErrorPage "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/pages/ErrorPage.tsx"
    click NotFound "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/pages/NotFoundPage.tsx"
    click MainLayout "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/layout/MainLayout/MainLayout.tsx"
    click NavBar "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/layout/NavBar.tsx"
    click PhoneNavBar "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/layout/PhoneNavBar.tsx"
    click NavLinkCard "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/layout/NavLinkCard.tsx"
    click FormNewTask "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/features/FormNewTask/FormNewTask.tsx"
    click ModalTask "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/features/ModalTask/ModalTask.tsx"
    click MobileModal "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/features/ModalTask/MobileModalTask.tsx"
    click SearchTasks "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/features/SearchTasks/SearchTasks.tsx"
    click GridCard "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/features/TaskCards/GridCard.tsx"
    click ListCard "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/features/TaskCards/ListCard.tsx"
    click GridCardsUI "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/ui/GridCards/GrigCards.tsx"
    click ListCardsUI "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/ui/ListCards/ListCards.tsx"
    click ListTaskCard "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/ui/ListCards/ListTaskCard.tsx"
    click PopoverUI "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/ui/Popover/Popover.tsx"
    click NavigationForm "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/ui/NavigationForm/NavigationForm.tsx"
    click UICardComponents "https://github.com/jimhuertas123/task-manager-challenge-app/tree/main/src/components/ui/UICardComponents"
    click ViewModeSwitch "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/components/ui/ViewModeSwitch.tsx"
    click UsersContext "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/contexts/UsersContext.tsx"
    click UseUsers "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/contexts/useUsers.ts"
    click EditTaskModal "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/contexts/EditTaskModalContext.tsx"
    click UseEditModal "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/contexts/useEditTaskModal.ts"
    click UseMediaQuery "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/hooks/useMediaQuery.ts"
    click ApolloClient "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/lib/apolloClient.ts"
    click Constants "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/lib/constants.ts"
    click RouterLib "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/src/lib/router.tsx"
    click Fragments "https://github.com/jimhuertas123/task-manager-challenge-app/tree/main/src/graphql/fragments"
    click Queries "https://github.com/jimhuertas123/task-manager-challenge-app/tree/main/src/graphql/queries"
    click Mutations "https://github.com/jimhuertas123/task-manager-challenge-app/tree/main/src/graphql/mutations"
    click GeneratedTypes "https://github.com/jimhuertas123/task-manager-challenge-app/tree/main/src/__generated__"
    click Codegen "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/codegen.ts"
    click GitHubActions "https://github.com/jimhuertas123/task-manager-challenge-app/tree/main/.github/workflows"
    click Vercel "https://github.com/jimhuertas123/task-manager-challenge-app/blob/main/vercel.json"

    %% Styles
    classDef presentation fill:#D6EAF8,stroke:#21618C,color:#1B4F72
    classDef data fill:#D5F5E3,stroke:#27AE60,color:#1E8449
    classDef ci fill:#FADBD8,stroke:#C0392B,color:#922B21
    classDef external fill:#F2F4F4,stroke:#CACFD2,color:#515A5A
```
