# amanprojects-ops/web-installation-wizard architecture

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

- Interactive diagram: https://gitdiagram.com/amanprojects-ops/web-installation-wizard
- Repository: https://github.com/amanprojects-ops/web-installation-wizard

## Overview

This repository is a standalone PHP installation wizard. A visitor progresses through the documented setup stages; the wizard checks prerequisites, provisions the database and administrator, writes project configuration, then locks itself. The runtime is concentrated in index.php, so stage nodes describe documented responsibilities rather than separate modules. Source excerpts are partial; unsampled implementation details are omitted.

Main entry points: [`index.php`](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php) (Wizard Controller and UI), [`.htaccess`](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/.htaccess) (Direct-Access Protection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guided_setup["Guided Setup"]
  node_wizard["Wizard Controller and UI<br/>[index.php]"]
  node_requirements["Requirements Check<br/>[index.php]"]
  node_finish["Finish Summary<br/>[index.php]"]
end

subgraph group_provisioning["Provisioning"]
  node_database_setup["Database Setup<br/>[index.php]"]
  node_sql_schema["SQL Schema and Seed Data"]
  node_site_config["Site Configuration<br/>[index.php]"]
  node_admin_setup["Admin Account Setup<br/>[index.php]"]
  node_project_config["Generated Project Configuration"]
end

subgraph group_protection["Installation Protection"]
  node_install_lock["Install Lock"]
  node_apache_rules["Direct-Access Protection<br/>[.htaccess]"]
end

node_visitor(("Installer Visitor"))
node_mysql[("MySQL Server")]

node_visitor -->|"submits steps"| node_wizard
node_wizard -->|"checks prerequisites"| node_requirements
node_wizard -->|"advances to"| node_database_setup
node_requirements -->|"permits setup"| node_database_setup
node_database_setup -->|"tests and provisions"| node_mysql
node_database_setup -->|"imports schema"| node_sql_schema
node_database_setup -->|"writes credentials"| node_project_config
node_wizard -->|"advances to"| node_site_config
node_site_config -->|"writes site settings"| node_project_config
node_wizard -->|"advances to"| node_admin_setup
node_admin_setup -->|"stores account"| node_mysql
node_wizard -->|"advances to"| node_finish
node_finish -->|"creates lock"| node_install_lock
node_wizard -->|"checks lock"| node_install_lock
node_apache_rules -->|"blocks direct access"| node_install_lock
node_finish -->|"shows access links"| node_visitor

click node_wizard "https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php"
click node_requirements "https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php"
click node_database_setup "https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php"
click node_site_config "https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php"
click node_admin_setup "https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php"
click node_finish "https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php"
click node_apache_rules "https://github.com/amanprojects-ops/web-installation-wizard/blob/main/.htaccess"

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_wizard,node_requirements,node_finish toneBlue
class node_database_setup,node_sql_schema,node_site_config,node_admin_setup,node_project_config,node_mysql toneAmber
class node_install_lock,node_apache_rules toneMint
class node_visitor toneIndigo
```

## Components

### Guided Setup

- [Wizard Controller and UI](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php): `index.php`
- [Requirements Check](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php): `index.php`
- [Finish Summary](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php): `index.php`

### Provisioning

- [Database Setup](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php): `index.php`
- **SQL Schema and Seed Data**
- [Site Configuration](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php): `index.php`
- [Admin Account Setup](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/index.php): `index.php`
- **Generated Project Configuration**

### Installation Protection

- **Install Lock**
- [Direct-Access Protection](https://github.com/amanprojects-ops/web-installation-wizard/blob/main/.htaccess): `.htaccess`

### Other components

- **Installer Visitor**
- **MySQL Server**

## Connections

- Installer Visitor → Wizard Controller and UI: submits steps
- Wizard Controller and UI → Requirements Check: checks prerequisites
- Wizard Controller and UI → Database Setup: advances to
- Requirements Check → Database Setup: permits setup
- Database Setup → MySQL Server: tests and provisions
- Database Setup → SQL Schema and Seed Data: imports schema
- Database Setup → Generated Project Configuration: writes credentials
- Wizard Controller and UI → Site Configuration: advances to
- Site Configuration → Generated Project Configuration: writes site settings
- Wizard Controller and UI → Admin Account Setup: advances to
- Admin Account Setup → MySQL Server: stores account
- Wizard Controller and UI → Finish Summary: advances to
- Finish Summary → Install Lock: creates lock
- Wizard Controller and UI → Install Lock: checks lock
- Direct-Access Protection → Install Lock: blocks direct access
- Finish Summary → Installer Visitor: shows access links
