# katariidev/mockapi architecture

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

- Interactive diagram: https://gitdiagram.com/katariidev/mockapi
- Repository: https://github.com/katariidev/mockapi

## Overview

This is a small React/Vite user-record table application. The workflow mounts the app, loads records from a remote MockAPI endpoint, and presents a table with form-based creation, selection, and deletion. Sorting and search controls are present, but the sampled implementation does not show working search or record-update behavior; the sort handler makes a request rather than sorting the displayed data. The graph focuses on runtime behavior; there are no separate storage or domain layers evidenced.

Main entry points: [`src/components/Table.jsx`](https://github.com/katariidev/mockapi/blob/master/src/components/Table.jsx) (Record table), [`src/main.jsx`](https://github.com/katariidev/mockapi/blob/master/src/main.jsx) (React mount), [`src/App.jsx`](https://github.com/katariidev/mockapi/blob/master/src/App.jsx) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_entry["React mount<br/>[main.jsx]"]
  node_app["App shell<br/>[App.jsx]"]
  node_table["Record table<br/>[Table.jsx]"]
end

subgraph group_data["Remote records"]
  node_api["MockAPI service"]
end

node_browser(("User"))

node_browser -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_table
node_table -->|"loads records"| node_api
node_table -->|"creates records"| node_api
node_table -->|"deletes records"| node_api
node_table -->|"requests sort"| node_api

click node_entry "https://github.com/katariidev/mockapi/blob/master/src/main.jsx"
click node_app "https://github.com/katariidev/mockapi/blob/master/src/App.jsx"
click node_table "https://github.com/katariidev/mockapi/blob/master/src/components/Table.jsx"

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_entry,node_app,node_table,node_browser toneBlue
class node_api toneAmber
```

## Components

### User interface

- [React mount](https://github.com/katariidev/mockapi/blob/master/src/main.jsx): `src/main.jsx`
- [App shell](https://github.com/katariidev/mockapi/blob/master/src/App.jsx): `src/App.jsx`
- [Record table](https://github.com/katariidev/mockapi/blob/master/src/components/Table.jsx): `src/components/Table.jsx`

### Remote records

- **MockAPI service**

### Other components

- **User**

## Connections

- User → React mount: opens app
- React mount → App shell: renders (evidence: `src/main.jsx`)
- App shell → Record table: renders (evidence: `src/App.jsx`)
- Record table → MockAPI service: loads records (evidence: `src/components/Table.jsx`)
- Record table → MockAPI service: creates records (evidence: `src/components/Table.jsx`)
- Record table → MockAPI service: deletes records (evidence: `src/components/Table.jsx`)
- Record table → MockAPI service: requests sort (evidence: `src/components/Table.jsx`)
