# jhonatanquilca/driveworkhouse architecture

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

- Interactive diagram: https://gitdiagram.com/jhonatanquilca/driveworkhouse
- Repository: https://github.com/jhonatanquilca/driveworkhouse

## Overview

This is a Yii 1.1 web application for managing customers, activities, collections, and mobile users, with Cruge providing authentication and role-based access. The main user workflow is accessing the application through its configured modules, using Cruge’s login and access-management features, then working with customer and collections records. The tree also shows Bootstrap UI components and AweCrud’s shared record/controller layer. The README is empty, and several business controllers were not sampled, so relationships between those domain modules are not inferred.

Main entry points: [`protected/config/main.php`](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/config/main.php) (App configuration), [`protected/modules/cruge/controllers/UiController.php`](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/controllers/UiController.php) (Account and RBAC UI), [`protected/modules/cruge/components/CrugeUserManager.php`](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeUserManager.php) (User management), [`protected/modules/cruge/components/CrugeAuthManager.php`](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeAuthManager.php) (RBAC manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_config["App configuration<br/>[main.php]"]
  node_dashboard["Dashboard"]
end

subgraph group_business["Business Modules"]
  node_clientes["Customer management"]
  node_cliente_ws["Customer web service"]
  node_cliente_model[("Customer records<br/>[Cliente.php]")]
  node_cobranzas["Collections"]
  node_actividades["Activities"]
  node_movil["Mobile users"]
end

subgraph group_security["Cruge Security"]
  node_cruge_ui["Account and RBAC UI<br/>[UiController.php]"]
  node_cruge_user["Web user identity<br/>[CrugeWebUser.php]"]
  node_user_manager["User management"]
  node_auth_manager[("RBAC manager")]
  node_cruge_factory["Model factory<br/>[CrugeFactory.php]"]
  node_cruge_data[("Identity and session models")]
  node_cruge_util["Security utilities<br/>[CrugeUtil.php]"]
  node_translator["Message translation"]
end

subgraph group_ui["UI and CRUD"]
  node_awe_record["Active record base"]
  node_awe_controller["CRUD controller base<br/>[AweController.php]"]
  node_bootstrap["Bootstrap components<br/>[Bootstrap.php]"]
  node_menu["Navigation menu<br/>[Menu.php]"]
end

node_user(("Web user"))

node_config -->|"enables module"| node_dashboard
node_config -->|"enables module"| node_clientes
node_config -->|"enables module"| node_cobranzas
node_config -->|"enables module"| node_actividades
node_config -->|"enables module"| node_movil
node_config -->|"sets login route"| node_cruge_ui
node_config -->|"configures user"| node_cruge_user
node_config -->|"configures RBAC"| node_auth_manager
node_config -->|"configures component"| node_bootstrap
node_user -.->|"opens login"| node_cruge_ui
node_cruge_ui -->|"manages roles"| node_auth_manager
node_cruge_ui -->|"manages accounts"| node_user_manager
node_cruge_user -->|"uses manager"| node_user_manager
node_user_manager -.->|"uses factory"| node_cruge_factory
node_cruge_factory -->|"creates models"| node_cruge_data
node_auth_manager -->|"uses utilities"| node_cruge_util
node_cliente_ws -->|"uses customer model"| node_cliente_model
node_cliente_model -->|"references debt and payment"| node_cobranzas
node_awe_controller -->|"loads records"| node_awe_record
node_menu -.->|"uses application routes"| node_config

click node_config "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/config/main.php"
click node_dashboard "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/principal/controllers/DashboardController.php"
click node_clientes "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cliente/controllers/ClienteController.php"
click node_cliente_ws "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cliente/controllers/ClienteWsController.php"
click node_cliente_model "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cliente/models/Cliente.php"
click node_cobranzas "https://github.com/jhonatanquilca/driveworkhouse/tree/master/protected/modules/cobranzas/controllers"
click node_actividades "https://github.com/jhonatanquilca/driveworkhouse/tree/master/protected/modules/actividades/controllers"
click node_movil "https://github.com/jhonatanquilca/driveworkhouse/tree/master/protected/modules/movil/controllers"
click node_cruge_ui "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/controllers/UiController.php"
click node_cruge_user "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeWebUser.php"
click node_user_manager "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeUserManager.php"
click node_auth_manager "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeAuthManager.php"
click node_cruge_factory "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeFactory.php"
click node_cruge_data "https://github.com/jhonatanquilca/driveworkhouse/tree/master/protected/modules/cruge/models/data"
click node_cruge_util "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeUtil.php"
click node_translator "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeTranslator.php"
click node_awe_record "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/extensions/AweCrud/components/AweActiveRecord.php"
click node_awe_controller "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/extensions/AweCrud/components/AweController.php"
click node_bootstrap "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/extensions/bootstrap/components/Bootstrap.php"
click node_menu "https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/components/Menu.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_config,node_dashboard,node_user toneBlue
class node_clientes,node_cliente_ws,node_cliente_model,node_cobranzas,node_actividades,node_movil toneAmber
class node_cruge_ui,node_cruge_user,node_user_manager,node_auth_manager,node_cruge_factory,node_cruge_data,node_cruge_util,node_translator toneMint
class node_awe_record,node_awe_controller,node_bootstrap,node_menu toneRose
```

## Components

### Application

- [App configuration](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/config/main.php): `protected/config/main.php`
- [Dashboard](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/principal/controllers/DashboardController.php): `protected/modules/principal/controllers/DashboardController.php`

### Business Modules

- [Customer management](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cliente/controllers/ClienteController.php): `protected/modules/cliente/controllers/ClienteController.php`
- [Customer web service](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cliente/controllers/ClienteWsController.php): `protected/modules/cliente/controllers/ClienteWsController.php`
- [Customer records](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cliente/models/Cliente.php): `protected/modules/cliente/models/Cliente.php`
- [Collections](https://github.com/jhonatanquilca/driveworkhouse/tree/master/protected/modules/cobranzas/controllers): `protected/modules/cobranzas/controllers`
- [Activities](https://github.com/jhonatanquilca/driveworkhouse/tree/master/protected/modules/actividades/controllers): `protected/modules/actividades/controllers`
- [Mobile users](https://github.com/jhonatanquilca/driveworkhouse/tree/master/protected/modules/movil/controllers): `protected/modules/movil/controllers`

### Cruge Security

- [Account and RBAC UI](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/controllers/UiController.php): `protected/modules/cruge/controllers/UiController.php`
- [Web user identity](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeWebUser.php): `protected/modules/cruge/components/CrugeWebUser.php`
- [User management](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeUserManager.php): `protected/modules/cruge/components/CrugeUserManager.php`
- [RBAC manager](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeAuthManager.php): `protected/modules/cruge/components/CrugeAuthManager.php`
- [Model factory](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeFactory.php): `protected/modules/cruge/components/CrugeFactory.php`
- [Identity and session models](https://github.com/jhonatanquilca/driveworkhouse/tree/master/protected/modules/cruge/models/data): `protected/modules/cruge/models/data`
- [Security utilities](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeUtil.php): `protected/modules/cruge/components/CrugeUtil.php`
- [Message translation](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/modules/cruge/components/CrugeTranslator.php): `protected/modules/cruge/components/CrugeTranslator.php`

### UI and CRUD

- [Active record base](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/extensions/AweCrud/components/AweActiveRecord.php): `protected/extensions/AweCrud/components/AweActiveRecord.php`
- [CRUD controller base](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/extensions/AweCrud/components/AweController.php): `protected/extensions/AweCrud/components/AweController.php`
- [Bootstrap components](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/extensions/bootstrap/components/Bootstrap.php): `protected/extensions/bootstrap/components/Bootstrap.php`
- [Navigation menu](https://github.com/jhonatanquilca/driveworkhouse/blob/master/protected/components/Menu.php): `protected/components/Menu.php`

### Other components

- **Web user**

## Connections

- App configuration → Dashboard: enables module (evidence: `protected/config/main.php`)
- App configuration → Customer management: enables module (evidence: `protected/config/main.php`)
- App configuration → Collections: enables module (evidence: `protected/config/main.php`)
- App configuration → Activities: enables module (evidence: `protected/config/main.php`)
- App configuration → Mobile users: enables module (evidence: `protected/config/main.php`)
- App configuration → Account and RBAC UI: sets login route (evidence: `protected/config/main.php`)
- App configuration → Web user identity: configures user (evidence: `protected/config/main.php`)
- App configuration → RBAC manager: configures RBAC (evidence: `protected/config/main.php`)
- App configuration → Bootstrap components: configures component (evidence: `protected/config/main.php`)
- Web user → Account and RBAC UI: opens login
- Account and RBAC UI → RBAC manager: manages roles (evidence: `protected/modules/cruge/controllers/UiController.php`)
- Account and RBAC UI → User management: manages accounts (evidence: `protected/modules/cruge/controllers/UiController.php`)
- Web user identity → User management: uses manager (evidence: `protected/modules/cruge/components/CrugeWebUser.php`)
- User management → Model factory: uses factory (evidence: `protected/modules/cruge/components/CrugeFactory.php`)
- Model factory → Identity and session models: creates models (evidence: `protected/modules/cruge/components/CrugeFactory.php`)
- RBAC manager → Security utilities: uses utilities (evidence: `protected/modules/cruge/components/CrugeAuthManager.php`)
- Customer web service → Customer records: uses customer model (evidence: `protected/modules/cliente/controllers/ClienteWsController.php`)
- Customer records → Collections: references debt and payment (evidence: `protected/modules/cliente/models/Cliente.php`)
- CRUD controller base → Active record base: loads records (evidence: `protected/extensions/AweCrud/components/AweController.php`)
- Navigation menu → App configuration: uses application routes
