# osess/mes architecture

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

- Interactive diagram: https://gitdiagram.com/osess/mes
- Repository: https://github.com/osess/mes

## Overview

This is a Django-based business operations application, with modules for manufacturing plans, inventory, materials, products, technologies, quality, reporting, workflows, and organizational records. The likely user workflow is staff access through the administrative interface to manage operational records and consult reports. The tree supports those capability areas, but the README is empty and most application views were not sampled, so domain-level routing and data handoffs cannot be verified. Dashed edges mark only that unverified entry relationship; solid edges cite relationships visible in the provided source index or excerpts.

Main entry points: [`apps/xadmin/sites.py`](https://github.com/osess/mes/blob/master/apps/xadmin/sites.py) (Admin interface), [`apps/xadmin/plugins/auth.py`](https://github.com/osess/mes/blob/master/apps/xadmin/plugins/auth.py) (Admin auth), [`thirdparty/mailer/engine.py`](https://github.com/osess/mes/blob/master/thirdparty/mailer/engine.py) (Mail sender), [`thirdparty/notification/engine.py`](https://github.com/osess/mes/blob/master/thirdparty/notification/engine.py) (Notice sender)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Administration"]
  node_admin_ui["Admin interface<br/>[sites.py]"]
  node_admin_views["Admin views"]
  node_admin_auth["Admin auth<br/>[auth.py]"]
end

subgraph group_operations["Operations"]
  node_manufacturing["Manufacturing plans"]
  node_warehouse[("Warehouse inventory")]
  node_materials[("Materials")]
  node_quality["Quality"]
  node_devices[("Devices")]
  node_workflows["Workflows"]
end

subgraph group_records["Business Records"]
  node_products[("Product catalog")]
  node_technologies[("Technologies")]
  node_people[("People<br/>[models.py]")]
  node_departments[("Departments")]
  node_customers[("Customers")]
end

subgraph group_insights["Reporting"]
  node_reports["Reports"]
end

subgraph group_services["Shared Services"]
  node_activity[("Activity stream<br/>[managers.py]")]
  node_mail_queue[("Mail queue<br/>[models.py]")]
  node_mail_sender["Mail sender<br/>[engine.py]"]
  node_notice_queue[("Notice queue<br/>[models.py]")]
  node_notice_sender["Notice sender<br/>[engine.py]"]
end

node_staff(("Staff user"))
node_email_service["Django mail"]

node_staff -.->|"opens"| node_admin_ui
node_admin_ui -->|"registers views"| node_admin_views
node_admin_auth -->|"registers plugins"| node_admin_ui
node_admin_auth -->|"reads user records"| node_people
node_staff -.->|"manages plans"| node_manufacturing
node_staff -.->|"manages stock"| node_warehouse
node_staff -.->|"manages materials"| node_materials
node_staff -.->|"records quality"| node_quality
node_staff -.->|"manages devices"| node_devices
node_staff -.->|"manages catalog"| node_products
node_staff -.->|"manages technologies"| node_technologies
node_staff -.->|"manages departments"| node_departments
node_staff -.->|"manages customers"| node_customers
node_staff -.->|"uses workflows"| node_workflows
node_staff -.->|"views reports"| node_reports
node_mail_sender -->|"reads and logs"| node_mail_queue
node_mail_sender -->|"sends mail"| node_email_service
node_notice_sender -->|"reads batches"| node_notice_queue

click node_admin_ui "https://github.com/osess/mes/blob/master/apps/xadmin/sites.py"
click node_admin_views "https://github.com/osess/mes/tree/master/apps/xadmin/views"
click node_admin_auth "https://github.com/osess/mes/blob/master/apps/xadmin/plugins/auth.py"
click node_manufacturing "https://github.com/osess/mes/tree/master/apps/manufactureplan"
click node_warehouse "https://github.com/osess/mes/tree/master/apps/warehouse"
click node_materials "https://github.com/osess/mes/tree/master/apps/material"
click node_quality "https://github.com/osess/mes/tree/master/apps/quality"
click node_devices "https://github.com/osess/mes/tree/master/apps/device"
click node_products "https://github.com/osess/mes/tree/master/apps/productcatalog"
click node_technologies "https://github.com/osess/mes/tree/master/apps/technologies"
click node_people "https://github.com/osess/mes/blob/master/apps/person/models.py"
click node_departments "https://github.com/osess/mes/tree/master/apps/companydepartment"
click node_customers "https://github.com/osess/mes/tree/master/apps/customer"
click node_workflows "https://github.com/osess/mes/tree/master/apps/workflows"
click node_reports "https://github.com/osess/mes/tree/master/apps/report"
click node_activity "https://github.com/osess/mes/blob/master/thirdparty/actstream/managers.py"
click node_mail_queue "https://github.com/osess/mes/blob/master/thirdparty/mailer/models.py"
click node_mail_sender "https://github.com/osess/mes/blob/master/thirdparty/mailer/engine.py"
click node_notice_queue "https://github.com/osess/mes/blob/master/thirdparty/notification/models.py"
click node_notice_sender "https://github.com/osess/mes/blob/master/thirdparty/notification/engine.py"

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_admin_ui,node_admin_views,node_admin_auth,node_staff toneBlue
class node_manufacturing,node_warehouse,node_materials,node_quality,node_devices,node_workflows toneAmber
class node_products,node_technologies,node_people,node_departments,node_customers toneMint
class node_reports toneRose
class node_activity,node_mail_queue,node_mail_sender,node_notice_queue,node_notice_sender,node_email_service toneIndigo
```

## Components

### Administration

- [Admin interface](https://github.com/osess/mes/blob/master/apps/xadmin/sites.py): `apps/xadmin/sites.py`
- [Admin views](https://github.com/osess/mes/tree/master/apps/xadmin/views): `apps/xadmin/views`
- [Admin auth](https://github.com/osess/mes/blob/master/apps/xadmin/plugins/auth.py): `apps/xadmin/plugins/auth.py`

### Operations

- [Manufacturing plans](https://github.com/osess/mes/tree/master/apps/manufactureplan): `apps/manufactureplan`
- [Warehouse inventory](https://github.com/osess/mes/tree/master/apps/warehouse): `apps/warehouse`
- [Materials](https://github.com/osess/mes/tree/master/apps/material): `apps/material`
- [Quality](https://github.com/osess/mes/tree/master/apps/quality): `apps/quality`
- [Devices](https://github.com/osess/mes/tree/master/apps/device): `apps/device`
- [Workflows](https://github.com/osess/mes/tree/master/apps/workflows): `apps/workflows`

### Business Records

- [Product catalog](https://github.com/osess/mes/tree/master/apps/productcatalog): `apps/productcatalog`
- [Technologies](https://github.com/osess/mes/tree/master/apps/technologies): `apps/technologies`
- [People](https://github.com/osess/mes/blob/master/apps/person/models.py): `apps/person/models.py`
- [Departments](https://github.com/osess/mes/tree/master/apps/companydepartment): `apps/companydepartment`
- [Customers](https://github.com/osess/mes/tree/master/apps/customer): `apps/customer`

### Reporting

- [Reports](https://github.com/osess/mes/tree/master/apps/report): `apps/report`

### Shared Services

- [Activity stream](https://github.com/osess/mes/blob/master/thirdparty/actstream/managers.py): `thirdparty/actstream/managers.py`
- [Mail queue](https://github.com/osess/mes/blob/master/thirdparty/mailer/models.py): `thirdparty/mailer/models.py`
- [Mail sender](https://github.com/osess/mes/blob/master/thirdparty/mailer/engine.py): `thirdparty/mailer/engine.py`
- [Notice queue](https://github.com/osess/mes/blob/master/thirdparty/notification/models.py): `thirdparty/notification/models.py`
- [Notice sender](https://github.com/osess/mes/blob/master/thirdparty/notification/engine.py): `thirdparty/notification/engine.py`

### Other components

- **Staff user**
- **Django mail**

## Connections

- Staff user → Admin interface: opens
- Admin interface → Admin views: registers views (evidence: `apps/xadmin/views/__init__.py`)
- Admin auth → Admin interface: registers plugins (evidence: `apps/xadmin/plugins/auth.py`)
- Admin auth → People: reads user records (evidence: `apps/xadmin/plugins/auth.py`)
- Staff user → Manufacturing plans: manages plans
- Staff user → Warehouse inventory: manages stock
- Staff user → Materials: manages materials
- Staff user → Quality: records quality
- Staff user → Devices: manages devices
- Staff user → Product catalog: manages catalog
- Staff user → Technologies: manages technologies
- Staff user → Departments: manages departments
- Staff user → Customers: manages customers
- Staff user → Workflows: uses workflows
- Staff user → Reports: views reports
- Mail sender → Mail queue: reads and logs (evidence: `thirdparty/mailer/engine.py`)
- Mail sender → Django mail: sends mail (evidence: `thirdparty/mailer/engine.py`)
- Notice sender → Notice queue: reads batches (evidence: `thirdparty/notification/engine.py`)
