# mrenyard/ramp architecture

> Architecture diagram of the GitHub repository mrenyard/ramp, 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/mrenyard/ramp
- Repository: https://github.com/mrenyard/ramp

## Overview

RAMP is a PHP framework for building customizable, database-driven web applications. Its main workflow receives a browser request, interprets its resource identifier, fetches a business model, validates and persists POST changes, then renders a full page or fragment. Business models include fields, relations, and validation; the framework also provides session-based authentication and configurable local overrides. The graph follows the sampled controller, view, session, and SQL-manager code; other capabilities are represented only where the README or tree supports them, so uncertain links are omitted.

Main entry points: [`www/controller.php`](https://github.com/mrenyard/ramp/blob/master/www/controller.php) (Request controller), [`code/model/business/SQLBusinessModelManager.class.php`](https://github.com/mrenyard/ramp/blob/master/code/model/business/SQLBusinessModelManager.class.php) (SQL model manager), [`code/model/business/BusinessModelManager.class.php`](https://github.com/mrenyard/ramp/blob/master/code/model/business/BusinessModelManager.class.php) (Model manager), [`code/view/View.class.php`](https://github.com/mrenyard/ramp/blob/master/code/view/View.class.php) (View hierarchy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_request["Request handling"]
  node_controller["Request controller<br/>[controller.php]"]
  node_request_parser["HTTP request<br/>[Request.class.php]"]
  node_urn_environment["URN query syntax"]
  node_conditions["Filters and conditions<br/>[Filter.class.php]"]
end

subgraph group_domain["Business domain"]
  node_business_manager["Model manager"]
  node_sql_manager["SQL model manager"]
  node_business_model["Business models"]
  node_records["Records and relations<br/>[Record.class.php]"]
  node_fields["Fields and validation<br/>[Field.class.php]"]
  node_validation["Validation rules"]
end

subgraph group_presentation["Views and output"]
  node_view_manager["View selection"]
  node_view["View hierarchy<br/>[View.class.php]"]
  node_web_root["Page root<br/>[WebRoot.class.php]"]
  node_templates["HTML templates<br/>[page.tpl.php]"]
end

subgraph group_extensions["Authentication and customization"]
  node_session["Session authentication<br/>[Session.class.php]"]
  node_auth_form["Authentication form"]
  node_settings["Application settings<br/>[SETTING.class.php]"]
  node_local_models["Local domain models<br/>[Person.class.php]"]
end

node_browser(("Browser"))
node_database[("SQL data store")]
node_response(("HTTP response"))

node_browser -->|"sends request"| node_controller
node_controller -->|"reads request"| node_request_parser
node_request_parser -->|"interprets URN"| node_urn_environment
node_controller -->|"selects view"| node_view_manager
node_controller -->|"fetches model"| node_business_manager
node_controller -->|"validates POST"| node_business_model
node_controller -->|"updates changes"| node_business_manager
node_business_manager -->|"implemented by"| node_sql_manager
node_sql_manager -->|"reads and writes"| node_database
node_sql_manager -->|"builds model"| node_business_model
node_business_model -->|"contains records"| node_records
node_records -->|"exposes fields"| node_fields
node_fields -->|"applies rules"| node_validation
node_request_parser -->|"provides filters"| node_conditions
node_controller -->|"sets model"| node_view
node_view_manager -->|"returns view"| node_view
node_controller -->|"renders fragment"| node_view
node_controller -->|"renders full page"| node_web_root
node_web_root -->|"renders templates"| node_templates
node_view -->|"produces fragment"| node_response
node_web_root -->|"produces page"| node_response
node_response -->|"returns output"| node_browser
node_session -->|"loads accounts"| node_business_manager
node_session -.->|"authentication view"| node_auth_form
node_settings -->|"configures manager"| node_sql_manager
node_settings -.->|"selects local domain"| node_local_models

click node_controller "https://github.com/mrenyard/ramp/blob/master/www/controller.php"
click node_request_parser "https://github.com/mrenyard/ramp/blob/master/code/http/Request.class.php"
click node_urn_environment "https://github.com/mrenyard/ramp/blob/master/code/condition/URNQueryEnvironment.class.php"
click node_conditions "https://github.com/mrenyard/ramp/blob/master/code/condition/Filter.class.php"
click node_view_manager "https://github.com/mrenyard/ramp/blob/master/code/view/ViewManager.class.php"
click node_view "https://github.com/mrenyard/ramp/blob/master/code/view/View.class.php"
click node_web_root "https://github.com/mrenyard/ramp/blob/master/code/view/WebRoot.class.php"
click node_templates "https://github.com/mrenyard/ramp/blob/master/code/view/document/template/html/page.tpl.php"
click node_business_manager "https://github.com/mrenyard/ramp/blob/master/code/model/business/BusinessModelManager.class.php"
click node_sql_manager "https://github.com/mrenyard/ramp/blob/master/code/model/business/SQLBusinessModelManager.class.php"
click node_business_model "https://github.com/mrenyard/ramp/blob/master/code/model/business/BusinessModel.class.php"
click node_records "https://github.com/mrenyard/ramp/blob/master/code/model/business/Record.class.php"
click node_fields "https://github.com/mrenyard/ramp/blob/master/code/model/business/field/Field.class.php"
click node_validation "https://github.com/mrenyard/ramp/blob/master/code/model/business/validation/ValidationRule.class.php"
click node_session "https://github.com/mrenyard/ramp/blob/master/code/http/Session.class.php"
click node_auth_form "https://github.com/mrenyard/ramp/blob/master/code/view/AuthenticationForm.class.php"
click node_settings "https://github.com/mrenyard/ramp/blob/master/code/SETTING.class.php"
click node_local_models "https://github.com/mrenyard/ramp/blob/master/local/ramp/model/business/Person.class.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_controller,node_request_parser,node_urn_environment,node_conditions,node_browser toneBlue
class node_business_manager,node_sql_manager,node_business_model,node_records,node_fields,node_validation,node_database toneAmber
class node_view_manager,node_view,node_web_root,node_templates toneMint
class node_session,node_auth_form,node_settings,node_local_models toneRose
class node_response toneIndigo
```

## Components

### Request handling

- [Request controller](https://github.com/mrenyard/ramp/blob/master/www/controller.php): `www/controller.php`
- [HTTP request](https://github.com/mrenyard/ramp/blob/master/code/http/Request.class.php): `code/http/Request.class.php`
- [URN query syntax](https://github.com/mrenyard/ramp/blob/master/code/condition/URNQueryEnvironment.class.php): `code/condition/URNQueryEnvironment.class.php`
- [Filters and conditions](https://github.com/mrenyard/ramp/blob/master/code/condition/Filter.class.php): `code/condition/Filter.class.php`

### Business domain

- [Model manager](https://github.com/mrenyard/ramp/blob/master/code/model/business/BusinessModelManager.class.php): `code/model/business/BusinessModelManager.class.php`
- [SQL model manager](https://github.com/mrenyard/ramp/blob/master/code/model/business/SQLBusinessModelManager.class.php): `code/model/business/SQLBusinessModelManager.class.php`
- [Business models](https://github.com/mrenyard/ramp/blob/master/code/model/business/BusinessModel.class.php): `code/model/business/BusinessModel.class.php`
- [Records and relations](https://github.com/mrenyard/ramp/blob/master/code/model/business/Record.class.php): `code/model/business/Record.class.php`
- [Fields and validation](https://github.com/mrenyard/ramp/blob/master/code/model/business/field/Field.class.php): `code/model/business/field/Field.class.php`
- [Validation rules](https://github.com/mrenyard/ramp/blob/master/code/model/business/validation/ValidationRule.class.php): `code/model/business/validation/ValidationRule.class.php`

### Views and output

- [View selection](https://github.com/mrenyard/ramp/blob/master/code/view/ViewManager.class.php): `code/view/ViewManager.class.php`
- [View hierarchy](https://github.com/mrenyard/ramp/blob/master/code/view/View.class.php): `code/view/View.class.php`
- [Page root](https://github.com/mrenyard/ramp/blob/master/code/view/WebRoot.class.php): `code/view/WebRoot.class.php`
- [HTML templates](https://github.com/mrenyard/ramp/blob/master/code/view/document/template/html/page.tpl.php): `code/view/document/template/html/page.tpl.php`

### Authentication and customization

- [Session authentication](https://github.com/mrenyard/ramp/blob/master/code/http/Session.class.php): `code/http/Session.class.php`
- [Authentication form](https://github.com/mrenyard/ramp/blob/master/code/view/AuthenticationForm.class.php): `code/view/AuthenticationForm.class.php`
- [Application settings](https://github.com/mrenyard/ramp/blob/master/code/SETTING.class.php): `code/SETTING.class.php`
- [Local domain models](https://github.com/mrenyard/ramp/blob/master/local/ramp/model/business/Person.class.php): `local/ramp/model/business/Person.class.php`

### Other components

- **Browser**
- **SQL data store**
- **HTTP response**

## Connections

- Browser → Request controller: sends request
- Request controller → HTTP request: reads request
- HTTP request → URN query syntax: interprets URN
- Request controller → View selection: selects view
- Request controller → Model manager: fetches model
- Request controller → Business models: validates POST
- Request controller → Model manager: updates changes
- Model manager → SQL model manager: implemented by
- SQL model manager → SQL data store: reads and writes
- SQL model manager → Business models: builds model
- Business models → Records and relations: contains records
- Records and relations → Fields and validation: exposes fields
- Fields and validation → Validation rules: applies rules
- HTTP request → Filters and conditions: provides filters
- Request controller → View hierarchy: sets model
- View selection → View hierarchy: returns view
- Request controller → View hierarchy: renders fragment
- Request controller → Page root: renders full page
- Page root → HTML templates: renders templates
- View hierarchy → HTTP response: produces fragment
- Page root → HTTP response: produces page
- HTTP response → Browser: returns output
- Session authentication → Model manager: loads accounts
- Session authentication → Authentication form: authentication view
- Application settings → SQL model manager: configures manager
- Application settings → Local domain models: selects local domain
