# jan-vandenberg/cruddiy architecture

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

- Interactive diagram: https://gitdiagram.com/jan-vandenberg/cruddiy
- Repository: https://github.com/jan-vandenberg/cruddiy

## Overview

CRUDDIY is a browser-based PHP CRUD generator. The primary workflow configures a database, optionally manages its foreign-key relations, selects tables and columns, then generates a standalone application. Generated pages provide record creation, listing, reading, updating, and deletion; documented listing features include search, sorting, pagination, and CSV export. The graph also includes schema import and localization as distinct capabilities. Some generator internals are only partially sampled, so uncertain calls between those internals are omitted.

Main entry points: [`core/relations.php`](https://github.com/jan-vandenberg/cruddiy/blob/master/core/relations.php) (Relation manager), [`core/generate.php`](https://github.com/jan-vandenberg/cruddiy/blob/master/core/generate.php) (Generation coordinator), [`core/helpers.php`](https://github.com/jan-vandenberg/cruddiy/blob/master/core/helpers.php) (Runtime helpers), [`core/index.php`](https://github.com/jan-vandenberg/cruddiy/blob/master/core/index.php) (Generator entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Generator Setup"]
  node_entry["Generator entry<br/>[index.php]"]
  node_connection["Database configuration<br/>[config.php]"]
  node_relations["Relation manager<br/>[relations.php]"]
  node_schema["Schema import<br/>[schema.php]"]
end

subgraph group_discovery["Schema Selection"]
  node_tables["Table selection<br/>[tables.php]"]
  node_columns["Column selection<br/>[columns.php]"]
end

subgraph group_generation["App Generation"]
  node_generator["Generation coordinator<br/>[generate.php]"]
  node_template_engine["Template rendering<br/>[templates.php]"]
  node_crud_templates["CRUD page templates"]
  node_app_config["Generated app config<br/>[config.php]"]
  node_generated_app["Standalone generated app"]
end

subgraph group_runtime["Generated CRUD"]
  node_runtime_helpers["Runtime helpers<br/>[helpers.php]"]
  node_listing["Searchable listing<br/>[entity-index.php]"]
  node_create["Create record<br/>[entity-create.php]"]
  node_read["Read record<br/>[entity-read.php]"]
  node_update["Update record<br/>[entity-update.php]"]
  node_delete["Delete record<br/>[entity-delete.php]"]
  node_locales["Translations"]
end

node_user(("Generator user"))
node_database[("MySQL database")]

node_user -->|"configures"| node_entry
node_entry -->|"continues setup"| node_relations
node_entry -->|"uses template"| node_connection
node_relations -->|"reads and alters relations"| node_database
node_relations -->|"writes config"| node_connection
node_relations -->|"offers import"| node_schema
node_relations -->|"continues selection"| node_tables
node_tables -->|"lists tables"| node_database
node_tables -->|"submits selection"| node_columns
node_columns -->|"reads columns"| node_database
node_columns -->|"submits choices"| node_generator
node_generator -->|"uses renderer"| node_template_engine
node_generator -->|"reads templates"| node_crud_templates
node_generator -->|"generates config"| node_app_config
node_generator -->|"writes application"| node_generated_app
node_template_engine -->|"renders pages"| node_generated_app
node_generated_app -->|"serves listing"| node_listing
node_generated_app -->|"serves create"| node_create
node_generated_app -->|"serves record view"| node_read
node_generated_app -->|"serves update"| node_update
node_generated_app -->|"serves deletion"| node_delete
node_listing -->|"queries records"| node_database
node_create -->|"inserts records"| node_database
node_read -->|"reads records"| node_database
node_update -->|"updates records"| node_database
node_delete -->|"deletes records"| node_database
node_listing -->|"uses helpers"| node_runtime_helpers
node_create -->|"uses helpers"| node_runtime_helpers
node_read -->|"uses helpers"| node_runtime_helpers
node_update -->|"uses helpers"| node_runtime_helpers
node_delete -->|"uses helpers"| node_runtime_helpers
node_generated_app -->|"loads translations"| node_locales

click node_entry "https://github.com/jan-vandenberg/cruddiy/blob/master/core/index.php"
click node_connection "https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/config.php"
click node_relations "https://github.com/jan-vandenberg/cruddiy/blob/master/core/relations.php"
click node_schema "https://github.com/jan-vandenberg/cruddiy/blob/master/core/schema.php"
click node_tables "https://github.com/jan-vandenberg/cruddiy/blob/master/core/tables.php"
click node_columns "https://github.com/jan-vandenberg/cruddiy/blob/master/core/columns.php"
click node_generator "https://github.com/jan-vandenberg/cruddiy/blob/master/core/generate.php"
click node_template_engine "https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates.php"
click node_crud_templates "https://github.com/jan-vandenberg/cruddiy/tree/master/core/templates"
click node_app_config "https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/config.php"
click node_runtime_helpers "https://github.com/jan-vandenberg/cruddiy/blob/master/core/helpers.php"
click node_listing "https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-index.php"
click node_create "https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-create.php"
click node_read "https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-read.php"
click node_update "https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-update.php"
click node_delete "https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-delete.php"
click node_locales "https://github.com/jan-vandenberg/cruddiy/tree/master/core/locales"

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_entry,node_connection,node_relations,node_schema,node_user toneBlue
class node_tables,node_columns,node_database toneAmber
class node_generator,node_template_engine,node_crud_templates,node_app_config,node_generated_app toneMint
class node_runtime_helpers,node_listing,node_create,node_read,node_update,node_delete,node_locales toneRose
```

## Components

### Generator Setup

- [Generator entry](https://github.com/jan-vandenberg/cruddiy/blob/master/core/index.php): `core/index.php`
- [Database configuration](https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/config.php): `core/templates/config.php`
- [Relation manager](https://github.com/jan-vandenberg/cruddiy/blob/master/core/relations.php): `core/relations.php`
- [Schema import](https://github.com/jan-vandenberg/cruddiy/blob/master/core/schema.php): `core/schema.php`

### Schema Selection

- [Table selection](https://github.com/jan-vandenberg/cruddiy/blob/master/core/tables.php): `core/tables.php`
- [Column selection](https://github.com/jan-vandenberg/cruddiy/blob/master/core/columns.php): `core/columns.php`

### App Generation

- [Generation coordinator](https://github.com/jan-vandenberg/cruddiy/blob/master/core/generate.php): `core/generate.php`
- [Template rendering](https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates.php): `core/templates.php`
- [CRUD page templates](https://github.com/jan-vandenberg/cruddiy/tree/master/core/templates): `core/templates`
- [Generated app config](https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/config.php): `core/templates/config.php`
- **Standalone generated app**

### Generated CRUD

- [Runtime helpers](https://github.com/jan-vandenberg/cruddiy/blob/master/core/helpers.php): `core/helpers.php`
- [Searchable listing](https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-index.php): `core/templates/entity-index.php`
- [Create record](https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-create.php): `core/templates/entity-create.php`
- [Read record](https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-read.php): `core/templates/entity-read.php`
- [Update record](https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-update.php): `core/templates/entity-update.php`
- [Delete record](https://github.com/jan-vandenberg/cruddiy/blob/master/core/templates/entity-delete.php): `core/templates/entity-delete.php`
- [Translations](https://github.com/jan-vandenberg/cruddiy/tree/master/core/locales): `core/locales`

### Other components

- **Generator user**
- **MySQL database**

## Connections

- Generator user → Generator entry: configures
- Generator entry → Relation manager: continues setup
- Generator entry → Database configuration: uses template
- Relation manager → MySQL database: reads and alters relations
- Relation manager → Database configuration: writes config
- Relation manager → Schema import: offers import
- Relation manager → Table selection: continues selection
- Table selection → MySQL database: lists tables
- Table selection → Column selection: submits selection
- Column selection → MySQL database: reads columns
- Column selection → Generation coordinator: submits choices
- Generation coordinator → Template rendering: uses renderer
- Generation coordinator → CRUD page templates: reads templates
- Generation coordinator → Generated app config: generates config
- Generation coordinator → Standalone generated app: writes application
- Template rendering → Standalone generated app: renders pages
- Standalone generated app → Searchable listing: serves listing
- Standalone generated app → Create record: serves create
- Standalone generated app → Read record: serves record view
- Standalone generated app → Update record: serves update
- Standalone generated app → Delete record: serves deletion
- Searchable listing → MySQL database: queries records
- Create record → MySQL database: inserts records
- Read record → MySQL database: reads records
- Update record → MySQL database: updates records
- Delete record → MySQL database: deletes records
- Searchable listing → Runtime helpers: uses helpers
- Create record → Runtime helpers: uses helpers
- Read record → Runtime helpers: uses helpers
- Update record → Runtime helpers: uses helpers
- Delete record → Runtime helpers: uses helpers
- Standalone generated app → Translations: loads translations
