# kerb0y/authenkixx-fullstack architecture

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

- Interactive diagram: https://gitdiagram.com/kerb0y/authenkixx-fullstack
- Repository: https://github.com/kerb0y/authenkixx-fullstack

## Overview

Authenkixx is a single-user, dummy-data inventory prototype for multichannel sellers. The owner browses products and stock history, updates stock, asks inventory questions through an AI proxy, views business and Data Science summaries, and downloads CSV for manual marketplace upload. The frontend and backend excerpts show the main call paths; unsampled details such as exact database queries and Gen AI internals are not expanded.

Main entry points: [`backend/server.js`](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js) (API routes), [`backend/src/storage.js`](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/storage.js) (Storage adapter), [`frontend/src/api.js`](https://github.com/kerb0y/authenkixx-fullstack/blob/main/frontend/src/api.js) (API client), [`frontend/src/main.js`](https://github.com/kerb0y/authenkixx-fullstack/blob/main/frontend/src/main.js) (Inventory UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web app"]
  node_ui["Inventory UI<br/>[main.js]"]
  node_client["API client<br/>[api.js]"]
  node_demo["Static demo data<br/>[demo-data.json]"]
end

subgraph group_backend["Backend API"]
  node_api["API routes<br/>[server.js]"]
  node_validation["Input validation<br/>[validation.js]"]
  node_insights["Insights endpoint<br/>[server.js]"]
  node_csv["CSV export<br/>[server.js]"]
  node_chat["AI chat proxy<br/>[server.js]"]
end

subgraph group_data["Inventory and insights"]
  node_storage["Storage adapter<br/>[storage.js]"]
  node_inventory["Inventory and movements<br/>[inventory.json]"]
  node_db[("Persistent database<br/>[storage.js]")]
  node_history["AI chat history<br/>[ai_history.json]"]
  node_dsloader["Data Science loader<br/>[ds_outputs.js]"]
  node_dsoutputs["Data Science outputs"]
end

subgraph group_integrations["External services"]
  node_genai["Gen AI service"]
  node_marketplace["Seller Centre"]
end

node_owner(("Store owner"))

node_owner -->|"uses"| node_ui
node_ui -->|"requests data"| node_client
node_client -->|"calls API"| node_api
node_client -->|"loads fallback"| node_demo
node_api -->|"validates input"| node_validation
node_api -->|"loads and saves"| node_storage
node_storage -->|"reads and writes"| node_db
node_storage -->|"seeds fallback"| node_inventory
node_storage -->|"seeds fallback"| node_history
node_api -->|"serves insights"| node_insights
node_insights -->|"loads inventory"| node_storage
node_insights -->|"loads outputs"| node_dsloader
node_dsloader -->|"reads files"| node_dsoutputs
node_api -->|"serves download"| node_csv
node_csv -->|"manual upload"| node_marketplace
node_api -->|"routes chat"| node_chat
node_chat -->|"forwards prompt"| node_genai
node_chat -->|"appends history"| node_storage

click node_ui "https://github.com/kerb0y/authenkixx-fullstack/blob/main/frontend/src/main.js"
click node_client "https://github.com/kerb0y/authenkixx-fullstack/blob/main/frontend/src/api.js"
click node_demo "https://github.com/kerb0y/authenkixx-fullstack/blob/main/frontend/public/demo-data.json"
click node_api "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js"
click node_validation "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/validation.js"
click node_storage "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/storage.js"
click node_inventory "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/data/inventory.json"
click node_db "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/storage.js"
click node_history "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/data/ai_history.json"
click node_insights "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js"
click node_dsloader "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/ds_outputs.js"
click node_dsoutputs "https://github.com/kerb0y/authenkixx-fullstack/tree/main/backend/data/ds_outputs"
click node_csv "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js"
click node_chat "https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js"

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_ui,node_client,node_demo toneBlue
class node_api,node_validation,node_insights,node_csv,node_chat toneAmber
class node_storage,node_inventory,node_db,node_history,node_dsloader,node_dsoutputs toneMint
class node_genai,node_marketplace toneRose
class node_owner toneIndigo
```

## Components

### Web app

- [Inventory UI](https://github.com/kerb0y/authenkixx-fullstack/blob/main/frontend/src/main.js): `frontend/src/main.js`
- [API client](https://github.com/kerb0y/authenkixx-fullstack/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Static demo data](https://github.com/kerb0y/authenkixx-fullstack/blob/main/frontend/public/demo-data.json): `frontend/public/demo-data.json`

### Backend API

- [API routes](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js): `backend/server.js`
- [Input validation](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/validation.js): `backend/src/validation.js`
- [Insights endpoint](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js): `backend/server.js`
- [CSV export](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js): `backend/server.js`
- [AI chat proxy](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/server.js): `backend/server.js`

### Inventory and insights

- [Storage adapter](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/storage.js): `backend/src/storage.js`
- [Inventory and movements](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/data/inventory.json): `backend/data/inventory.json`
- [Persistent database](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/storage.js): `backend/src/storage.js`
- [AI chat history](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/data/ai_history.json): `backend/data/ai_history.json`
- [Data Science loader](https://github.com/kerb0y/authenkixx-fullstack/blob/main/backend/src/ds_outputs.js): `backend/src/ds_outputs.js`
- [Data Science outputs](https://github.com/kerb0y/authenkixx-fullstack/tree/main/backend/data/ds_outputs): `backend/data/ds_outputs`

### External services

- **Gen AI service**
- **Seller Centre**

### Other components

- **Store owner**

## Connections

- Store owner → Inventory UI: uses (evidence: `README.md`)
- Inventory UI → API client: requests data (evidence: `frontend/src/main.js`)
- API client → API routes: calls API (evidence: `frontend/src/api.js`)
- API client → Static demo data: loads fallback (evidence: `frontend/src/api.js`)
- API routes → Input validation: validates input (evidence: `backend/server.js`)
- API routes → Storage adapter: loads and saves (evidence: `backend/server.js`)
- Storage adapter → Persistent database: reads and writes (evidence: `backend/src/storage.js`)
- Storage adapter → Inventory and movements: seeds fallback (evidence: `backend/src/storage.js`)
- Storage adapter → AI chat history: seeds fallback (evidence: `backend/src/storage.js`)
- API routes → Insights endpoint: serves insights (evidence: `backend/server.js`)
- Insights endpoint → Storage adapter: loads inventory (evidence: `backend/server.js`)
- Insights endpoint → Data Science loader: loads outputs (evidence: `backend/server.js`)
- Data Science loader → Data Science outputs: reads files (evidence: `backend/src/ds_outputs.js`)
- API routes → CSV export: serves download (evidence: `backend/server.js`)
- CSV export → Seller Centre: manual upload (evidence: `README.md`)
- API routes → AI chat proxy: routes chat (evidence: `backend/server.js`)
- AI chat proxy → Gen AI service: forwards prompt (evidence: `backend/server.js`)
- AI chat proxy → Storage adapter: appends history (evidence: `backend/server.js`)
