Core Concepts
ProcessReactExportProfile separates discovery, planning, execution, and verification into dedicated services under Totoglu\ProcessReactExportProfile\Engine\* coordinated by ExportProfileRuntime.
Export & Verification Pipeline
Section titled “Export & Verification Pipeline”flowchart TD
A["PreflightAuditor + ContributorCollector"] --> B["Build ExportPlan (or load PresetStore recipe)"]
B --> C["ChunkedExportRunner (6 resumable steps or ExportProfileQueue)"]
C --> D["ConfigCompiler + SecretScanner scrub config.php, modules & rows"]
D --> E["DatabaseExporter + FileArchiver + FinishScriptGenerator"]
E --> F["ProfileVerifier scans output dir & ZIP for leaked secrets"]
F --> G["Save verified profile in ProfileRepository + audit log"]
1. Pre-Flight Audit & Contributor Rules
Section titled “1. Pre-Flight Audit & Contributor Rules”PreflightAuditor inspects your active database tables, site/config.php diffs against wire/config.php, installed modules, and orphan asset directories (cached for 60s via getCachedAudit()). Simultaneously, ContributorCollector gathers ContributorRuleSet policies from installed modules and ProcessReactExportProfile::collectContributors.
2. ExportPlan & PresetStore
Section titled “2. ExportPlan & PresetStore”Every export is driven by an immutable ExportPlan DTO specifying profile slug, title, summary, output target (directory, zip, or both), module packaging mode (slim vs. full), user inclusion, secret scrubbing, and post-install finish script options. Reusable presets live in site/profiles/*.json alongside three built-in recipes (public-starter, client-handoff, internal-clone).
3. Resumable 6-Step ChunkedExportRunner
Section titled “3. Resumable 6-Step ChunkedExportRunner”To avoid PHP execution timeouts on large sites, ChunkedExportRunner breaks export execution into locked, resumable steps (startJob() -> runStep() -> runAll()) protected by ProfileRepository::withJobLock() and withSlugLock(), or executes headlessly via ExportProfileQueue.
4. ProfileVerifier Post-Export Gate
Section titled “4. ProfileVerifier Post-Export Gate”After packaging completes, ProfileVerifier::verify() validates the exported directory and/or ZIP structure (install/info.php, install/install.sql, config.php) and scans for any literal secret needles collected by SecretScanner::collectRedactedSecretValuesForPlan() to guarantee zero accidental credential leaks.