# noyasuo/procurement-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/noyasuo/procurement-management-system
- Repository: https://github.com/noyasuo/procurement-management-system

## Overview

This is a Django/DRF backend for a mobile procurement system, with a web admin surface. The principal workflow is account authentication, supplier product/catalogue management, order submission, role-based review and approval, and payment or refund records. The model layer stores accounts, products, orders, payments, and refunds. The README also describes offline operation, budget monitoring, and analytics, but the sampled implementation does not establish those subsystems; they are therefore not represented as implemented components.

Main entry points: [`pms_api/urls.py`](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/urls.py) (API Routing), [`core/models.py`](https://github.com/noyasuo/procurement-management-system/blob/main/core/models.py) (Domain Models), [`pms_api/serializer.py`](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/serializer.py) (API Serializers), [`pms_api/views/auth.py`](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/auth.py) (Accounts and Auth)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and Access"]
  node_routing["API Routing<br/>[urls.py]"]
  node_auth["Accounts and Auth<br/>[auth.py]"]
  node_serialization["API Serializers<br/>[serializer.py]"]
  node_projectroutes["Project Routes<br/>[urls.py]"]
end

subgraph group_catalog["Supplier Catalogue"]
  node_catalogue["Products and Categories<br/>[product.py]"]
end

subgraph group_procurement["Procurement Workflow"]
  node_orders["Order Requests<br/>[order.py]"]
  node_supplierorders["Supplier Orders<br/>[order.py]"]
  node_refunds["Refund Requests<br/>[order.py]"]
  node_payments["Payment Records<br/>[payment.py]"]
end

subgraph group_platform["Persistence and Admin"]
  node_models["Domain Models<br/>[models.py]"]
  node_database[("SQLite Database")]
  node_admin["Django Admin<br/>[admin.py]"]
  node_mail["SMTP Email"]
end

node_mobile(("Mobile Client"))
node_webadmin(("Web Admin User"))

node_mobile -->|"calls API"| node_routing
node_webadmin -->|"manages records"| node_admin
node_projectroutes -->|"includes routes"| node_routing
node_routing -->|"dispatches auth"| node_auth
node_routing -->|"dispatches catalogue"| node_catalogue
node_routing -->|"dispatches orders"| node_orders
node_routing -->|"dispatches supplier view"| node_supplierorders
node_routing -->|"dispatches refunds"| node_refunds
node_routing -->|"dispatches payments"| node_payments
node_auth -->|"validates accounts"| node_serialization
node_catalogue -->|"serializes catalogue"| node_serialization
node_orders -->|"serializes orders"| node_serialization
node_refunds -->|"serializes refunds"| node_serialization
node_payments -->|"serializes payments"| node_serialization
node_auth -->|"queries accounts"| node_models
node_catalogue -->|"queries products"| node_models
node_orders -->|"creates and updates"| node_models
node_supplierorders -->|"filters orders"| node_models
node_refunds -->|"queries refunds"| node_models
node_payments -->|"queries payments"| node_models
node_serialization -->|"maps domain data"| node_models
node_models -->|"persists records"| node_database
node_admin -->|"administers records"| node_models
node_auth -->|"sends reset email"| node_mail
node_orders -->|"sends order notices"| node_mail

click node_routing "https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/urls.py"
click node_auth "https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/auth.py"
click node_serialization "https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/serializer.py"
click node_catalogue "https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/product.py"
click node_orders "https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/order.py"
click node_supplierorders "https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/order.py"
click node_refunds "https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/order.py"
click node_payments "https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/payment.py"
click node_models "https://github.com/noyasuo/procurement-management-system/blob/main/core/models.py"
click node_admin "https://github.com/noyasuo/procurement-management-system/blob/main/core/admin.py"
click node_projectroutes "https://github.com/noyasuo/procurement-management-system/blob/main/config/urls.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_routing,node_auth,node_serialization,node_projectroutes,node_mobile,node_webadmin toneBlue
class node_catalogue toneAmber
class node_orders,node_supplierorders,node_refunds,node_payments toneMint
class node_models,node_database,node_admin,node_mail toneRose
```

## Components

### API and Access

- [API Routing](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/urls.py): `pms_api/urls.py`
- [Accounts and Auth](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/auth.py): `pms_api/views/auth.py`
- [API Serializers](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/serializer.py): `pms_api/serializer.py`
- [Project Routes](https://github.com/noyasuo/procurement-management-system/blob/main/config/urls.py): `config/urls.py`

### Supplier Catalogue

- [Products and Categories](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/product.py): `pms_api/views/product.py`

### Procurement Workflow

- [Order Requests](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/order.py): `pms_api/views/order.py`
- [Supplier Orders](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/order.py): `pms_api/views/order.py`
- [Refund Requests](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/order.py): `pms_api/views/order.py`
- [Payment Records](https://github.com/noyasuo/procurement-management-system/blob/main/pms_api/views/payment.py): `pms_api/views/payment.py`

### Persistence and Admin

- [Domain Models](https://github.com/noyasuo/procurement-management-system/blob/main/core/models.py): `core/models.py`
- **SQLite Database**
- [Django Admin](https://github.com/noyasuo/procurement-management-system/blob/main/core/admin.py): `core/admin.py`
- **SMTP Email**

### Other components

- **Mobile Client**
- **Web Admin User**

## Connections

- Mobile Client → API Routing: calls API (evidence: `README.md`)
- Web Admin User → Django Admin: manages records (evidence: `README.md`)
- Project Routes → API Routing: includes routes (evidence: `config/urls.py`)
- API Routing → Accounts and Auth: dispatches auth (evidence: `pms_api/urls.py`)
- API Routing → Products and Categories: dispatches catalogue (evidence: `pms_api/urls.py`)
- API Routing → Order Requests: dispatches orders (evidence: `pms_api/urls.py`)
- API Routing → Supplier Orders: dispatches supplier view (evidence: `pms_api/urls.py`)
- API Routing → Refund Requests: dispatches refunds (evidence: `pms_api/urls.py`)
- API Routing → Payment Records: dispatches payments (evidence: `pms_api/urls.py`)
- Accounts and Auth → API Serializers: validates accounts (evidence: `pms_api/views/auth.py`)
- Products and Categories → API Serializers: serializes catalogue (evidence: `pms_api/views/product.py`)
- Order Requests → API Serializers: serializes orders (evidence: `pms_api/views/order.py`)
- Refund Requests → API Serializers: serializes refunds (evidence: `pms_api/views/order.py`)
- Payment Records → API Serializers: serializes payments (evidence: `pms_api/views/payment.py`)
- Accounts and Auth → Domain Models: queries accounts (evidence: `pms_api/views/auth.py`)
- Products and Categories → Domain Models: queries products (evidence: `pms_api/views/product.py`)
- Order Requests → Domain Models: creates and updates (evidence: `pms_api/views/order.py`)
- Supplier Orders → Domain Models: filters orders (evidence: `pms_api/views/order.py`)
- Refund Requests → Domain Models: queries refunds (evidence: `pms_api/views/order.py`)
- Payment Records → Domain Models: queries payments (evidence: `pms_api/views/payment.py`)
- API Serializers → Domain Models: maps domain data (evidence: `pms_api/serializer.py`)
- Domain Models → SQLite Database: persists records
- Django Admin → Domain Models: administers records (evidence: `core/admin.py`)
- Accounts and Auth → SMTP Email: sends reset email (evidence: `pms_api/views/auth.py`)
- Order Requests → SMTP Email: sends order notices (evidence: `pms_api/views/order.py`)
