# abhishek-e-g/vendor_management_system architecture

> Architecture diagram of the GitHub repository abhishek-e-g/vendor_management_system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhishek-e-g/vendor_management_system
- Repository: https://github.com/abhishek-e-g/vendor_management_system

## Overview

##### Main Components

A. Backend Components (Primary Layer):
- Django REST API Server
- SQLite Database (as indicated by db.sqlite3)
- Authentication System (implied by superuser requirement)

B. Application Modules:
- Vendor Profile Management
- Purchase Order Management
- Performance Metrics Calculator
- API Endpoints Layer

**[Client Layer] → [Application Layer] → [Data Layer]**

##### Detailed Component Breakdown

- /api/vendors/
- /purchase_orders/
- /admin/
- Use REST API convention symbols

- Vendor Management Module
- Profile Management
- Performance Calculation
- Purchase Order Module
- Order Tracking
- Status Management
- Authentication & Authorization

- SQLite Database with main tables:
- Vendors
- Purchase Orders
- Performance Metrics
- User/Auth Data

##### Component Relationships

- API request flow (top to bottom)
- Data flow between components (bidirectional where applicable)
- Performance metric calculations (showing data aggregation)

##### Additional Elements

Include:
- Version information (Python 3.12, Django latest)
- External dependency connections
- Security layer representation

##### Technical Details to Highlight

- Django REST Framework integration
- Model-View-Serializer pattern (as seen in the file structure)
- URL routing system
- Database schema relationships

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client
        API[API Clients]
    end

    subgraph "API Layer"
        VE["Vendor Endpoints"]:::api
        POE["Purchase Order Endpoints"]:::api
        AE["Admin Endpoints"]:::api
        click VE "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/urls.py"
        click POE "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/urls.py"
        click AE "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/admin.py"
    end

    subgraph "Application Core"
        direction TB
        DRF["Django REST Framework Server"]:::core
        click DRF "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/settings.py"
        
        subgraph "Business Logic"
            VM["Vendor Management"]:::logic
            POM["Purchase Order Management"]:::logic
            PMC["Performance Metrics Calculator"]:::logic
            click VM "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/views.py"
            click POM "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/views.py"
            click PMC "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/views.py"
        end
        
        subgraph "Data Processing"
            SER["Serialization Layer"]:::process
            click SER "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/serializers.py"
        end
        
        subgraph "Server Configuration"
            WSGI["WSGI Server"]:::server
            ASGI["ASGI Server"]:::server
            click WSGI "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/wsgi.py"
            click ASGI "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/asgi.py"
        end
    end

    subgraph "Data Layer"
        DB[(SQLite Database)]:::database
        click DB "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/db.sqlite3"
        
        subgraph "Models"
            VM_M["Vendor Model"]:::model
            PO_M["Purchase Order Model"]:::model
            PM_M["Performance Metrics Model"]:::model
            click VM_M "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/models.py"
            click PO_M "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/models.py"
            click PM_M "https://github.com/Abhishek-E-G/Vendor_management_system/blob/main/vendor_management_system/vendor_management_system/vendor_management/models.py"
        end
    end

    %% Relationships
    API --> VE & POE & AE
    VE & POE & AE --> DRF
    DRF --> VM & POM & PMC
    VM & POM & PMC --> SER
    SER --> VM_M & PO_M & PM_M
    VM_M & PO_M & PM_M --> DB
    WSGI & ASGI --> DRF

    %% Styles
    classDef api fill:#90EE90,stroke:#333,stroke-width:2px
    classDef core fill:#ADD8E6,stroke:#333,stroke-width:2px
    classDef logic fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef process fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef server fill:#FFB6C1,stroke:#333,stroke-width:2px
    classDef database fill:#FFA500,stroke:#333,stroke-width:2px
    classDef model fill:#F0E68C,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1["API Endpoints"]:::api
        L2["Core Components"]:::core
        L3["Business Logic"]:::logic
        L4["Data Processing"]:::process
        L5["Server Config"]:::server
        L6["Database"]:::database
        L7["Data Models"]:::model
    end
```
