# dev-mindware/mindgest-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/dev-mindware/mindgest-frontend
- Repository: https://github.com/dev-mindware/mindgest-frontend

## Overview

Mindgest is a business-management frontend for company users, covering customer and supplier records, inventory, invoicing, point-of-sale operations, subscriptions, and analytics. A typical journey is to sign in, manage business records and stock, issue documents or process a counter sale, then review operational results. The README also describes an AI assistant and contextual responses, though its implementation is not sampled. Edges reflect README capabilities or shown source calls; several product areas are documented but their data-fetching paths are not visible in the excerpts.

Main entry points: [`src/app/auth/login/page.tsx`](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/app/auth/login/page.tsx) (Sign in and register), [`src/app/api/auth/refresh/route.ts`](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/app/api/auth/refresh/route.ts) (Session refresh), [`src/components/client/pos/counter/counter-content.tsx`](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/pos/counter/counter-content.tsx) (Point of sale), [`src/components/shared/chatbot/index.tsx`](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/shared/chatbot/index.tsx) (MIND assistant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and Access"]
  node_auth["Sign in and register<br/>[page.tsx]"]
  node_session["Session refresh<br/>[route.ts]"]
end

subgraph group_operations["Business Operations"]
  node_clients["Clients and suppliers"]
  node_items["Products and services"]
  node_stock["Stock management"]
  node_categories["Item categories"]
end

subgraph group_sales["Sales and Documents"]
  node_documents["Invoices and notes<br/>[add-document.tsx]"]
  node_publicverify["Public document verification"]
  node_pos["Point of sale"]
  node_cash["Cash sessions"]
end

subgraph group_insight["Insights and Assistance"]
  node_dashboard["Business dashboard"]
  node_reports["Reports and analysis"]
  node_mind["MIND assistant<br/>[index.tsx]"]
end

subgraph group_account["Plans and Verification"]
  node_subscription["Subscriptions"]
  node_taxverify["Taxpayer verification<br/>[route.ts]"]
end

node_user(("Company user"))
node_backend{{"Mindgest API"}}
node_setic{{"SETIC fiscal service"}}

node_user -->|"signs in"| node_auth
node_auth -.->|"refreshes session"| node_session
node_session -->|"requests refresh"| node_backend
node_user -->|"manages records"| node_clients
node_user -->|"manages items"| node_items
node_user -->|"monitors stock"| node_stock
node_user -->|"organizes items"| node_categories
node_user -->|"issues documents"| node_documents
node_user -->|"processes sales"| node_pos
node_pos -.->|"manages sessions"| node_cash
node_user -->|"reviews KPIs"| node_dashboard
node_user -->|"analyzes results"| node_reports
node_user -->|"asks questions"| node_mind
node_mind -->|"queries company data"| node_backend
node_user -->|"manages plan"| node_subscription
node_user -.->|"checks taxpayer"| node_taxverify
node_taxverify -->|"looks up taxpayer"| node_setic
node_user -.->|"verifies document"| node_publicverify

click node_auth "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/app/auth/login/page.tsx"
click node_session "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/app/api/auth/refresh/route.ts"
click node_clients "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/entities/clients/clients-page-content.tsx"
click node_items "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/items/item-page-content.tsx"
click node_stock "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/management/stock/stock-management-content.tsx"
click node_categories "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/categories/categories-page-content.tsx"
click node_documents "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/documents/add-document.tsx"
click node_publicverify "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/documents/public/document-verification-view.tsx"
click node_pos "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/pos/counter/counter-content.tsx"
click node_cash "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/services/cash-sessions-service.ts"
click node_dashboard "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/dashboard/dashboard-page-content.tsx"
click node_reports "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/reports/sales/sales-reports-content.tsx"
click node_mind "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/shared/chatbot/index.tsx"
click node_subscription "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/subscription/subscription-page-content.tsx"
click node_taxverify "https://github.com/dev-mindware/mindgest-frontend/blob/main/src/app/api/contributors/verify/route.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_auth,node_session,node_user toneBlue
class node_clients,node_items,node_stock,node_categories toneAmber
class node_documents,node_publicverify,node_pos,node_cash,node_backend toneMint
class node_dashboard,node_reports,node_mind toneRose
class node_subscription,node_taxverify,node_setic toneIndigo
```

## Components

### Identity and Access

- [Sign in and register](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/app/auth/login/page.tsx): `src/app/auth/login/page.tsx`
- [Session refresh](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/app/api/auth/refresh/route.ts): `src/app/api/auth/refresh/route.ts`

### Business Operations

- [Clients and suppliers](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/entities/clients/clients-page-content.tsx): `src/components/client/entities/clients/clients-page-content.tsx`
- [Products and services](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/items/item-page-content.tsx): `src/components/client/items/item-page-content.tsx`
- [Stock management](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/management/stock/stock-management-content.tsx): `src/components/client/management/stock/stock-management-content.tsx`
- [Item categories](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/categories/categories-page-content.tsx): `src/components/client/categories/categories-page-content.tsx`

### Sales and Documents

- [Invoices and notes](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/documents/add-document.tsx): `src/components/client/documents/add-document.tsx`
- [Public document verification](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/documents/public/document-verification-view.tsx): `src/components/client/documents/public/document-verification-view.tsx`
- [Point of sale](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/pos/counter/counter-content.tsx): `src/components/client/pos/counter/counter-content.tsx`
- [Cash sessions](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/services/cash-sessions-service.ts): `src/services/cash-sessions-service.ts`

### Insights and Assistance

- [Business dashboard](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/dashboard/dashboard-page-content.tsx): `src/components/client/dashboard/dashboard-page-content.tsx`
- [Reports and analysis](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/reports/sales/sales-reports-content.tsx): `src/components/client/reports/sales/sales-reports-content.tsx`
- [MIND assistant](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/shared/chatbot/index.tsx): `src/components/shared/chatbot/index.tsx`

### Plans and Verification

- [Subscriptions](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/components/client/subscription/subscription-page-content.tsx): `src/components/client/subscription/subscription-page-content.tsx`
- [Taxpayer verification](https://github.com/dev-mindware/mindgest-frontend/blob/main/src/app/api/contributors/verify/route.ts): `src/app/api/contributors/verify/route.ts`

### Other components

- **Company user**
- **Mindgest API**
- **SETIC fiscal service**

## Connections

- Company user → Sign in and register: signs in
- Sign in and register → Session refresh: refreshes session
- Session refresh → Mindgest API: requests refresh (evidence: `src/app/api/auth/refresh/route.ts`)
- Company user → Clients and suppliers: manages records
- Company user → Products and services: manages items
- Company user → Stock management: monitors stock
- Company user → Item categories: organizes items
- Company user → Invoices and notes: issues documents
- Company user → Point of sale: processes sales
- Point of sale → Cash sessions: manages sessions
- Company user → Business dashboard: reviews KPIs
- Company user → Reports and analysis: analyzes results
- Company user → MIND assistant: asks questions
- MIND assistant → Mindgest API: queries company data
- Company user → Subscriptions: manages plan
- Company user → Taxpayer verification: checks taxpayer
- Taxpayer verification → SETIC fiscal service: looks up taxpayer (evidence: `src/app/api/contributors/verify/route.ts`)
- Company user → Public document verification: verifies document
