# brojalloo/tekkipro architecture

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

- Interactive diagram: https://gitdiagram.com/brojalloo/tekkipro
- Repository: https://github.com/brojalloo/tekkipro

## Overview

TekkiPro is a shop-management SaaS delivered through web and mobile clients backed by an Express/Prisma API. The main workflow is that a shop user signs in, manages products and stock, records sales and customer debts, and reviews activity; subscriptions, payments, reporting, and superadmin operations are additional capabilities. The README documents client-to-API use, while sampled files and the source index support several internal links. Unsampled domain implementations are represented at their existing directory paths, and their internal calls are not inferred.

Main entry points: [`backend/src/app/routes.js`](https://github.com/brojalloo/tekkipro/blob/main/backend/src/app/routes.js) (API routes), [`backend/src/config/database.js`](https://github.com/brojalloo/tekkipro/blob/main/backend/src/config/database.js) (PostgreSQL data), [`backend/src/modules/auth/auth.controller.js`](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/auth/auth.controller.js) (Authentication), [`backend/src/modules/payments/payment.controller.js`](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/payments/payment.controller.js) (Payment processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User applications"]
  node_web_app["Web app<br/>[App.jsx]"]
  node_mobile_app["Mobile app<br/>[App.js]"]
  node_web_api["Web API client<br/>[api.js]"]
  node_mobile_api["Mobile API client<br/>[api.js]"]
end

subgraph group_api["API and access"]
  node_api_routes["API routes<br/>[routes.js]"]
  node_auth["Authentication<br/>[auth.controller.js]"]
  node_access["Access middleware<br/>[auth.middleware.js]"]
end

subgraph group_commerce["Shop operations"]
  node_boutiques["Shop management"]
  node_catalog["Product catalog"]
  node_inventory["Inventory"]
  node_sales["Sales and debts"]
  node_customers["Customers"]
  node_suppliers["Suppliers"]
  node_barcodes["Barcode tools"]
end

subgraph group_admin["Plans and oversight"]
  node_reports["Reports and metrics"]
  node_subscriptions["Subscriptions"]
  node_payments["Payment processing"]
  node_audit["Audit logs"]
  node_superadmin["Platform admin"]
end

subgraph group_infra["Persistence and services"]
  node_database[("PostgreSQL data<br/>[database.js]")]
  node_email["Email service<br/>[email.service.js]"]
end

node_shop_user(("Shop user"))

node_shop_user -->|"uses"| node_web_app
node_shop_user -->|"uses"| node_mobile_app
node_web_app -->|"requests data"| node_web_api
node_mobile_app -->|"requests data"| node_mobile_api
node_web_api -->|"calls API"| node_api_routes
node_mobile_api -->|"calls API"| node_api_routes
node_api_routes -->|"routes to"| node_auth
node_api_routes -->|"routes to"| node_boutiques
node_api_routes -->|"routes to"| node_catalog
node_api_routes -->|"routes to"| node_inventory
node_api_routes -->|"routes to"| node_sales
node_api_routes -->|"routes to"| node_customers
node_api_routes -->|"routes to"| node_suppliers
node_api_routes -->|"routes to"| node_barcodes
node_api_routes -->|"routes to"| node_reports
node_api_routes -->|"routes to"| node_subscriptions
node_api_routes -->|"routes to"| node_payments
node_api_routes -->|"routes to"| node_audit
node_api_routes -->|"routes to"| node_superadmin
node_auth -->|"reads and writes"| node_database
node_catalog -->|"reads and writes"| node_database
node_inventory -->|"reads and writes"| node_database
node_sales -->|"reads and writes"| node_database
node_payments -->|"reads and writes"| node_database
node_payments -->|"sends confirmation"| node_email
node_auth -->|"sends verification"| node_email
node_auth -->|"issues credentials"| node_access
node_access -->|"checks identity"| node_database
node_superadmin -->|"reads and writes"| node_database
node_reports -->|"queries metrics"| node_database

click node_web_app "https://github.com/brojalloo/tekkipro/blob/main/frontend/src/App.jsx"
click node_mobile_app "https://github.com/brojalloo/tekkipro/blob/main/mobile/App.js"
click node_web_api "https://github.com/brojalloo/tekkipro/blob/main/frontend/src/services/api.js"
click node_mobile_api "https://github.com/brojalloo/tekkipro/blob/main/mobile/src/lib/api.js"
click node_api_routes "https://github.com/brojalloo/tekkipro/blob/main/backend/src/app/routes.js"
click node_auth "https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/auth/auth.controller.js"
click node_access "https://github.com/brojalloo/tekkipro/blob/main/backend/src/middleware/auth.middleware.js"
click node_boutiques "https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/boutiques"
click node_catalog "https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/catalog/produit.controller.js"
click node_inventory "https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/inventory/stock.controller.js"
click node_sales "https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/sales/vente.controller.js"
click node_customers "https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/customers"
click node_suppliers "https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/suppliers"
click node_barcodes "https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/barcodes"
click node_reports "https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/reports"
click node_subscriptions "https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/abonnements/abonnement.controller.js"
click node_payments "https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/payments/payment.controller.js"
click node_audit "https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/audit"
click node_superadmin "https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/superadmin/superadmin.controller.js"
click node_database "https://github.com/brojalloo/tekkipro/blob/main/backend/src/config/database.js"
click node_email "https://github.com/brojalloo/tekkipro/blob/main/backend/src/services/email.service.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_web_app,node_mobile_app,node_web_api,node_mobile_api,node_shop_user toneBlue
class node_api_routes,node_auth,node_access toneAmber
class node_boutiques,node_catalog,node_inventory,node_sales,node_customers,node_suppliers,node_barcodes toneMint
class node_reports,node_subscriptions,node_payments,node_audit,node_superadmin toneRose
class node_database,node_email toneIndigo
```

## Components

### User applications

- [Web app](https://github.com/brojalloo/tekkipro/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Mobile app](https://github.com/brojalloo/tekkipro/blob/main/mobile/App.js): `mobile/App.js`
- [Web API client](https://github.com/brojalloo/tekkipro/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Mobile API client](https://github.com/brojalloo/tekkipro/blob/main/mobile/src/lib/api.js): `mobile/src/lib/api.js`

### API and access

- [API routes](https://github.com/brojalloo/tekkipro/blob/main/backend/src/app/routes.js): `backend/src/app/routes.js`
- [Authentication](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/auth/auth.controller.js): `backend/src/modules/auth/auth.controller.js`
- [Access middleware](https://github.com/brojalloo/tekkipro/blob/main/backend/src/middleware/auth.middleware.js): `backend/src/middleware/auth.middleware.js`

### Shop operations

- [Shop management](https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/boutiques): `backend/src/modules/boutiques`
- [Product catalog](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/catalog/produit.controller.js): `backend/src/modules/catalog/produit.controller.js`
- [Inventory](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/inventory/stock.controller.js): `backend/src/modules/inventory/stock.controller.js`
- [Sales and debts](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/sales/vente.controller.js): `backend/src/modules/sales/vente.controller.js`
- [Customers](https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/customers): `backend/src/modules/customers`
- [Suppliers](https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/suppliers): `backend/src/modules/suppliers`
- [Barcode tools](https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/barcodes): `backend/src/modules/barcodes`

### Plans and oversight

- [Reports and metrics](https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/reports): `backend/src/modules/reports`
- [Subscriptions](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/abonnements/abonnement.controller.js): `backend/src/modules/abonnements/abonnement.controller.js`
- [Payment processing](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/payments/payment.controller.js): `backend/src/modules/payments/payment.controller.js`
- [Audit logs](https://github.com/brojalloo/tekkipro/tree/main/backend/src/modules/audit): `backend/src/modules/audit`
- [Platform admin](https://github.com/brojalloo/tekkipro/blob/main/backend/src/modules/superadmin/superadmin.controller.js): `backend/src/modules/superadmin/superadmin.controller.js`

### Persistence and services

- [PostgreSQL data](https://github.com/brojalloo/tekkipro/blob/main/backend/src/config/database.js): `backend/src/config/database.js`
- [Email service](https://github.com/brojalloo/tekkipro/blob/main/backend/src/services/email.service.js): `backend/src/services/email.service.js`

### Other components

- **Shop user**

## Connections

- Shop user → Web app: uses (evidence: `README.md`)
- Shop user → Mobile app: uses (evidence: `README.md`)
- Web app → Web API client: requests data
- Mobile app → Mobile API client: requests data
- Web API client → API routes: calls API (evidence: `README.md`)
- Mobile API client → API routes: calls API (evidence: `README.md`)
- API routes → Authentication: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Shop management: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Product catalog: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Inventory: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Sales and debts: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Customers: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Suppliers: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Barcode tools: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Reports and metrics: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Subscriptions: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Payment processing: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Audit logs: routes to (evidence: `backend/src/app/routes.js`)
- API routes → Platform admin: routes to (evidence: `backend/src/app/routes.js`)
- Authentication → PostgreSQL data: reads and writes (evidence: `backend/src/modules/auth/auth.controller.js`)
- Product catalog → PostgreSQL data: reads and writes (evidence: `backend/src/modules/catalog/produit.controller.js`)
- Inventory → PostgreSQL data: reads and writes (evidence: `backend/src/modules/inventory/stock.controller.js`)
- Sales and debts → PostgreSQL data: reads and writes (evidence: `backend/src/modules/sales/vente.controller.js`)
- Payment processing → PostgreSQL data: reads and writes (evidence: `backend/src/modules/payments/payment.controller.js`)
- Payment processing → Email service: sends confirmation (evidence: `backend/src/modules/payments/payment.controller.js`)
- Authentication → Email service: sends verification (evidence: `backend/src/modules/auth/auth.controller.js`)
- Authentication → Access middleware: issues credentials (evidence: `backend/src/modules/auth/auth.controller.js`)
- Access middleware → PostgreSQL data: checks identity (evidence: `backend/src/middleware/auth.middleware.js`)
- Platform admin → PostgreSQL data: reads and writes (evidence: `backend/src/modules/superadmin/superadmin.controller.js`)
- Reports and metrics → PostgreSQL data: queries metrics (evidence: `backend/src/modules/reports/statistique.controller.js`)
