# vedant1234591/prop architecture

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

- Interactive diagram: https://gitdiagram.com/vedant1234591/prop
- Repository: https://github.com/vedant1234591/prop

## Overview

This is a construction-project marketplace with customer and seller accounts, competitive multi-round bidding, contract approval, and a vendor product-ordering flow. Customers submit projects; sellers bid and are selected; contracts proceed through party and admin review. Admins oversee marketplace activity, while vendors fulfill commerce orders. The map includes the documented automation, notifications, document generation, and upload capabilities. Source excerpts and the index establish many relationships; unsampled subsystems are represented only where their paths and purpose are supported.

Main entry points: [`services/statusAutomation.js`](https://github.com/vedant1234591/prop/blob/main/services/statusAutomation.js) (Status automation), [`app.js`](https://github.com/vedant1234591/prop/blob/main/app.js) (Express application), [`controllers/adminController.js`](https://github.com/vedant1234591/prop/blob/main/controllers/adminController.js) (Admin controller), [`controllers/customerController.js`](https://github.com/vedant1234591/prop/blob/main/controllers/customerController.js) (Customer project workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["Express application<br/>[app.js]"]
  node_auth_routes["Authentication routes<br/>[auth.js]"]
  node_customer_routes["Customer routes<br/>[customer.js]"]
  node_seller_routes["Seller routes<br/>[seller.js]"]
  node_vendor_routes["Vendor routes<br/>[vendor.js]"]
  node_admin_routes["Admin routes<br/>[admin.js]"]
end

subgraph group_identity["Accounts and administration"]
  node_auth_controller["Account controller<br/>[authController.js]"]
  node_admin_controller["Admin controller<br/>[adminController.js]"]
  node_user[("User profiles<br/>[User.js]")]
end

subgraph group_projects["Projects and contracts"]
  node_project_controller["Customer project workflow"]
  node_seller_controller["Seller bidding workflow"]
  node_project[("Projects<br/>[Project.js]")]
  node_bid[("Bids and rounds<br/>[Bid.js]")]
  node_contract[("Contracts<br/>[Contract.js]")]
  node_agreement[("Agreement templates<br/>[Agreement.js]")]
end

subgraph group_commerce["Vendor commerce"]
  node_commerce_controller["Vendor and order workflows"]
  node_order[("Orders<br/>[Order.js]")]
  node_product[("Products<br/>[Product.js]")]
  node_vendor[("Vendor profiles<br/>[Vendor.js]")]
end

subgraph group_services["Automation and services"]
  node_automation["Status automation"]
  node_pdf["PDF generation<br/>[pdfGenerator.js]"]
  node_email["Email notifications<br/>[emailServices.js]"]
  node_notice[("In-app notices<br/>[Notice.js]")]
  node_uploads["File uploads<br/>[upload.js]"]
  node_cloudinary["Cloudinary storage<br/>[cloudinary.js]"]
end

node_customers(("Customers"))
node_sellers(("Sellers"))
node_vendors(("Vendors"))
node_admins(("Admins"))

node_app -->|"mounts routes"| node_auth_routes
node_app -->|"mounts routes"| node_customer_routes
node_app -->|"mounts routes"| node_seller_routes
node_app -->|"mounts routes"| node_vendor_routes
node_app -->|"mounts routes"| node_admin_routes
node_auth_routes -->|"dispatches to"| node_auth_controller
node_customer_routes -->|"dispatches to"| node_project_controller
node_seller_routes -->|"dispatches to"| node_seller_controller
node_vendor_routes -->|"dispatches to"| node_commerce_controller
node_admin_routes -->|"dispatches to"| node_admin_controller
node_customers -.->|"uses"| node_customer_routes
node_sellers -.->|"uses"| node_seller_routes
node_vendors -.->|"uses"| node_vendor_routes
node_admins -.->|"uses"| node_admin_routes
node_auth_controller -->|"reads and updates"| node_user
node_project_controller -->|"creates and queries"| node_project
node_project_controller -->|"queries bids"| node_bid
node_project_controller -->|"queries contracts"| node_contract
node_project_controller -->|"uses agreements"| node_agreement
node_seller_controller -->|"queries projects"| node_project
node_seller_controller -->|"submits and revises"| node_bid
node_seller_controller -->|"updates contracts"| node_contract
node_seller_controller -->|"loads agreements"| node_agreement
node_admin_controller -->|"administers projects"| node_project
node_admin_controller -->|"administers bids"| node_bid
node_admin_controller -->|"reviews contracts"| node_contract
node_admin_controller -->|"manages accounts"| node_user
node_commerce_controller -->|"queries orders"| node_order
node_commerce_controller -->|"queries products"| node_product
node_commerce_controller -->|"queries vendors"| node_vendor
node_app -->|"starts automation"| node_automation
node_automation -->|"updates project states"| node_project
node_automation -->|"manages bid rounds"| node_bid
node_automation -->|"manages contracts"| node_contract
node_automation -->|"generates documents"| node_pdf
node_automation -->|"sends notifications"| node_email
node_automation -->|"creates notices"| node_notice
node_customer_routes -->|"uses upload middleware"| node_uploads
node_seller_routes -->|"uses upload middleware"| node_uploads
node_vendor_routes -->|"uses upload middleware"| node_uploads
node_uploads -->|"stores files"| node_cloudinary
node_contract -->|"references generator"| node_pdf

click node_app "https://github.com/vedant1234591/prop/blob/main/app.js"
click node_auth_routes "https://github.com/vedant1234591/prop/blob/main/routes/auth.js"
click node_customer_routes "https://github.com/vedant1234591/prop/blob/main/routes/customer.js"
click node_seller_routes "https://github.com/vedant1234591/prop/blob/main/routes/seller.js"
click node_vendor_routes "https://github.com/vedant1234591/prop/blob/main/routes/vendor.js"
click node_admin_routes "https://github.com/vedant1234591/prop/blob/main/routes/admin.js"
click node_auth_controller "https://github.com/vedant1234591/prop/blob/main/controllers/authController.js"
click node_admin_controller "https://github.com/vedant1234591/prop/blob/main/controllers/adminController.js"
click node_user "https://github.com/vedant1234591/prop/blob/main/models/User.js"
click node_project_controller "https://github.com/vedant1234591/prop/blob/main/controllers/customerController.js"
click node_seller_controller "https://github.com/vedant1234591/prop/blob/main/controllers/sellerController.js"
click node_project "https://github.com/vedant1234591/prop/blob/main/models/Project.js"
click node_bid "https://github.com/vedant1234591/prop/blob/main/models/Bid.js"
click node_contract "https://github.com/vedant1234591/prop/blob/main/models/Contract.js"
click node_agreement "https://github.com/vedant1234591/prop/blob/main/models/Agreement.js"
click node_commerce_controller "https://github.com/vedant1234591/prop/blob/main/controllers/vendorController.js"
click node_order "https://github.com/vedant1234591/prop/blob/main/models/Order.js"
click node_product "https://github.com/vedant1234591/prop/blob/main/models/Product.js"
click node_vendor "https://github.com/vedant1234591/prop/blob/main/models/Vendor.js"
click node_automation "https://github.com/vedant1234591/prop/blob/main/services/statusAutomation.js"
click node_pdf "https://github.com/vedant1234591/prop/blob/main/services/pdfGenerator.js"
click node_email "https://github.com/vedant1234591/prop/blob/main/services/emailServices.js"
click node_notice "https://github.com/vedant1234591/prop/blob/main/models/Notice.js"
click node_uploads "https://github.com/vedant1234591/prop/blob/main/middleware/upload.js"
click node_cloudinary "https://github.com/vedant1234591/prop/blob/main/config/cloudinary.js"

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_auth_routes,node_customer_routes,node_seller_routes,node_vendor_routes,node_admin_routes toneBlue
class node_auth_controller,node_admin_controller,node_user toneAmber
class node_project_controller,node_seller_controller,node_project,node_bid,node_contract,node_agreement toneMint
class node_commerce_controller,node_order,node_product,node_vendor toneRose
class node_automation,node_pdf,node_email,node_notice,node_uploads,node_cloudinary,node_customers,node_sellers,node_vendors,node_admins toneIndigo
```

## Components

### Application entry

- [Express application](https://github.com/vedant1234591/prop/blob/main/app.js): `app.js`
- [Authentication routes](https://github.com/vedant1234591/prop/blob/main/routes/auth.js): `routes/auth.js`
- [Customer routes](https://github.com/vedant1234591/prop/blob/main/routes/customer.js): `routes/customer.js`
- [Seller routes](https://github.com/vedant1234591/prop/blob/main/routes/seller.js): `routes/seller.js`
- [Vendor routes](https://github.com/vedant1234591/prop/blob/main/routes/vendor.js): `routes/vendor.js`
- [Admin routes](https://github.com/vedant1234591/prop/blob/main/routes/admin.js): `routes/admin.js`

### Accounts and administration

- [Account controller](https://github.com/vedant1234591/prop/blob/main/controllers/authController.js): `controllers/authController.js`
- [Admin controller](https://github.com/vedant1234591/prop/blob/main/controllers/adminController.js): `controllers/adminController.js`
- [User profiles](https://github.com/vedant1234591/prop/blob/main/models/User.js): `models/User.js`

### Projects and contracts

- [Customer project workflow](https://github.com/vedant1234591/prop/blob/main/controllers/customerController.js): `controllers/customerController.js`
- [Seller bidding workflow](https://github.com/vedant1234591/prop/blob/main/controllers/sellerController.js): `controllers/sellerController.js`
- [Projects](https://github.com/vedant1234591/prop/blob/main/models/Project.js): `models/Project.js`
- [Bids and rounds](https://github.com/vedant1234591/prop/blob/main/models/Bid.js): `models/Bid.js`
- [Contracts](https://github.com/vedant1234591/prop/blob/main/models/Contract.js): `models/Contract.js`
- [Agreement templates](https://github.com/vedant1234591/prop/blob/main/models/Agreement.js): `models/Agreement.js`

### Vendor commerce

- [Vendor and order workflows](https://github.com/vedant1234591/prop/blob/main/controllers/vendorController.js): `controllers/vendorController.js`
- [Orders](https://github.com/vedant1234591/prop/blob/main/models/Order.js): `models/Order.js`
- [Products](https://github.com/vedant1234591/prop/blob/main/models/Product.js): `models/Product.js`
- [Vendor profiles](https://github.com/vedant1234591/prop/blob/main/models/Vendor.js): `models/Vendor.js`

### Automation and services

- [Status automation](https://github.com/vedant1234591/prop/blob/main/services/statusAutomation.js): `services/statusAutomation.js`
- [PDF generation](https://github.com/vedant1234591/prop/blob/main/services/pdfGenerator.js): `services/pdfGenerator.js`
- [Email notifications](https://github.com/vedant1234591/prop/blob/main/services/emailServices.js): `services/emailServices.js`
- [In-app notices](https://github.com/vedant1234591/prop/blob/main/models/Notice.js): `models/Notice.js`
- [File uploads](https://github.com/vedant1234591/prop/blob/main/middleware/upload.js): `middleware/upload.js`
- [Cloudinary storage](https://github.com/vedant1234591/prop/blob/main/config/cloudinary.js): `config/cloudinary.js`

### Other components

- **Customers**
- **Sellers**
- **Vendors**
- **Admins**

## Connections

- Express application → Authentication routes: mounts routes (evidence: `app.js`)
- Express application → Customer routes: mounts routes (evidence: `app.js`)
- Express application → Seller routes: mounts routes (evidence: `app.js`)
- Express application → Vendor routes: mounts routes (evidence: `app.js`)
- Express application → Admin routes: mounts routes (evidence: `app.js`)
- Authentication routes → Account controller: dispatches to (evidence: `routes/auth.js`)
- Customer routes → Customer project workflow: dispatches to (evidence: `routes/customer.js`)
- Seller routes → Seller bidding workflow: dispatches to (evidence: `routes/seller.js`)
- Vendor routes → Vendor and order workflows: dispatches to (evidence: `routes/vendor.js`)
- Admin routes → Admin controller: dispatches to (evidence: `routes/admin.js`)
- Customers → Customer routes: uses
- Sellers → Seller routes: uses
- Vendors → Vendor routes: uses
- Admins → Admin routes: uses
- Account controller → User profiles: reads and updates (evidence: `controllers/authController.js`)
- Customer project workflow → Projects: creates and queries (evidence: `controllers/customerController.js`)
- Customer project workflow → Bids and rounds: queries bids (evidence: `controllers/customerController.js`)
- Customer project workflow → Contracts: queries contracts (evidence: `controllers/customerController.js`)
- Customer project workflow → Agreement templates: uses agreements (evidence: `controllers/customerController.js`)
- Seller bidding workflow → Projects: queries projects (evidence: `controllers/sellerController.js`)
- Seller bidding workflow → Bids and rounds: submits and revises (evidence: `controllers/sellerController.js`)
- Seller bidding workflow → Contracts: updates contracts (evidence: `controllers/sellerController.js`)
- Seller bidding workflow → Agreement templates: loads agreements (evidence: `controllers/sellerController.js`)
- Admin controller → Projects: administers projects (evidence: `controllers/adminController.js`)
- Admin controller → Bids and rounds: administers bids (evidence: `controllers/adminController.js`)
- Admin controller → Contracts: reviews contracts (evidence: `controllers/adminController.js`)
- Admin controller → User profiles: manages accounts (evidence: `controllers/adminController.js`)
- Vendor and order workflows → Orders: queries orders (evidence: `controllers/vendorController.js`)
- Vendor and order workflows → Products: queries products (evidence: `controllers/vendorController.js`)
- Vendor and order workflows → Vendor profiles: queries vendors (evidence: `controllers/vendorController.js`)
- Express application → Status automation: starts automation (evidence: `app.js`)
- Status automation → Projects: updates project states (evidence: `services/statusAutomation.js`)
- Status automation → Bids and rounds: manages bid rounds (evidence: `services/statusAutomation.js`)
- Status automation → Contracts: manages contracts (evidence: `services/statusAutomation.js`)
- Status automation → PDF generation: generates documents (evidence: `services/statusAutomation.js`)
- Status automation → Email notifications: sends notifications (evidence: `services/statusAutomation.js`)
- Status automation → In-app notices: creates notices (evidence: `services/statusAutomation.js`)
- Customer routes → File uploads: uses upload middleware (evidence: `routes/customer.js`)
- Seller routes → File uploads: uses upload middleware (evidence: `routes/seller.js`)
- Vendor routes → File uploads: uses upload middleware (evidence: `routes/vendor.js`)
- File uploads → Cloudinary storage: stores files (evidence: `middleware/upload.js`)
- Contracts → PDF generation: references generator (evidence: `models/Contract.js`)
