# vaidhika1105/e-commerce_order_management_system architecture

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

- Interactive diagram: https://gitdiagram.com/vaidhika1105/e-commerce_order_management_system
- Repository: https://github.com/vaidhika1105/e-commerce_order_management_system

## Overview

This is a console-based e-commerce order-management program used as an operating-systems case study. The main workflow is menu-driven: initialize and browse products, place an order with a payment choice, update inventory, log transaction events, and persist or view order history. The menu also exposes standalone OS demonstrations, including process scheduling, IPC, threading, memory management, deadlock avoidance, and file allocation. Relationships below follow visible calls and file operations; several demo implementations were not sampled, so their internal links are omitted.

Main entry points: [`main.c`](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/main.c) (Interactive menu), [`order.c`](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/order.c) (Order handling), [`file_management.c`](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/file_management.c) (File management), [`transaction.c`](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/transaction.c) (Transaction recovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commerce["Commerce workflow"]
  node_app["Interactive menu<br/>[main.c]"]
  node_products["Product catalog<br/>[product.c]"]
  node_orders["Order handling<br/>[order.c]"]
end

subgraph group_records["File records"]
  node_transactions["Transaction recovery<br/>[transaction.c]"]
  node_orderfile[("Order history<br/>[orders.txt]")]
  node_logfile[("Transaction log")]
  node_filemgmt["File management<br/>[file_management.c]"]
end

subgraph group_osdemos["OS demonstrations"]
  node_processes["Process demo<br/>[process.c]"]
  node_scheduling["CPU scheduling<br/>[scheduling.c]"]
  node_ipc["IPC demo<br/>[ipc.c]"]
  node_threads["Threading and inventory sync<br/>[threading.c]"]
  node_paging["Page replacement<br/>[page_replacement.c]"]
  node_banker["Deadlock avoidance<br/>[banker.c]"]
  node_allocation["File allocation<br/>[file_allocation.c]"]
end

subgraph group_shared["Shared interface"]
  node_contract["Domain data types<br/>[ecommerce.h]"]
end

node_user(("Console user"))

node_user -->|"chooses menu actions"| node_app
node_app -->|"initializes and displays"| node_products
node_app -->|"places or views orders"| node_orders
node_orders -->|"looks up product"| node_products
node_orders -->|"logs events"| node_transactions
node_orders -->|"writes and reads"| node_orderfile
node_app -->|"runs transaction and recovery demos"| node_transactions
node_transactions -->|"writes and scans"| node_logfile
node_app -->|"runs file demo"| node_filemgmt
node_filemgmt -->|"reads orders"| node_orderfile
node_filemgmt -->|"reads transaction log"| node_logfile
node_app -->|"runs process demo"| node_processes
node_app -->|"opens scheduling menu"| node_scheduling
node_app -->|"runs IPC demo"| node_ipc
node_app -->|"runs thread demos"| node_threads
node_app -->|"opens page menu"| node_paging
node_app -->|"runs Banker demo"| node_banker
node_app -->|"runs allocation demo"| node_allocation

click node_app "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/main.c"
click node_products "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/product.c"
click node_orders "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/order.c"
click node_transactions "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/transaction.c"
click node_orderfile "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/data/orders.txt"
click node_logfile "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/data/transaction_log.txt"
click node_filemgmt "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/file_management.c"
click node_processes "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/process.c"
click node_scheduling "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/scheduling.c"
click node_ipc "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/ipc.c"
click node_threads "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/threading.c"
click node_paging "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/page_replacement.c"
click node_banker "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/banker.c"
click node_allocation "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/file_allocation.c"
click node_contract "https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/ecommerce.h"

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_products,node_orders,node_user toneBlue
class node_transactions,node_orderfile,node_logfile,node_filemgmt toneAmber
class node_processes,node_scheduling,node_ipc,node_threads,node_paging,node_banker,node_allocation toneMint
class node_contract toneRose
```

## Components

### Commerce workflow

- [Interactive menu](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/main.c): `main.c`
- [Product catalog](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/product.c): `product.c`
- [Order handling](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/order.c): `order.c`

### File records

- [Transaction recovery](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/transaction.c): `transaction.c`
- [Order history](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/data/orders.txt): `data/orders.txt`
- [Transaction log](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/data/transaction_log.txt): `data/transaction_log.txt`
- [File management](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/file_management.c): `file_management.c`

### OS demonstrations

- [Process demo](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/process.c): `process.c`
- [CPU scheduling](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/scheduling.c): `scheduling.c`
- [IPC demo](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/ipc.c): `ipc.c`
- [Threading and inventory sync](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/threading.c): `threading.c`
- [Page replacement](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/page_replacement.c): `page_replacement.c`
- [Deadlock avoidance](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/banker.c): `banker.c`
- [File allocation](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/file_allocation.c): `file_allocation.c`

### Shared interface

- [Domain data types](https://github.com/vaidhika1105/e-commerce_order_management_system/blob/main/ecommerce.h): `ecommerce.h`

### Other components

- **Console user**

## Connections

- Console user → Interactive menu: chooses menu actions (evidence: `main.c`)
- Interactive menu → Product catalog: initializes and displays (evidence: `main.c`)
- Interactive menu → Order handling: places or views orders (evidence: `main.c`)
- Order handling → Product catalog: looks up product (evidence: `order.c`)
- Order handling → Transaction recovery: logs events (evidence: `order.c`)
- Order handling → Order history: writes and reads (evidence: `order.c`)
- Interactive menu → Transaction recovery: runs transaction and recovery demos (evidence: `main.c`)
- Transaction recovery → Transaction log: writes and scans (evidence: `transaction.c`)
- Interactive menu → File management: runs file demo (evidence: `main.c`)
- File management → Order history: reads orders (evidence: `file_management.c`)
- File management → Transaction log: reads transaction log (evidence: `file_management.c`)
- Interactive menu → Process demo: runs process demo (evidence: `main.c`)
- Interactive menu → CPU scheduling: opens scheduling menu (evidence: `main.c`)
- Interactive menu → IPC demo: runs IPC demo (evidence: `main.c`)
- Interactive menu → Threading and inventory sync: runs thread demos (evidence: `main.c`)
- Interactive menu → Page replacement: opens page menu (evidence: `main.c`)
- Interactive menu → Deadlock avoidance: runs Banker demo (evidence: `main.c`)
- Interactive menu → File allocation: runs allocation demo (evidence: `main.c`)
