# sanaanidhal/kpi-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/sanaanidhal/kpi-dashboard
- Repository: https://github.com/sanaanidhal/kpi-dashboard

## Overview

This is a Laravel KPI dashboard for Sup'Com Junior Enterprise. Users authenticate, then view read-only performance charts, projects and tasks; administrators additionally manage KPI records, projects, tasks and users. The sampled controllers show dashboard aggregation from Eloquent models and rendering of separate admin/user views, while the README documents role-based access and profile management. Some route wiring and view-side chart behavior were not sampled, so relationships without direct evidence are omitted.

Main entry points: [`app/Http/Controllers/UserController.php`](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/UserController.php) (User Dashboard Logic), [`app/Http/Controllers/AdminController.php`](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/AdminController.php) (Admin Dashboard Logic), [`routes/auth.php`](https://github.com/sanaanidhal/kpi-dashboard/blob/main/routes/auth.php) (Auth Routes), [`app/Http/Controllers/Auth/AuthenticatedSessionController.php`](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php) (Session Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and Profiles"]
  node_auth_routes["Auth Routes<br/>[auth.php]"]
  node_login["Session Login"]
  node_login_request["Login Validation<br/>[LoginRequest.php]"]
  node_registration["Registration"]
  node_users[("User Accounts<br/>[User.php]")]
  node_profile["Profile Management"]
end

subgraph group_dashboards["KPI Dashboards"]
  node_user_dashboard_logic["User Dashboard Logic<br/>[UserController.php]"]
  node_user_dashboard["User Dashboard"]
  node_admin_dashboard_logic["Admin Dashboard Logic"]
  node_admin_dashboard["Admin Dashboard"]
end

subgraph group_management["Admin Management"]
  node_admin_edits["KPI and Work Editing"]
  node_edit_views["Admin Edit Views"]
  node_user_admin["User Administration"]
end

subgraph group_domain["KPI and Work Data"]
  node_projects[("Projects<br/>[Project.php]")]
  node_tasks[("Tasks<br/>[Task.php]")]
  node_monthly_kpi[("Monthly Task KPI<br/>[Premier.php]")]
  node_skills_kpi[("Skills KPI<br/>[Second.php]")]
  node_external_kpi[("External KPI<br/>[Externe.php]")]
  node_mobile_kpi[("Mobile KPI<br/>[Mobile.php]")]
end

node_visitor(("Visitor / User"))

node_visitor -->|"starts authentication"| node_auth_routes
node_auth_routes -->|"routes login"| node_login
node_auth_routes -->|"routes registration"| node_registration
node_login -->|"authenticates with"| node_login_request
node_login -.->|"checks account role"| node_users
node_registration -->|"creates account"| node_users
node_auth_routes -.->|"routes dashboard"| node_user_dashboard_logic
node_user_dashboard_logic -->|"reads monthly KPI"| node_monthly_kpi
node_user_dashboard_logic -->|"reads skills KPI"| node_skills_kpi
node_user_dashboard_logic -->|"reads external KPI"| node_external_kpi
node_user_dashboard_logic -->|"reads mobile KPI"| node_mobile_kpi
node_user_dashboard_logic -->|"reads projects"| node_projects
node_user_dashboard_logic -->|"reads tasks"| node_tasks
node_user_dashboard_logic -->|"renders view"| node_user_dashboard
node_admin_dashboard_logic -->|"reads monthly KPI"| node_monthly_kpi
node_admin_dashboard_logic -->|"reads skills KPI"| node_skills_kpi
node_admin_dashboard_logic -->|"reads external KPI"| node_external_kpi
node_admin_dashboard_logic -->|"reads mobile KPI"| node_mobile_kpi
node_admin_dashboard_logic -->|"reads projects"| node_projects
node_admin_dashboard_logic -->|"reads tasks"| node_tasks
node_admin_dashboard_logic -->|"renders view"| node_admin_dashboard
node_admin_edits -->|"updates KPI"| node_monthly_kpi
node_admin_edits -->|"updates KPI"| node_skills_kpi
node_admin_edits -->|"updates KPI"| node_external_kpi
node_admin_edits -->|"updates KPI"| node_mobile_kpi
node_admin_edits -->|"updates projects"| node_projects
node_admin_edits -->|"updates tasks"| node_tasks
node_admin_edits -->|"renders edit views"| node_edit_views
node_user_admin -.->|"manages accounts"| node_users

click node_auth_routes "https://github.com/sanaanidhal/kpi-dashboard/blob/main/routes/auth.php"
click node_login "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_login_request "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Requests/Auth/LoginRequest.php"
click node_registration "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_users "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/User.php"
click node_profile "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/ProfileController.php"
click node_user_dashboard_logic "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/UserController.php"
click node_user_dashboard "https://github.com/sanaanidhal/kpi-dashboard/blob/main/resources/views/dashboard.blade.php"
click node_admin_dashboard_logic "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/AdminController.php"
click node_admin_dashboard "https://github.com/sanaanidhal/kpi-dashboard/blob/main/resources/views/admin/admin_dashboard.blade.php"
click node_projects "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Project.php"
click node_tasks "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Task.php"
click node_monthly_kpi "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Premier.php"
click node_skills_kpi "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Second.php"
click node_external_kpi "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Externe.php"
click node_mobile_kpi "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Mobile.php"
click node_admin_edits "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/AdminController.php"
click node_edit_views "https://github.com/sanaanidhal/kpi-dashboard/tree/main/resources/views/admin/edit"
click node_user_admin "https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/AdminController.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_auth_routes,node_login,node_login_request,node_registration,node_users,node_profile,node_visitor toneBlue
class node_user_dashboard_logic,node_user_dashboard,node_admin_dashboard_logic,node_admin_dashboard toneAmber
class node_admin_edits,node_edit_views,node_user_admin toneMint
class node_projects,node_tasks,node_monthly_kpi,node_skills_kpi,node_external_kpi,node_mobile_kpi toneRose
```

## Components

### Identity and Profiles

- [Auth Routes](https://github.com/sanaanidhal/kpi-dashboard/blob/main/routes/auth.php): `routes/auth.php`
- [Session Login](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Login Validation](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Requests/Auth/LoginRequest.php): `app/Http/Requests/Auth/LoginRequest.php`
- [Registration](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [User Accounts](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/User.php): `app/Models/User.php`
- [Profile Management](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/ProfileController.php): `app/Http/Controllers/ProfileController.php`

### KPI Dashboards

- [User Dashboard Logic](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [User Dashboard](https://github.com/sanaanidhal/kpi-dashboard/blob/main/resources/views/dashboard.blade.php): `resources/views/dashboard.blade.php`
- [Admin Dashboard Logic](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`
- [Admin Dashboard](https://github.com/sanaanidhal/kpi-dashboard/blob/main/resources/views/admin/admin_dashboard.blade.php): `resources/views/admin/admin_dashboard.blade.php`

### Admin Management

- [KPI and Work Editing](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`
- [Admin Edit Views](https://github.com/sanaanidhal/kpi-dashboard/tree/main/resources/views/admin/edit): `resources/views/admin/edit`
- [User Administration](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`

### KPI and Work Data

- [Projects](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Project.php): `app/Models/Project.php`
- [Tasks](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Task.php): `app/Models/Task.php`
- [Monthly Task KPI](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Premier.php): `app/Models/Premier.php`
- [Skills KPI](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Second.php): `app/Models/Second.php`
- [External KPI](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Externe.php): `app/Models/Externe.php`
- [Mobile KPI](https://github.com/sanaanidhal/kpi-dashboard/blob/main/app/Models/Mobile.php): `app/Models/Mobile.php`

### Other components

- **Visitor / User**

## Connections

- Visitor / User → Auth Routes: starts authentication (evidence: `routes/auth.php`)
- Auth Routes → Session Login: routes login (evidence: `routes/auth.php`)
- Auth Routes → Registration: routes registration (evidence: `routes/auth.php`)
- Session Login → Login Validation: authenticates with (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Session Login → User Accounts: checks account role (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Registration → User Accounts: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Auth Routes → User Dashboard Logic: routes dashboard
- User Dashboard Logic → Monthly Task KPI: reads monthly KPI (evidence: `app/Http/Controllers/UserController.php`)
- User Dashboard Logic → Skills KPI: reads skills KPI (evidence: `app/Http/Controllers/UserController.php`)
- User Dashboard Logic → External KPI: reads external KPI (evidence: `app/Http/Controllers/UserController.php`)
- User Dashboard Logic → Mobile KPI: reads mobile KPI (evidence: `app/Http/Controllers/UserController.php`)
- User Dashboard Logic → Projects: reads projects (evidence: `app/Http/Controllers/UserController.php`)
- User Dashboard Logic → Tasks: reads tasks (evidence: `app/Http/Controllers/UserController.php`)
- User Dashboard Logic → User Dashboard: renders view (evidence: `app/Http/Controllers/UserController.php`)
- Admin Dashboard Logic → Monthly Task KPI: reads monthly KPI (evidence: `app/Http/Controllers/AdminController.php`)
- Admin Dashboard Logic → Skills KPI: reads skills KPI (evidence: `app/Http/Controllers/AdminController.php`)
- Admin Dashboard Logic → External KPI: reads external KPI (evidence: `app/Http/Controllers/AdminController.php`)
- Admin Dashboard Logic → Mobile KPI: reads mobile KPI (evidence: `app/Http/Controllers/AdminController.php`)
- Admin Dashboard Logic → Projects: reads projects (evidence: `app/Http/Controllers/AdminController.php`)
- Admin Dashboard Logic → Tasks: reads tasks (evidence: `app/Http/Controllers/AdminController.php`)
- Admin Dashboard Logic → Admin Dashboard: renders view (evidence: `app/Http/Controllers/AdminController.php`)
- KPI and Work Editing → Monthly Task KPI: updates KPI (evidence: `app/Http/Controllers/AdminController.php`)
- KPI and Work Editing → Skills KPI: updates KPI (evidence: `app/Http/Controllers/AdminController.php`)
- KPI and Work Editing → External KPI: updates KPI (evidence: `app/Http/Controllers/AdminController.php`)
- KPI and Work Editing → Mobile KPI: updates KPI (evidence: `app/Http/Controllers/AdminController.php`)
- KPI and Work Editing → Projects: updates projects (evidence: `app/Http/Controllers/AdminController.php`)
- KPI and Work Editing → Tasks: updates tasks (evidence: `app/Http/Controllers/AdminController.php`)
- KPI and Work Editing → Admin Edit Views: renders edit views (evidence: `app/Http/Controllers/AdminController.php`)
- User Administration → User Accounts: manages accounts (evidence: `app/Http/Controllers/AdminController.php`)
