# ahmetarapoglu/publishinglibrary_frontend architecture

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

- Interactive diagram: https://gitdiagram.com/ahmetarapoglu/publishinglibrary_frontend
- Repository: https://github.com/ahmetarapoglu/publishinglibrary_frontend

## Overview

This is a Next.js administration interface for library inventory and operations. Users manage authors and books through forms and tables, and manage branches, categories, users, orders, and invoices through additional app routes. In the demonstrated table workflow, a route configures a reusable table, which loads and submits data through the authenticated API client; order invoicing also submits from its route. The README is only the Next.js starter README, so product capabilities are inferred from the route tree and source index. Several route implementations were not sampled, so their internal connections are not asserted.

Main entry points: [`components/Antd/Table/table.tsx`](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Antd/Table/table.tsx) (Data table), [`service/fetchData.tsx`](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/service/fetchData.tsx) (API client), [`src/app/app/order/page.tsx`](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/order/page.tsx) (Order routes), [`constants/formFields.tsx`](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/constants/formFields.tsx) (Form definitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog management"]
  node_author_routes["Author routes<br/>[page.tsx]"]
  node_author_form["Author form<br/>[page.tsx]"]
  node_book_routes["Book routes<br/>[page.tsx]"]
  node_book_form["Book form<br/>[page.tsx]"]
  node_book_versions["Book versions<br/>[page.tsx]"]
end

subgraph group_operations["Operations management"]
  node_branch_routes["Branch routes<br/>[page.tsx]"]
  node_category_routes["Category routes<br/>[page.tsx]"]
  node_order_routes["Order routes<br/>[page.tsx]"]
  node_invoice_routes["Invoice routes<br/>[page.tsx]"]
  node_user_routes["User routes<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
end

subgraph group_interface["Shared interface"]
  node_table["Data table<br/>[table.tsx]"]
  node_table_actions["Table actions<br/>[action.tsx]"]
  node_add_button["Add control<br/>[addButton.tsx]"]
  node_field_widgets["Form widgets"]
  node_field_specs["Form definitions<br/>[formFields.tsx]"]
  node_component_registry["Widget registry<br/>[components.tsx]"]
  node_navigation["App navigation<br/>[menu.tsx]"]
end

subgraph group_services["State and services"]
  node_login["Login page<br/>[page.tsx]"]
  node_auth_route["Auth handler<br/>[route.ts]"]
  node_table_state["Table state"]
  node_api_client["API client<br/>[fetchData.tsx]"]
  node_endpoints["API endpoints<br/>[endPoints.tsx]"]
end

node_user(("Admin user"))
node_api_service{{"Backend API"}}

node_user -.->|"opens"| node_author_routes
node_user -.->|"opens"| node_book_routes
node_user -.->|"opens"| node_order_routes
node_author_routes -->|"configures"| node_table
node_book_routes -->|"configures"| node_table
node_branch_routes -->|"configures"| node_table
node_category_routes -->|"configures"| node_table
node_order_routes -->|"configures"| node_table
node_invoice_routes -->|"configures"| node_table
node_user_routes -->|"configures"| node_table
node_author_form -->|"loads and submits"| node_api_client
node_book_form -->|"loads and submits"| node_api_client
node_order_routes -->|"creates invoice"| node_api_client
node_table -->|"loads and submits"| node_api_client
node_table -->|"reads and updates"| node_table_state
node_table_actions -->|"updates"| node_table_state
node_add_button -->|"updates"| node_table_state
node_table -->|"renders"| node_field_widgets
node_author_form -->|"renders fields from"| node_field_specs
node_book_form -->|"renders fields from"| node_field_specs
node_order_routes -->|"renders fields from"| node_field_specs
node_field_specs -->|"uses endpoint names"| node_endpoints
node_component_registry -->|"maps widgets"| node_field_widgets
node_api_client -->|"requests"| node_api_service
node_login -.->|"authenticates through"| node_auth_route
node_auth_route -->|"references"| node_endpoints
node_navigation -->|"updates"| node_table_state

click node_author_routes "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/author/page.tsx"
click node_author_form "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/views/author/page.tsx"
click node_book_routes "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/book/page.tsx"
click node_book_form "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/views/book/page.tsx"
click node_book_versions "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/book/book-version/page.tsx"
click node_login "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/views/login/page.tsx"
click node_auth_route "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/api/auth/%5B...nextauth%5D/route.ts"
click node_branch_routes "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/branch/page.tsx"
click node_category_routes "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/category/page.tsx"
click node_order_routes "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/order/page.tsx"
click node_invoice_routes "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/invoice/page.tsx"
click node_user_routes "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/user/page.tsx"
click node_dashboard "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/dashboard/page.tsx"
click node_table "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Antd/Table/table.tsx"
click node_table_actions "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Antd/Table/action.tsx"
click node_add_button "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Antd/Table/addButton.tsx"
click node_field_widgets "https://github.com/ahmetarapoglu/publishinglibrary_frontend/tree/master/components/Antd"
click node_field_specs "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/constants/formFields.tsx"
click node_component_registry "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/constants/components.tsx"
click node_navigation "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Layout/Sider/menu.tsx"
click node_table_state "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/store/slice/tableStateSlice.tsx"
click node_api_client "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/service/fetchData.tsx"
click node_endpoints "https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/service/endPoints.tsx"

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_author_routes,node_author_form,node_book_routes,node_book_form,node_book_versions,node_user toneBlue
class node_branch_routes,node_category_routes,node_order_routes,node_invoice_routes,node_user_routes,node_dashboard toneAmber
class node_table,node_table_actions,node_add_button,node_field_widgets,node_field_specs,node_component_registry,node_navigation,node_api_service toneMint
class node_login,node_auth_route,node_table_state,node_api_client,node_endpoints toneRose
```

## Components

### Catalog management

- [Author routes](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/author/page.tsx): `src/app/app/author/page.tsx`
- [Author form](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/views/author/page.tsx): `components/views/author/page.tsx`
- [Book routes](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/book/page.tsx): `src/app/app/book/page.tsx`
- [Book form](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/views/book/page.tsx): `components/views/book/page.tsx`
- [Book versions](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/book/book-version/page.tsx): `src/app/app/book/book-version/page.tsx`

### Operations management

- [Branch routes](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/branch/page.tsx): `src/app/app/branch/page.tsx`
- [Category routes](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/category/page.tsx): `src/app/app/category/page.tsx`
- [Order routes](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/order/page.tsx): `src/app/app/order/page.tsx`
- [Invoice routes](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/invoice/page.tsx): `src/app/app/invoice/page.tsx`
- [User routes](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/user/page.tsx): `src/app/app/user/page.tsx`
- [Dashboard](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/app/dashboard/page.tsx): `src/app/app/dashboard/page.tsx`

### Shared interface

- [Data table](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Antd/Table/table.tsx): `components/Antd/Table/table.tsx`
- [Table actions](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Antd/Table/action.tsx): `components/Antd/Table/action.tsx`
- [Add control](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Antd/Table/addButton.tsx): `components/Antd/Table/addButton.tsx`
- [Form widgets](https://github.com/ahmetarapoglu/publishinglibrary_frontend/tree/master/components/Antd): `components/Antd`
- [Form definitions](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/constants/formFields.tsx): `constants/formFields.tsx`
- [Widget registry](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/constants/components.tsx): `constants/components.tsx`
- [App navigation](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/Layout/Sider/menu.tsx): `components/Layout/Sider/menu.tsx`

### State and services

- [Login page](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/components/views/login/page.tsx): `components/views/login/page.tsx`
- [Auth handler](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/src/app/api/auth/%5B...nextauth%5D/route.ts): `src/app/api/auth/[...nextauth]/route.ts`
- [Table state](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/store/slice/tableStateSlice.tsx): `store/slice/tableStateSlice.tsx`
- [API client](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/service/fetchData.tsx): `service/fetchData.tsx`
- [API endpoints](https://github.com/ahmetarapoglu/publishinglibrary_frontend/blob/master/service/endPoints.tsx): `service/endPoints.tsx`

### Other components

- **Admin user**
- **Backend API**

## Connections

- Admin user → Author routes: opens
- Admin user → Book routes: opens
- Admin user → Order routes: opens
- Author routes → Data table: configures (evidence: `src/app/app/author/page.tsx`)
- Book routes → Data table: configures (evidence: `src/app/app/book/page.tsx`)
- Branch routes → Data table: configures (evidence: `src/app/app/branch/page.tsx`)
- Category routes → Data table: configures (evidence: `src/app/app/category/page.tsx`)
- Order routes → Data table: configures (evidence: `src/app/app/order/page.tsx`)
- Invoice routes → Data table: configures (evidence: `src/app/app/invoice/page.tsx`)
- User routes → Data table: configures (evidence: `src/app/app/user/page.tsx`)
- Author form → API client: loads and submits (evidence: `components/views/author/page.tsx`)
- Book form → API client: loads and submits (evidence: `components/views/book/page.tsx`)
- Order routes → API client: creates invoice (evidence: `src/app/app/order/page.tsx`)
- Data table → API client: loads and submits (evidence: `components/Antd/Table/table.tsx`)
- Data table → Table state: reads and updates (evidence: `components/Antd/Table/table.tsx`)
- Table actions → Table state: updates (evidence: `components/Antd/Table/action.tsx`)
- Add control → Table state: updates (evidence: `components/Antd/Table/addButton.tsx`)
- Data table → Form widgets: renders (evidence: `components/Antd/Table/table.tsx`)
- Author form → Form definitions: renders fields from (evidence: `components/views/author/page.tsx`)
- Book form → Form definitions: renders fields from (evidence: `components/views/book/page.tsx`)
- Order routes → Form definitions: renders fields from (evidence: `src/app/app/order/page.tsx`)
- Form definitions → API endpoints: uses endpoint names (evidence: `constants/formFields.tsx`)
- Widget registry → Form widgets: maps widgets (evidence: `constants/components.tsx`)
- API client → Backend API: requests (evidence: `service/fetchData.tsx`)
- Login page → Auth handler: authenticates through
- Auth handler → API endpoints: references (evidence: `src/app/api/auth/[...nextauth]/route.ts`)
- App navigation → Table state: updates (evidence: `components/Layout/Sider/menu.tsx`)
