# ssv32/gy architecture

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

- Interactive diagram: https://gitdiagram.com/ssv32/gy
- Repository: https://github.com/ssv32/gy

## Overview

Gy is a lightweight PHP framework with CMS features for building small websites. A site includes the Gy core, then invokes components; component controllers coordinate models and templates to produce results. The admin panel manages users, settings, modules, and content, while optional modules provide structured content and page construction. The core also supplies authentication, access groups, language, security, caching, and configurable database adapters. The graph follows documented and indexed references; several admin and module relationships are documented capabilities or directory-level summaries rather than inspected call paths.

Main entry points: [`gy/gy.php`](https://github.com/ssv32/gy/blob/master/gy/gy.php) (Core bootstrap), [`gy/classes/Gy/Core/User/User.php`](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/User/User.php) (User authentication), [`gy/component`](https://github.com/ssv32/gy/tree/master/gy/component) (User management), [`gy/classes/Gy/Core/App.php`](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/App.php) (Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Framework runtime"]
  node_core["Core bootstrap<br/>[gy.php]"]
  node_app["Application<br/>[App.php]"]
  node_component["Component runtime<br/>[Component.php]"]
  node_controller["Controller base<br/>[Controller.php]"]
  node_language["Language<br/>[Lang.php]"]
  node_security["Input security<br/>[Security.php]"]
  node_module["Module loader<br/>[Module.php]"]
  node_dbbase["Database abstraction<br/>[Db.php]"]
  node_dbdrivers["Database adapters"]
end

subgraph group_identity["Users and access"]
  node_user["User authentication<br/>[User.php]"]
  node_groups["Access groups"]
  node_userprops["User properties"]
end

subgraph group_cms["CMS components"]
  node_useradmin["User management"]
  node_admin["Admin panel"]
  node_commoncomponents["Site components"]
end

subgraph group_extensions["Content extensions"]
  node_containercontrollers["Container controllers"]
  node_containerdata["Structured content<br/>[ContainerData.php]"]
  node_pagebuilder["Page construction<br/>[controller.php]"]
  node_sitepages["Site page storage<br/>[SitePages.php]"]
  node_pagecomponents["Page component resolver"]
end

node_site(("Site code"))
node_database[("Configured database")]

node_site -->|"includes core"| node_core
node_core -->|"creates app"| node_app
node_core -->|"loads modules"| node_module
node_core -->|"selects adapter"| node_dbdrivers
node_core -->|"creates user"| node_user
node_app -->|"creates component"| node_component
node_app -->|"filters input"| node_security
node_component -->|"uses controller"| node_controller
node_controller -->|"creates language"| node_language
node_dbdrivers -->|"extends abstraction"| node_dbbase
node_dbdrivers -.->|"connects"| node_database
node_user -->|"gets memberships"| node_groups
node_user -.->|"reads credentials"| node_database
node_useradmin -->|"manages accounts"| node_user
node_useradmin -->|"assigns groups"| node_groups
node_useradmin -->|"edits properties"| node_userprops
node_admin -->|"includes core"| node_core
node_containercontrollers -->|"calls content API"| node_containerdata
node_pagebuilder -->|"reads and writes pages"| node_sitepages
node_pagebuilder -->|"resolves components"| node_pagecomponents
node_containercontrollers -.->|"module capability"| node_module

click node_core "https://github.com/ssv32/gy/blob/master/gy/gy.php"
click node_app "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/App.php"
click node_component "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Component/Component.php"
click node_controller "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Component/Mvc/Controller.php"
click node_language "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Lang.php"
click node_security "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Security.php"
click node_module "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Module.php"
click node_dbbase "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/AbstractClasses/Db.php"
click node_dbdrivers "https://github.com/ssv32/gy/tree/master/gy/classes/Gy/Core/Db"
click node_user "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/User/User.php"
click node_groups "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/User/AccessUserGroup.php"
click node_userprops "https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/User/GeneralUsersPropertys.php"
click node_useradmin "https://github.com/ssv32/gy/tree/master/gy/component"
click node_admin "https://github.com/ssv32/gy/tree/master/gy/admin"
click node_commoncomponents "https://github.com/ssv32/gy/tree/master/gy/component"
click node_containercontrollers "https://github.com/ssv32/gy/tree/master/gy/modules/containerdata/component"
click node_containerdata "https://github.com/ssv32/gy/blob/master/gy/modules/containerdata/classes/ContainerData.php"
click node_pagebuilder "https://github.com/ssv32/gy/blob/master/gy/modules/filemodule/component/work_page_site/controller.php"
click node_sitepages "https://github.com/ssv32/gy/blob/master/gy/modules/filemodule/classes/SitePages.php"
click node_pagecomponents "https://github.com/ssv32/gy/blob/master/gy/modules/filemodule/classes/AppFromConstructorPageComponent.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_core,node_app,node_component,node_controller,node_language,node_security,node_module,node_dbbase,node_dbdrivers toneBlue
class node_user,node_groups,node_userprops,node_database toneAmber
class node_useradmin,node_admin,node_commoncomponents toneMint
class node_containercontrollers,node_containerdata,node_pagebuilder,node_sitepages,node_pagecomponents toneRose
class node_site toneIndigo
```

## Components

### Framework runtime

- [Core bootstrap](https://github.com/ssv32/gy/blob/master/gy/gy.php): `gy/gy.php`
- [Application](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/App.php): `gy/classes/Gy/Core/App.php`
- [Component runtime](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Component/Component.php): `gy/classes/Gy/Core/Component/Component.php`
- [Controller base](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Component/Mvc/Controller.php): `gy/classes/Gy/Core/Component/Mvc/Controller.php`
- [Language](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Lang.php): `gy/classes/Gy/Core/Lang.php`
- [Input security](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Security.php): `gy/classes/Gy/Core/Security.php`
- [Module loader](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Module.php): `gy/classes/Gy/Core/Module.php`
- [Database abstraction](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/AbstractClasses/Db.php): `gy/classes/Gy/Core/AbstractClasses/Db.php`
- [Database adapters](https://github.com/ssv32/gy/tree/master/gy/classes/Gy/Core/Db): `gy/classes/Gy/Core/Db`

### Users and access

- [User authentication](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/User/User.php): `gy/classes/Gy/Core/User/User.php`
- [Access groups](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/User/AccessUserGroup.php): `gy/classes/Gy/Core/User/AccessUserGroup.php`
- [User properties](https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/User/GeneralUsersPropertys.php): `gy/classes/Gy/Core/User/GeneralUsersPropertys.php`

### CMS components

- [User management](https://github.com/ssv32/gy/tree/master/gy/component): `gy/component`
- [Admin panel](https://github.com/ssv32/gy/tree/master/gy/admin): `gy/admin`
- [Site components](https://github.com/ssv32/gy/tree/master/gy/component): `gy/component`

### Content extensions

- [Container controllers](https://github.com/ssv32/gy/tree/master/gy/modules/containerdata/component): `gy/modules/containerdata/component`
- [Structured content](https://github.com/ssv32/gy/blob/master/gy/modules/containerdata/classes/ContainerData.php): `gy/modules/containerdata/classes/ContainerData.php`
- [Page construction](https://github.com/ssv32/gy/blob/master/gy/modules/filemodule/component/work_page_site/controller.php): `gy/modules/filemodule/component/work_page_site/controller.php`
- [Site page storage](https://github.com/ssv32/gy/blob/master/gy/modules/filemodule/classes/SitePages.php): `gy/modules/filemodule/classes/SitePages.php`
- [Page component resolver](https://github.com/ssv32/gy/blob/master/gy/modules/filemodule/classes/AppFromConstructorPageComponent.php): `gy/modules/filemodule/classes/AppFromConstructorPageComponent.php`

### Other components

- **Site code**
- **Configured database**

## Connections

- Site code → Core bootstrap: includes core (evidence: `README.md`)
- Core bootstrap → Application: creates app (evidence: `gy/gy.php`)
- Core bootstrap → Module loader: loads modules (evidence: `gy/gy.php`)
- Core bootstrap → Database adapters: selects adapter (evidence: `gy/gy.php`)
- Core bootstrap → User authentication: creates user (evidence: `gy/gy.php`)
- Application → Component runtime: creates component (evidence: `gy/classes/Gy/Core/App.php`)
- Application → Input security: filters input (evidence: `gy/classes/Gy/Core/App.php`)
- Component runtime → Controller base: uses controller (evidence: `gy/classes/Gy/Core/Component/Component.php`)
- Controller base → Language: creates language (evidence: `gy/classes/Gy/Core/Component/Mvc/Controller.php`)
- Database adapters → Database abstraction: extends abstraction (evidence: `gy/classes/Gy/Core/Db/PhpFileSqlClientForGy.php`)
- Database adapters → Configured database: connects (evidence: `README.md`)
- User authentication → Access groups: gets memberships (evidence: `gy/classes/Gy/Core/User/User.php`)
- User authentication → Configured database: reads credentials (evidence: `gy/classes/Gy/Core/User/User.php`)
- User management → User authentication: manages accounts (evidence: `gy/component/add_user/controller.php`)
- User management → Access groups: assigns groups (evidence: `gy/component/add_user/controller.php`)
- User management → User properties: edits properties (evidence: `gy/component/edit-users-propertys/controller.php`)
- Admin panel → Core bootstrap: includes core (evidence: `gy/admin/index.php`)
- Container controllers → Structured content: calls content API (evidence: `gy/modules/containerdata/component/containerdata_element_property/controller.php`)
- Page construction → Site page storage: reads and writes pages (evidence: `gy/modules/filemodule/component/work_page_site/controller.php`)
- Page construction → Page component resolver: resolves components (evidence: `gy/modules/filemodule/component/work_page_site/controller.php`)
- Container controllers → Module loader: module capability
