# tabbiotech05-beep/biotech architecture

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

- Interactive diagram: https://gitdiagram.com/tabbiotech05-beep/biotech
- Repository: https://github.com/tabbiotech05-beep/biotech

## Overview

BioXtenshi is a dual-team medical field-management system with a separate wholesaler sales dashboard. The primary workflow is user sign-in, dashboard selection, and calendar-based visit planning and tracking; supervisors also oversee team activity. The graph includes major documented capabilities and backend route/model areas. Some UI and route implementations were not sampled, so those links rely on explicit README statements or the source index; unsampled details are not inferred.

Main entry points: [`src/DashboardPage.jsx`](https://github.com/tabbiotech05-beep/biotech/blob/main/src/DashboardPage.jsx) (Dashboard workspace), [`server/index.js`](https://github.com/tabbiotech05-beep/biotech/blob/main/server/index.js) (Express API server), [`src/App.jsx`](https://github.com/tabbiotech05-beep/biotech/blob/main/src/App.jsx) (Application routing), [`sales-dashboard/src/App.jsx`](https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/App.jsx) (Wholesaler sales dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Field application"]
  node_app["Application routing<br/>[App.jsx]"]
  node_login["Sign-in<br/>[LoginPage.jsx]"]
  node_selection["Dashboard selection"]
  node_dashboard["Dashboard workspace<br/>[DashboardPage.jsx]"]
end

subgraph group_operations["Visit operations"]
  node_calendar["Calendar and visits<br/>[CalendarView.jsx]"]
  node_visit_api["Visit handling<br/>[visits.js]"]
  node_contacts["Contact directory<br/>[RepertoireView.jsx]"]
  node_search["Historical and live search<br/>[magic-search.js]"]
  node_congress["Congress planning<br/>[CongressView.jsx]"]
  node_samples["Samples and stock"]
  node_history["Sample history"]
end

subgraph group_management["Team management"]
  node_people["Users and roles<br/>[User.js]"]
  node_auth_api["Authentication API<br/>[auth.js]"]
  node_auth_mw["JWT authorization<br/>[auth.js]"]
  node_management_views["Leave and expenses<br/>[LeaveView.jsx]"]
  node_ai["AI reports and chat<br/>[ai.js]"]
end

subgraph group_platform["API and persistence"]
  node_visit_model["Visit records<br/>[Visit.js]"]
  node_congress_model["Congress records<br/>[Congress.js]"]
  node_api["Express API server<br/>[index.js]"]
  node_database[("MongoDB")]
end

subgraph group_sales["Sales dashboard"]
  node_sales_app["Wholesaler sales dashboard<br/>[App.jsx]"]
  node_sales_stock["Order and stock views"]
  node_sales_advantage["Commercial advantages"]
  node_sales_tracking["Order tracking"]
end

node_user(("Field user / supervisor"))
node_gemini["Google Gemini"]

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_selection
node_app -->|"routes to"| node_dashboard
node_user -->|"signs in"| node_login
node_user -->|"chooses team"| node_selection
node_dashboard -->|"renders"| node_calendar
node_calendar -.->|"manages visits"| node_visit_api
node_visit_api -->|"reads and writes"| node_visit_model
node_contacts -->|"fetches visits"| node_visit_api
node_search -->|"searches visits"| node_visit_model
node_api -->|"mounts route"| node_visit_api
node_api -->|"mounts route"| node_auth_api
node_api -->|"mounts route"| node_search
node_api -->|"mounts route"| node_ai
node_api -->|"connects"| node_database
node_auth_api -->|"manages users"| node_people
node_auth_mw -->|"loads user"| node_people
node_auth_api -->|"protects routes"| node_auth_mw
node_dashboard -->|"renders"| node_congress
node_congress -.->|"manages records"| node_congress_model
node_dashboard -->|"renders"| node_samples
node_dashboard -->|"renders"| node_history
node_dashboard -->|"renders"| node_management_views
node_ai -->|"queries"| node_gemini
node_dashboard -->|"links to"| node_sales_app
node_sales_app -->|"renders"| node_sales_stock
node_sales_app -->|"renders"| node_sales_advantage
node_sales_app -->|"renders"| node_sales_tracking

click node_app "https://github.com/tabbiotech05-beep/biotech/blob/main/src/App.jsx"
click node_login "https://github.com/tabbiotech05-beep/biotech/blob/main/src/LoginPage.jsx"
click node_selection "https://github.com/tabbiotech05-beep/biotech/blob/main/src/DashboardSelection.jsx"
click node_dashboard "https://github.com/tabbiotech05-beep/biotech/blob/main/src/DashboardPage.jsx"
click node_calendar "https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/CalendarView.jsx"
click node_visit_api "https://github.com/tabbiotech05-beep/biotech/blob/main/server/routes/visits.js"
click node_visit_model "https://github.com/tabbiotech05-beep/biotech/blob/main/server/models/Visit.js"
click node_contacts "https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/RepertoireView.jsx"
click node_search "https://github.com/tabbiotech05-beep/biotech/blob/main/server/routes/magic-search.js"
click node_congress "https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/CongressView.jsx"
click node_samples "https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/PharmacienneView.jsx"
click node_history "https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/SampleHistoryView.jsx"
click node_people "https://github.com/tabbiotech05-beep/biotech/blob/main/server/models/User.js"
click node_auth_api "https://github.com/tabbiotech05-beep/biotech/blob/main/server/routes/auth.js"
click node_auth_mw "https://github.com/tabbiotech05-beep/biotech/blob/main/server/middleware/auth.js"
click node_management_views "https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/LeaveView.jsx"
click node_ai "https://github.com/tabbiotech05-beep/biotech/blob/main/server/routes/ai.js"
click node_congress_model "https://github.com/tabbiotech05-beep/biotech/blob/main/server/models/Congress.js"
click node_api "https://github.com/tabbiotech05-beep/biotech/blob/main/server/index.js"
click node_sales_app "https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/App.jsx"
click node_sales_stock "https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/StockCommandeView.jsx"
click node_sales_advantage "https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/AvantageCommerciauxView.jsx"
click node_sales_tracking "https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/SuiviCommandesView.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_app,node_login,node_selection,node_dashboard,node_user toneBlue
class node_calendar,node_visit_api,node_contacts,node_search,node_congress,node_samples,node_history toneAmber
class node_people,node_auth_api,node_auth_mw,node_management_views,node_ai toneMint
class node_visit_model,node_congress_model,node_api,node_database toneRose
class node_sales_app,node_sales_stock,node_sales_advantage,node_sales_tracking,node_gemini toneIndigo
```

## Components

### Field application

- [Application routing](https://github.com/tabbiotech05-beep/biotech/blob/main/src/App.jsx): `src/App.jsx`
- [Sign-in](https://github.com/tabbiotech05-beep/biotech/blob/main/src/LoginPage.jsx): `src/LoginPage.jsx`
- [Dashboard selection](https://github.com/tabbiotech05-beep/biotech/blob/main/src/DashboardSelection.jsx): `src/DashboardSelection.jsx`
- [Dashboard workspace](https://github.com/tabbiotech05-beep/biotech/blob/main/src/DashboardPage.jsx): `src/DashboardPage.jsx`

### Visit operations

- [Calendar and visits](https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/CalendarView.jsx): `src/components/CalendarView.jsx`
- [Visit handling](https://github.com/tabbiotech05-beep/biotech/blob/main/server/routes/visits.js): `server/routes/visits.js`
- [Contact directory](https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/RepertoireView.jsx): `src/components/RepertoireView.jsx`
- [Historical and live search](https://github.com/tabbiotech05-beep/biotech/blob/main/server/routes/magic-search.js): `server/routes/magic-search.js`
- [Congress planning](https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/CongressView.jsx): `src/components/CongressView.jsx`
- [Samples and stock](https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/PharmacienneView.jsx): `src/components/PharmacienneView.jsx`
- [Sample history](https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/SampleHistoryView.jsx): `src/components/SampleHistoryView.jsx`

### Team management

- [Users and roles](https://github.com/tabbiotech05-beep/biotech/blob/main/server/models/User.js): `server/models/User.js`
- [Authentication API](https://github.com/tabbiotech05-beep/biotech/blob/main/server/routes/auth.js): `server/routes/auth.js`
- [JWT authorization](https://github.com/tabbiotech05-beep/biotech/blob/main/server/middleware/auth.js): `server/middleware/auth.js`
- [Leave and expenses](https://github.com/tabbiotech05-beep/biotech/blob/main/src/components/LeaveView.jsx): `src/components/LeaveView.jsx`
- [AI reports and chat](https://github.com/tabbiotech05-beep/biotech/blob/main/server/routes/ai.js): `server/routes/ai.js`

### API and persistence

- [Visit records](https://github.com/tabbiotech05-beep/biotech/blob/main/server/models/Visit.js): `server/models/Visit.js`
- [Congress records](https://github.com/tabbiotech05-beep/biotech/blob/main/server/models/Congress.js): `server/models/Congress.js`
- [Express API server](https://github.com/tabbiotech05-beep/biotech/blob/main/server/index.js): `server/index.js`
- **MongoDB**

### Sales dashboard

- [Wholesaler sales dashboard](https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/App.jsx): `sales-dashboard/src/App.jsx`
- [Order and stock views](https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/StockCommandeView.jsx): `sales-dashboard/src/StockCommandeView.jsx`
- [Commercial advantages](https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/AvantageCommerciauxView.jsx): `sales-dashboard/src/AvantageCommerciauxView.jsx`
- [Order tracking](https://github.com/tabbiotech05-beep/biotech/blob/main/sales-dashboard/src/SuiviCommandesView.jsx): `sales-dashboard/src/SuiviCommandesView.jsx`

### Other components

- **Field user / supervisor**
- **Google Gemini**

## Connections

- Field user / supervisor → Application routing: opens (evidence: `src/App.jsx`)
- Application routing → Sign-in: routes to (evidence: `src/App.jsx`)
- Application routing → Dashboard selection: routes to (evidence: `src/App.jsx`)
- Application routing → Dashboard workspace: routes to (evidence: `src/App.jsx`)
- Field user / supervisor → Sign-in: signs in (evidence: `README.md`)
- Field user / supervisor → Dashboard selection: chooses team (evidence: `README.md`)
- Dashboard workspace → Calendar and visits: renders (evidence: `src/DashboardPage.jsx`)
- Calendar and visits → Visit handling: manages visits
- Visit handling → Visit records: reads and writes (evidence: `server/routes/visits.js`)
- Contact directory → Visit handling: fetches visits (evidence: `src/components/RepertoireView.jsx`)
- Historical and live search → Visit records: searches visits (evidence: `server/routes/magic-search.js`)
- Express API server → Visit handling: mounts route (evidence: `server/index.js`)
- Express API server → Authentication API: mounts route (evidence: `server/index.js`)
- Express API server → Historical and live search: mounts route (evidence: `server/index.js`)
- Express API server → AI reports and chat: mounts route (evidence: `server/index.js`)
- Express API server → MongoDB: connects (evidence: `server/index.js`)
- Authentication API → Users and roles: manages users (evidence: `server/routes/auth.js`)
- JWT authorization → Users and roles: loads user (evidence: `server/middleware/auth.js`)
- Authentication API → JWT authorization: protects routes (evidence: `server/routes/auth.js`)
- Dashboard workspace → Congress planning: renders (evidence: `src/DashboardPage.jsx`)
- Congress planning → Congress records: manages records
- Dashboard workspace → Samples and stock: renders (evidence: `src/DashboardPage.jsx`)
- Dashboard workspace → Sample history: renders (evidence: `src/DashboardPage.jsx`)
- Dashboard workspace → Leave and expenses: renders (evidence: `src/DashboardPage.jsx`)
- AI reports and chat → Google Gemini: queries (evidence: `server/routes/ai.js`)
- Dashboard workspace → Wholesaler sales dashboard: links to (evidence: `src/DashboardPage.jsx`)
- Wholesaler sales dashboard → Order and stock views: renders (evidence: `sales-dashboard/src/App.jsx`)
- Wholesaler sales dashboard → Commercial advantages: renders (evidence: `sales-dashboard/src/App.jsx`)
- Wholesaler sales dashboard → Order tracking: renders (evidence: `sales-dashboard/src/App.jsx`)
