# ayman240p/proventure architecture

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

- Interactive diagram: https://gitdiagram.com/ayman240p/proventure
- Repository: https://github.com/ayman240p/proventure

## Overview

ProVenture is a Malaysian freelance and micro-services marketplace. The main flow is users browsing or searching listings, opening a service detail page, and contacting providers directly; freelancers create and manage listings, while administrators moderate them. The application is PHP page-oriented, with shared session/access helpers and a PDO connection to MySQL. The README is empty, so capability coverage is based on the tree and SOURCE INDEX; several subsystems are documented there but their implementation was not sampled, so their internal links are omitted.

Main entry points: [`config/database.php`](https://github.com/ayman240p/proventure/blob/main/config/database.php) (PDO Connection), [`includes/auth.php`](https://github.com/ayman240p/proventure/blob/main/includes/auth.php) (Access Control), [`freelancer/add-service.php`](https://github.com/ayman240p/proventure/blob/main/freelancer/add-service.php) (Manage Listings), [`index.php`](https://github.com/ayman240p/proventure/blob/main/index.php) (Browse Listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_marketplace["Marketplace"]
  node_browse["Browse Listings<br/>[index.php]"]
  node_search["Search Services<br/>[search.php]"]
  node_service["Service Details<br/>[service.php]"]
  node_reviews["Reviews<br/>[review.php]"]
  node_report["Report Listing<br/>[report_service.php]"]
  node_whatsapp["WhatsApp Contact<br/>[whatsapp.php]"]
  node_guide["Buyer Guides<br/>[guide.php]"]
  node_chatbot["Chatbot<br/>[chatbot.php]"]
end

subgraph group_accounts["Accounts and Listings"]
  node_accounts["Sign-in and Registration<br/>[login.php]"]
  node_register["User Registration<br/>[register.php]"]
  node_client["Client Dashboard<br/>[dashboard.php]"]
  node_freelancer["Freelancer Dashboard<br/>[dashboard.php]"]
  node_listing["Manage Listings<br/>[add-service.php]"]
  node_profile["Freelancer Profile<br/>[profile.php]"]
end

subgraph group_administration["Administration"]
  node_admin_dashboard["Admin Dashboard<br/>[dashboard.php]"]
  node_moderation["Service Moderation<br/>[services.php]"]
  node_admin_reports["Reports Management<br/>[reports.php]"]
  node_admin_reviews["Review Management<br/>[reviews.php]"]
  node_admin_settings["Platform Settings<br/>[settings.php]"]
  node_admin_users["User Management<br/>[users.php]"]
  node_admin_logs["Activity Logs<br/>[activity-logs.php]"]
end

subgraph group_shared["Shared Runtime"]
  node_shared_auth["Access Control<br/>[auth.php]"]
  node_shared_helpers["Shared Helpers<br/>[functions.php]"]
  node_shared_logger["Admin Activity Logging<br/>[logger.php]"]
  node_database_connector["PDO Connection<br/>[database.php]"]
  node_shared_header["Shared Navigation<br/>[header.php]"]
  node_shared_footer["Shared Footer<br/>[footer.php]"]
end

node_visitor(("Visitor or User"))
node_mysql[("MySQL Database")]

node_visitor -->|"browses"| node_browse
node_visitor -->|"searches"| node_search
node_visitor -->|"opens listing"| node_service
node_visitor -->|"signs in"| node_accounts
node_visitor -->|"registers"| node_register
node_visitor -->|"reads guides"| node_guide
node_browse -->|"loads listings"| node_database_connector
node_search -->|"queries listings"| node_database_connector
node_service -->|"loads details"| node_database_connector
node_reviews -->|"writes review"| node_database_connector
node_report -->|"stores report"| node_database_connector
node_accounts -->|"checks access"| node_shared_auth
node_register -->|"uses sessions"| node_shared_auth
node_client -->|"guards role"| node_shared_auth
node_freelancer -->|"guards role"| node_shared_auth
node_listing -->|"guards role"| node_shared_auth
node_listing -->|"creates listing"| node_database_connector
node_listing -->|"reads settings"| node_shared_helpers
node_admin_dashboard -->|"guards role"| node_shared_auth
node_moderation -->|"updates listings"| node_database_connector
node_moderation -->|"records actions"| node_shared_logger
node_admin_reviews -->|"manages reviews"| node_database_connector
node_admin_reviews -->|"records actions"| node_shared_logger
node_admin_settings -->|"updates settings"| node_shared_helpers
node_admin_logs -->|"reads activity"| node_shared_logger
node_database_connector -->|"connects to"| node_mysql
node_browse -->|"renders navigation"| node_shared_header
node_service -->|"renders footer"| node_shared_footer
node_shared_footer -->|"includes widget"| node_chatbot

click node_browse "https://github.com/ayman240p/proventure/blob/main/index.php"
click node_search "https://github.com/ayman240p/proventure/blob/main/search.php"
click node_service "https://github.com/ayman240p/proventure/blob/main/service.php"
click node_reviews "https://github.com/ayman240p/proventure/blob/main/review.php"
click node_report "https://github.com/ayman240p/proventure/blob/main/report_service.php"
click node_whatsapp "https://github.com/ayman240p/proventure/blob/main/whatsapp.php"
click node_guide "https://github.com/ayman240p/proventure/blob/main/guide.php"
click node_chatbot "https://github.com/ayman240p/proventure/blob/main/includes/chatbot.php"
click node_accounts "https://github.com/ayman240p/proventure/blob/main/login.php"
click node_register "https://github.com/ayman240p/proventure/blob/main/register.php"
click node_client "https://github.com/ayman240p/proventure/blob/main/client/dashboard.php"
click node_freelancer "https://github.com/ayman240p/proventure/blob/main/freelancer/dashboard.php"
click node_listing "https://github.com/ayman240p/proventure/blob/main/freelancer/add-service.php"
click node_profile "https://github.com/ayman240p/proventure/blob/main/freelancer/profile.php"
click node_admin_dashboard "https://github.com/ayman240p/proventure/blob/main/admin/dashboard.php"
click node_moderation "https://github.com/ayman240p/proventure/blob/main/admin/services.php"
click node_admin_reports "https://github.com/ayman240p/proventure/blob/main/admin/reports.php"
click node_admin_reviews "https://github.com/ayman240p/proventure/blob/main/admin/reviews.php"
click node_admin_settings "https://github.com/ayman240p/proventure/blob/main/admin/settings.php"
click node_admin_users "https://github.com/ayman240p/proventure/blob/main/admin/users.php"
click node_admin_logs "https://github.com/ayman240p/proventure/blob/main/admin/activity-logs.php"
click node_shared_auth "https://github.com/ayman240p/proventure/blob/main/includes/auth.php"
click node_shared_helpers "https://github.com/ayman240p/proventure/blob/main/includes/functions.php"
click node_shared_logger "https://github.com/ayman240p/proventure/blob/main/includes/logger.php"
click node_database_connector "https://github.com/ayman240p/proventure/blob/main/config/database.php"
click node_shared_header "https://github.com/ayman240p/proventure/blob/main/includes/header.php"
click node_shared_footer "https://github.com/ayman240p/proventure/blob/main/includes/footer.php"

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_browse,node_search,node_service,node_reviews,node_report,node_whatsapp,node_guide,node_chatbot,node_visitor toneBlue
class node_accounts,node_register,node_client,node_freelancer,node_listing,node_profile,node_mysql toneAmber
class node_admin_dashboard,node_moderation,node_admin_reports,node_admin_reviews,node_admin_settings,node_admin_users,node_admin_logs toneMint
class node_shared_auth,node_shared_helpers,node_shared_logger,node_database_connector,node_shared_header,node_shared_footer toneRose
```

## Components

### Marketplace

- [Browse Listings](https://github.com/ayman240p/proventure/blob/main/index.php): `index.php`
- [Search Services](https://github.com/ayman240p/proventure/blob/main/search.php): `search.php`
- [Service Details](https://github.com/ayman240p/proventure/blob/main/service.php): `service.php`
- [Reviews](https://github.com/ayman240p/proventure/blob/main/review.php): `review.php`
- [Report Listing](https://github.com/ayman240p/proventure/blob/main/report_service.php): `report_service.php`
- [WhatsApp Contact](https://github.com/ayman240p/proventure/blob/main/whatsapp.php): `whatsapp.php`
- [Buyer Guides](https://github.com/ayman240p/proventure/blob/main/guide.php): `guide.php`
- [Chatbot](https://github.com/ayman240p/proventure/blob/main/includes/chatbot.php): `includes/chatbot.php`

### Accounts and Listings

- [Sign-in and Registration](https://github.com/ayman240p/proventure/blob/main/login.php): `login.php`
- [User Registration](https://github.com/ayman240p/proventure/blob/main/register.php): `register.php`
- [Client Dashboard](https://github.com/ayman240p/proventure/blob/main/client/dashboard.php): `client/dashboard.php`
- [Freelancer Dashboard](https://github.com/ayman240p/proventure/blob/main/freelancer/dashboard.php): `freelancer/dashboard.php`
- [Manage Listings](https://github.com/ayman240p/proventure/blob/main/freelancer/add-service.php): `freelancer/add-service.php`
- [Freelancer Profile](https://github.com/ayman240p/proventure/blob/main/freelancer/profile.php): `freelancer/profile.php`

### Administration

- [Admin Dashboard](https://github.com/ayman240p/proventure/blob/main/admin/dashboard.php): `admin/dashboard.php`
- [Service Moderation](https://github.com/ayman240p/proventure/blob/main/admin/services.php): `admin/services.php`
- [Reports Management](https://github.com/ayman240p/proventure/blob/main/admin/reports.php): `admin/reports.php`
- [Review Management](https://github.com/ayman240p/proventure/blob/main/admin/reviews.php): `admin/reviews.php`
- [Platform Settings](https://github.com/ayman240p/proventure/blob/main/admin/settings.php): `admin/settings.php`
- [User Management](https://github.com/ayman240p/proventure/blob/main/admin/users.php): `admin/users.php`
- [Activity Logs](https://github.com/ayman240p/proventure/blob/main/admin/activity-logs.php): `admin/activity-logs.php`

### Shared Runtime

- [Access Control](https://github.com/ayman240p/proventure/blob/main/includes/auth.php): `includes/auth.php`
- [Shared Helpers](https://github.com/ayman240p/proventure/blob/main/includes/functions.php): `includes/functions.php`
- [Admin Activity Logging](https://github.com/ayman240p/proventure/blob/main/includes/logger.php): `includes/logger.php`
- [PDO Connection](https://github.com/ayman240p/proventure/blob/main/config/database.php): `config/database.php`
- [Shared Navigation](https://github.com/ayman240p/proventure/blob/main/includes/header.php): `includes/header.php`
- [Shared Footer](https://github.com/ayman240p/proventure/blob/main/includes/footer.php): `includes/footer.php`

### Other components

- **Visitor or User**
- **MySQL Database**

## Connections

- Visitor or User → Browse Listings: browses (evidence: `index.php`)
- Visitor or User → Search Services: searches (evidence: `search.php`)
- Visitor or User → Service Details: opens listing (evidence: `service.php`)
- Visitor or User → Sign-in and Registration: signs in (evidence: `login.php`)
- Visitor or User → User Registration: registers (evidence: `register.php`)
- Visitor or User → Buyer Guides: reads guides (evidence: `guide.php`)
- Browse Listings → PDO Connection: loads listings (evidence: `index.php`)
- Search Services → PDO Connection: queries listings (evidence: `search.php`)
- Service Details → PDO Connection: loads details (evidence: `service.php`)
- Reviews → PDO Connection: writes review (evidence: `review.php`)
- Report Listing → PDO Connection: stores report (evidence: `report_service.php`)
- Sign-in and Registration → Access Control: checks access (evidence: `login.php`)
- User Registration → Access Control: uses sessions (evidence: `register.php`)
- Client Dashboard → Access Control: guards role (evidence: `client/dashboard.php`)
- Freelancer Dashboard → Access Control: guards role (evidence: `freelancer/dashboard.php`)
- Manage Listings → Access Control: guards role (evidence: `freelancer/add-service.php`)
- Manage Listings → PDO Connection: creates listing (evidence: `freelancer/add-service.php`)
- Manage Listings → Shared Helpers: reads settings (evidence: `freelancer/add-service.php`)
- Admin Dashboard → Access Control: guards role (evidence: `admin/dashboard.php`)
- Service Moderation → PDO Connection: updates listings (evidence: `admin/services.php`)
- Service Moderation → Admin Activity Logging: records actions (evidence: `admin/services.php`)
- Review Management → PDO Connection: manages reviews (evidence: `admin/reviews.php`)
- Review Management → Admin Activity Logging: records actions (evidence: `admin/reviews.php`)
- Platform Settings → Shared Helpers: updates settings (evidence: `includes/functions.php`)
- Activity Logs → Admin Activity Logging: reads activity (evidence: `admin/activity-logs.php`)
- PDO Connection → MySQL Database: connects to (evidence: `config/database.php`)
- Browse Listings → Shared Navigation: renders navigation (evidence: `index.php`)
- Service Details → Shared Footer: renders footer (evidence: `service.php`)
- Shared Footer → Chatbot: includes widget (evidence: `includes/footer.php`)
