Architecture
Static source aggregates → Python ETL and validation → SQLite relational analytics → precomputed JSON → JavaScript/Chart.js dashboard. The public website does not require a live database server.
Python ETL
A reproducible script creates synthetic order records, normalizes customer contact fields, produces matching candidates, and checks aggregated revenue, gross profit, and completed jobs against source totals.
SQL data model
Separate customer, customer-contact, order, job-site, and marketing-spend entities. A canonical customer may have many orders and delivery locations. SQL joins, CTEs, window functions, and grouping support customer cohorts and channel comparisons.
Customer matching controls
Exact normalized email and phone agreements are high-confidence candidates, not automatic merges. Shared household/business contacts, name collisions, and contractors with multiple job sites require review and auditability.
Metric definitions
Observed repeat rate: customers with at least two recorded orders divided by customers in the selected acquisition cohort. Marketing profitability proxy: (channel-associated gross profit − recorded spend) / recorded spend. Neither is a causal measure of advertising lift.
Source reconciliation
The earlier generator reconciled aggregate job counts, revenue, and gross profit. It also redistributed first-time customer labels to match same-month completed jobs; this must be corrected rather than presented as a proven source inconsistency.
Required timing-model correction
Add separate acquired_at, estimate_at, ordered_at, and fulfilled_at timestamps. Reconcile new-customer events by acquisition month and completed jobs by fulfillment month. Allow pending and canceled orders. Regenerate SQLite, JSON, cohort results, and numerical report findings.
Reproducibility
Keep the generator, SQL schema and queries, test results, source data dictionary, assumptions, and changelog in the offline technical package. Public pages should display aggregated results only.
Limitations
All customers, orders, contacts, and job sites are synthetic. Marketing-channel results remain provisional until the timing model is corrected. No real customer ROI, revenue improvement, or validated client outcome is claimed.
Next validation milestone
Rebuild the event-date model and rerun SQL checks before interpreting cohort retention or channel-level ROI as validated synthetic findings.
Fictional retail operation and synthetic records. Cohort and channel-level results are provisional until the acquisition-to-fulfillment timing model is rebuilt.