# mavinothkumar/frontend-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/mavinothkumar/frontend-dashboard
- Repository: https://github.com/mavinothkumar/frontend-dashboard

## Overview

Frontend Dashboard is a WordPress plugin for configuring role-aware frontend dashboards and letting users authenticate, manage profiles, and work with posts through shortcode-backed pages. Administrators configure roles, menus, profile/post fields, and templates; frontend users then access permitted dashboard functions. The tree and README establish those product stages, while the SOURCE INDEX confirms selected internal registrations and calls. Many legacy and newer modules were not sampled, so edges for those workflows rely on README statements rather than inferred implementation details.

Main entry points: [`src/Api/ApiManager.php`](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Api/ApiManager.php) (REST API registration), [`includes/shortcodes`](https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/shortcodes) (Shortcode entrypoints), [`src/Api/Endpoints/PaymentWebhookEndpoint.php`](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Api/Endpoints/PaymentWebhookEndpoint.php) (Payment webhook), [`includes/admin/layout/settings_tab`](https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/admin/layout/settings_tab) (Admin configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_shortcodes["Shortcode entrypoints"]
  node_shortcode_controller["Shortcode controller"]
  node_templates["Frontend templates"]
  node_auth["Login and registration"]
  node_profile["User profiles"]
  node_posts["Frontend posts<br/>[PostEndpoints.php]"]
  node_dashboard_menu["Role-aware menus<br/>[MenuRepository.php]"]
end

subgraph group_admin["Dashboard administration"]
  node_admin_settings["Admin configuration"]
  node_field_builder["Profile and post fields"]
  node_admin_menu["Admin menu"]
  node_overview["Dashboard overview"]
end

subgraph group_core["Runtime services"]
  node_rbac["Role access control<br/>[RbacManager.php]"]
  node_api_routes["REST API registration<br/>[ApiManager.php]"]
  node_request["HTTP request handling<br/>[Request.php]"]
  node_menu_storage[("Menu repository<br/>[MenuRepository.php]")]
  node_profile_storage[("Profile repository")]
end

subgraph group_commerce["Payments and licensing"]
  node_payments["Payment gateways"]
  node_payment_webhook["Payment webhook"]
  node_licensing["Addon licensing<br/>[LicenseManager.php]"]
end

node_wp_user(("WordPress user"))

node_wp_user -->|"uses dashboard"| node_shortcodes
node_shortcodes -.->|"dispatches"| node_shortcode_controller
node_shortcode_controller -->|"loads templates"| node_templates
node_shortcodes -->|"opens auth forms"| node_auth
node_wp_user -->|"signs in or registers"| node_auth
node_wp_user -->|"manages profile"| node_profile
node_wp_user -->|"manages posts"| node_posts
node_wp_user -->|"views permitted menus"| node_dashboard_menu
node_admin_settings -->|"configures menus"| node_dashboard_menu
node_admin_settings -->|"sets role access"| node_rbac
node_field_builder -->|"defines profile fields"| node_profile
node_field_builder -->|"defines post fields"| node_posts
node_admin_menu -.->|"opens overview"| node_overview
node_overview -->|"counts menus"| node_menu_storage
node_api_routes -->|"injects repository"| node_menu_storage
node_api_routes -->|"injects repository"| node_profile_storage
node_api_routes -->|"registers endpoint"| node_payment_webhook
node_payment_webhook -->|"reads request"| node_request
node_payment_webhook -->|"dispatches webhook"| node_payments
node_payments -.->|"supports payment flows"| node_wp_user
node_licensing -.->|"administers addon keys"| node_wp_user

click node_shortcodes "https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/shortcodes"
click node_shortcode_controller "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Controllers/Shortcode/ShortcodeController.php"
click node_templates "https://github.com/mavinothkumar/frontend-dashboard/tree/master/templates"
click node_auth "https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/frontend/request/login"
click node_profile "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Controllers/User/UserProfileController.php"
click node_posts "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Api/Endpoints/PostEndpoints.php"
click node_dashboard_menu "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Database/Repositories/MenuRepository.php"
click node_admin_settings "https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/admin/layout/settings_tab"
click node_field_builder "https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/admin/layout/input_fields"
click node_admin_menu "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Controllers/Admin/AdminMenuController.php"
click node_overview "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Controllers/Admin/DashboardOverviewController.php"
click node_rbac "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Security/RbacManager.php"
click node_api_routes "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Api/ApiManager.php"
click node_request "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Http/Request.php"
click node_menu_storage "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Database/Repositories/MenuRepository.php"
click node_profile_storage "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Database/Repositories/UserProfileRepository.php"
click node_payments "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Services/Payments/PaymentGatewayManager.php"
click node_payment_webhook "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Api/Endpoints/PaymentWebhookEndpoint.php"
click node_licensing "https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Licensing/LicenseManager.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_shortcodes,node_shortcode_controller,node_templates,node_auth,node_profile,node_posts,node_dashboard_menu,node_wp_user toneBlue
class node_admin_settings,node_field_builder,node_admin_menu,node_overview toneAmber
class node_rbac,node_api_routes,node_request,node_menu_storage,node_profile_storage toneMint
class node_payments,node_payment_webhook,node_licensing toneRose
```

## Components

### Frontend experience

- [Shortcode entrypoints](https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/shortcodes): `includes/shortcodes`
- [Shortcode controller](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Controllers/Shortcode/ShortcodeController.php): `src/Controllers/Shortcode/ShortcodeController.php`
- [Frontend templates](https://github.com/mavinothkumar/frontend-dashboard/tree/master/templates): `templates`
- [Login and registration](https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/frontend/request/login): `includes/frontend/request/login`
- [User profiles](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Controllers/User/UserProfileController.php): `src/Controllers/User/UserProfileController.php`
- [Frontend posts](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Api/Endpoints/PostEndpoints.php): `src/Api/Endpoints/PostEndpoints.php`
- [Role-aware menus](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Database/Repositories/MenuRepository.php): `src/Database/Repositories/MenuRepository.php`

### Dashboard administration

- [Admin configuration](https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/admin/layout/settings_tab): `includes/admin/layout/settings_tab`
- [Profile and post fields](https://github.com/mavinothkumar/frontend-dashboard/tree/master/includes/admin/layout/input_fields): `includes/admin/layout/input_fields`
- [Admin menu](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Controllers/Admin/AdminMenuController.php): `src/Controllers/Admin/AdminMenuController.php`
- [Dashboard overview](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Controllers/Admin/DashboardOverviewController.php): `src/Controllers/Admin/DashboardOverviewController.php`

### Runtime services

- [Role access control](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Security/RbacManager.php): `src/Security/RbacManager.php`
- [REST API registration](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Api/ApiManager.php): `src/Api/ApiManager.php`
- [HTTP request handling](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Http/Request.php): `src/Http/Request.php`
- [Menu repository](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Database/Repositories/MenuRepository.php): `src/Database/Repositories/MenuRepository.php`
- [Profile repository](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Database/Repositories/UserProfileRepository.php): `src/Database/Repositories/UserProfileRepository.php`

### Payments and licensing

- [Payment gateways](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Services/Payments/PaymentGatewayManager.php): `src/Services/Payments/PaymentGatewayManager.php`
- [Payment webhook](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Api/Endpoints/PaymentWebhookEndpoint.php): `src/Api/Endpoints/PaymentWebhookEndpoint.php`
- [Addon licensing](https://github.com/mavinothkumar/frontend-dashboard/blob/master/src/Licensing/LicenseManager.php): `src/Licensing/LicenseManager.php`

### Other components

- **WordPress user**

## Connections

- WordPress user → Shortcode entrypoints: uses dashboard (evidence: `README.md`)
- Shortcode entrypoints → Shortcode controller: dispatches
- Shortcode controller → Frontend templates: loads templates (evidence: `src/Controllers/Shortcode/ShortcodeController.php`)
- Shortcode entrypoints → Login and registration: opens auth forms (evidence: `README.md`)
- WordPress user → Login and registration: signs in or registers (evidence: `README.md`)
- WordPress user → User profiles: manages profile (evidence: `README.md`)
- WordPress user → Frontend posts: manages posts (evidence: `README.md`)
- WordPress user → Role-aware menus: views permitted menus (evidence: `README.md`)
- Admin configuration → Role-aware menus: configures menus (evidence: `README.md`)
- Admin configuration → Role access control: sets role access (evidence: `README.md`)
- Profile and post fields → User profiles: defines profile fields (evidence: `README.md`)
- Profile and post fields → Frontend posts: defines post fields (evidence: `README.md`)
- Admin menu → Dashboard overview: opens overview
- Dashboard overview → Menu repository: counts menus (evidence: `src/Controllers/Admin/DashboardOverviewController.php`)
- REST API registration → Menu repository: injects repository (evidence: `src/Api/ApiManager.php`)
- REST API registration → Profile repository: injects repository (evidence: `src/Api/ApiManager.php`)
- REST API registration → Payment webhook: registers endpoint (evidence: `src/Api/ApiManager.php`)
- Payment webhook → HTTP request handling: reads request (evidence: `src/Api/Endpoints/PaymentWebhookEndpoint.php`)
- Payment webhook → Payment gateways: dispatches webhook (evidence: `src/Api/Endpoints/PaymentWebhookEndpoint.php`)
- Payment gateways → WordPress user: supports payment flows
- Addon licensing → WordPress user: administers addon keys
