# qarbonaai/fe-task architecture

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

- Interactive diagram: https://gitdiagram.com/qarbonaai/fe-task
- Repository: https://github.com/qarbonaai/fe-task

## Overview

This repository is a Next.js frontend task scaffold for a product-table application. The visible runtime consists of an app shell, theme/navigation controls, reusable TanStack table UI, a query provider, and a generic Axios client. The README describes a desired product workflow—listing, pagination/sorting, CRUD, and detail navigation—but the supplied tree and excerpts do not show product-specific pages, forms, queries, or API calls; those capabilities are therefore not represented as implemented flows.

Main entry points: [`src/components/table/data-table.tsx`](https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table.tsx) (Data table), [`src/app/layout.tsx`](https://github.com/qarbonaai/fe-task/blob/main/src/app/layout.tsx) (Root layout), [`src/api/index.ts`](https://github.com/qarbonaai/fe-task/blob/main/src/api/index.ts) (Axios client), [`src/app/page.tsx`](https://github.com/qarbonaai/fe-task/blob/main/src/app/page.tsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_root["Root layout<br/>[layout.tsx]"]
  node_home["Home page<br/>[page.tsx]"]
  node_navbar["Navigation bar<br/>[navbar.tsx]"]
  node_theme["Theme provider<br/>[theme-provider.tsx]"]
  node_mode["Theme toggle<br/>[mode-toggle.tsx]"]
end

subgraph group_table["Table interface"]
  node_tableview["Data table<br/>[data-table.tsx]"]
  node_pagination["Table pagination"]
  node_toolbar["Table toolbar"]
  node_viewoptions["Column options"]
  node_columnheader["Column header"]
  node_rowactions["Row actions"]
end

subgraph group_shared["Shared runtime"]
  node_query["Query provider<br/>[query-provider.tsx]"]
  node_api["Axios client<br/>[index.ts]"]
  node_errors["API error handling<br/>[errors.ts]"]
  node_paginationstate["Pagination state<br/>[pagination.ts]"]
end

node_visitor(("User"))
node_productsapi["DummyJSON Products API"]

node_visitor -->|"opens"| node_home
node_root -->|"provides query context"| node_query
node_root -->|"provides theme"| node_theme
node_home -->|"renders"| node_navbar
node_navbar -->|"renders"| node_mode
node_tableview -->|"renders"| node_pagination
node_tableview -->|"renders"| node_toolbar
node_tableview -->|"uses"| node_viewoptions
node_pagination -.->|"pagination behavior"| node_paginationstate
node_api -->|"normalizes errors"| node_errors
node_api -.->|"targets API"| node_productsapi

click node_root "https://github.com/qarbonaai/fe-task/blob/main/src/app/layout.tsx"
click node_home "https://github.com/qarbonaai/fe-task/blob/main/src/app/page.tsx"
click node_navbar "https://github.com/qarbonaai/fe-task/blob/main/src/components/navbar.tsx"
click node_theme "https://github.com/qarbonaai/fe-task/blob/main/src/components/theme-provider.tsx"
click node_mode "https://github.com/qarbonaai/fe-task/blob/main/src/components/mode-toggle.tsx"
click node_tableview "https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table.tsx"
click node_pagination "https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-pagination.tsx"
click node_toolbar "https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-toolbar.tsx"
click node_viewoptions "https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-view-options.tsx"
click node_columnheader "https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-column-header.tsx"
click node_rowactions "https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-row-actions.tsx"
click node_query "https://github.com/qarbonaai/fe-task/blob/main/src/lib/query-provider.tsx"
click node_api "https://github.com/qarbonaai/fe-task/blob/main/src/api/index.ts"
click node_errors "https://github.com/qarbonaai/fe-task/blob/main/src/lib/errors.ts"
click node_paginationstate "https://github.com/qarbonaai/fe-task/blob/main/src/store/pagination.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_root,node_home,node_navbar,node_theme,node_mode,node_visitor toneBlue
class node_tableview,node_pagination,node_toolbar,node_viewoptions,node_columnheader,node_rowactions toneAmber
class node_query,node_api,node_errors,node_paginationstate,node_productsapi toneMint
```

## Components

### App shell

- [Root layout](https://github.com/qarbonaai/fe-task/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Home page](https://github.com/qarbonaai/fe-task/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Navigation bar](https://github.com/qarbonaai/fe-task/blob/main/src/components/navbar.tsx): `src/components/navbar.tsx`
- [Theme provider](https://github.com/qarbonaai/fe-task/blob/main/src/components/theme-provider.tsx): `src/components/theme-provider.tsx`
- [Theme toggle](https://github.com/qarbonaai/fe-task/blob/main/src/components/mode-toggle.tsx): `src/components/mode-toggle.tsx`

### Table interface

- [Data table](https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table.tsx): `src/components/table/data-table.tsx`
- [Table pagination](https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-pagination.tsx): `src/components/table/data-table-pagination.tsx`
- [Table toolbar](https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-toolbar.tsx): `src/components/table/data-table-toolbar.tsx`
- [Column options](https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-view-options.tsx): `src/components/table/data-table-view-options.tsx`
- [Column header](https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-column-header.tsx): `src/components/table/data-table-column-header.tsx`
- [Row actions](https://github.com/qarbonaai/fe-task/blob/main/src/components/table/data-table-row-actions.tsx): `src/components/table/data-table-row-actions.tsx`

### Shared runtime

- [Query provider](https://github.com/qarbonaai/fe-task/blob/main/src/lib/query-provider.tsx): `src/lib/query-provider.tsx`
- [Axios client](https://github.com/qarbonaai/fe-task/blob/main/src/api/index.ts): `src/api/index.ts`
- [API error handling](https://github.com/qarbonaai/fe-task/blob/main/src/lib/errors.ts): `src/lib/errors.ts`
- [Pagination state](https://github.com/qarbonaai/fe-task/blob/main/src/store/pagination.ts): `src/store/pagination.ts`

### Other components

- **User**
- **DummyJSON Products API**

## Connections

- User → Home page: opens (evidence: `src/app/page.tsx`)
- Root layout → Query provider: provides query context (evidence: `src/app/layout.tsx`)
- Root layout → Theme provider: provides theme (evidence: `src/app/layout.tsx`)
- Home page → Navigation bar: renders (evidence: `src/app/page.tsx`)
- Navigation bar → Theme toggle: renders (evidence: `src/components/navbar.tsx`)
- Data table → Table pagination: renders (evidence: `src/components/table/data-table.tsx`)
- Data table → Table toolbar: renders (evidence: `src/components/table/data-table.tsx`)
- Data table → Column options: uses
- Table pagination → Pagination state: pagination behavior
- Axios client → API error handling: normalizes errors (evidence: `src/api/index.ts`)
- Axios client → DummyJSON Products API: targets API
