Skip to content

Commit 2999b24

Browse files
Ibraheem OlasupoIbraheem Olasupo
authored andcommitted
Add deterministic NexaFlow synthetic product data
1 parent 79ae154 commit 2999b24

27 files changed

Lines changed: 3074 additions & 47 deletions

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ jobs:
3737
- name: Test
3838
run: make test
3939

40+
- name: Generate temporary synthetic sample
41+
run: python3 -m product_growth_intelligence generate-data --profile sample --output-dir /tmp/nexaflow-ci-sample --overwrite

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ data/samples/*
2525
outputs/*
2626
reports/*
2727
!**/.gitkeep
28+
!data/samples/nexaflow/
29+
!data/samples/nexaflow/**
2830

2931
# Tooling and OS noise
3032
.DS_Store
3133
.idea/
3234
.vscode/
33-

‎Makefile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install format lint type-check test quality project-info
1+
.PHONY: install format lint type-check test quality project-info generate-sample
22

33
install:
44
python3 -m pip install --upgrade pip
@@ -22,3 +22,6 @@ quality: lint type-check test
2222

2323
project-info:
2424
python3 -m product_growth_intelligence project-info
25+
26+
generate-sample:
27+
python3 -m product_growth_intelligence generate-data --profile sample --output-dir data/samples/nexaflow --overwrite

‎README.md‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The repository is written for product data scientists, product analysts, growth
2525

2626
Planned capabilities include synthetic product event generation, clickstream ingestion, validation, funnel analytics, cohort retention, churn prediction, segmentation, recommendation modelling, controlled A/B testing, customer feedback intelligence, GenAI-assisted product insights, Power BI-ready outputs, and Azure-aligned security, governance, monitoring, and deployment patterns.
2727

28-
Milestone 1 implements only the repository foundation, configuration, documentation, tooling, lightweight package metadata, and testable helper code.
28+
Milestones 1 and 2 implement the repository foundation and deterministic synthetic NexaFlow data generation. Later ingestion, analytics, ML, recommendation, experimentation, GenAI, dashboard, and Azure deployment work remains planned.
2929

3030
## Azure Service Mapping
3131

@@ -58,9 +58,11 @@ flowchart LR
5858
I --> J[Monitoring and governance]
5959
```
6060

61-
## Planned Data Domains
61+
## Synthetic NexaFlow Data
6262

63-
The platform will use synthetic data for users, sessions, clickstream events, feature usage, subscriptions, experiment assignments, and customer feedback. Dataset contracts are documented in [docs/architecture/data-contracts.md](docs/architecture/data-contracts.md); no datasets are generated or committed in Milestone 1.
63+
NexaFlow is a fictional collaborative productivity platform for individual professionals and small business teams. The Milestone 2 generator creates deterministic synthetic users, sessions, clickstream events, feature usage, subscriptions, experiment assignments, and customer feedback. Dataset contracts are documented in [docs/architecture/data-contracts.md](docs/architecture/data-contracts.md), and the data model is described in [docs/architecture/synthetic-data-model.md](docs/architecture/synthetic-data-model.md).
64+
65+
The committed sample fixture lives in `data/samples/nexaflow`. Larger local runs should be written under `data/raw/<run_id>/` and are ignored by Git.
6466

6567
## Analytics, ML, and GenAI Use Cases
6668

@@ -101,8 +103,8 @@ Analytics use cases include active user tracking, journey funnels, feature adopt
101103

102104
| Milestone | Business objective | Main engineering outputs | Testing expectations | Evidence/reporting outputs |
103105
| --- | --- | --- | --- | --- |
104-
| 1. Repository foundation and architecture | Establish a credible, reproducible base | Package, configs, docs, CI, governance | Lint, type checks, unit tests | README, architecture docs, ADRs |
105-
| 2. Synthetic product data | Create realistic non-customer data | Deterministic generators and schemas | Generator and schema tests | Sample profiles and data dictionary |
106+
| 1. Repository foundation and architecture | Establish a credible, reproducible base | Package, configs, docs, CI, governance | Lint, type checks, unit tests | Completed |
107+
| 2. Synthetic product data | Create realistic non-customer data | Deterministic generators and schemas | Generator and schema tests | Completed |
106108
| 3. Event ingestion and validation | Move events into governed zones | Batch/local ingestion and validation | Contract and quarantine tests | Validation reports |
107109
| 4. Funnel analytics | Explain journey conversion | Funnel metric modules | Metric unit tests | Funnel outputs |
108110
| 5. Retention and cohort analysis | Measure product stickiness | Cohort tables and retention views | Windowing tests | Cohort reports |
@@ -122,6 +124,7 @@ source .venv/bin/activate
122124
make install
123125
make quality
124126
pgi project-info
127+
make generate-sample
125128
```
126129

127130
Useful commands:
@@ -132,6 +135,15 @@ make lint
132135
make type-check
133136
make test
134137
make quality
138+
make generate-sample
139+
```
140+
141+
Generate a synthetic run directly:
142+
143+
```bash
144+
python3 -m product_growth_intelligence generate-data \
145+
--profile sample \
146+
--output-dir data/raw/sample-run
135147
```
136148

137149
## Quality and Security Principles
@@ -147,7 +159,7 @@ The implementation favours typed Python, deterministic behaviour, small interfac
147159
| Config foundation | Completed | Safe placeholders only |
148160
| Architecture documentation | Completed | Logical flow, service mapping, contracts, metrics |
149161
| Governance documentation | Completed | Initial policies and responsible analytics guidance |
150-
| Synthetic datasets | Planned | Not implemented in Milestone 1 |
162+
| Synthetic datasets | Completed | NexaFlow sample fixture and generator implemented |
151163
| Ingestion, analytics, ML, recommendations, GenAI | Planned | Not implemented in Milestone 1 |
152164
| Azure deployment | Optional Azure deployment | No live resources required |
153165

@@ -158,4 +170,3 @@ This repository is designed around synthetic data only. It must not be used to s
158170
## Portfolio Positioning
159171

160172
This project is intended to demonstrate practical product analytics engineering, Azure-aligned system design, responsible ML and GenAI thinking, and clean repository craftsmanship. It is a production-style reference implementation, not a deployed production system.
161-

‎configs/base.yaml‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,27 @@ genai:
3333
observability:
3434
log_level: INFO
3535
application_insights_connection_string_env: APPLICATIONINSIGHTS_CONNECTION_STRING
36-
36+
synthetic_data:
37+
product_name: NexaFlow
38+
default_profile: sample
39+
profiles:
40+
sample:
41+
user_count: 12
42+
simulation_start_date: "2025-01-01"
43+
simulation_end_date: "2025-03-31"
44+
output_dir: data/samples/nexaflow
45+
development:
46+
user_count: 250
47+
simulation_start_date: "2025-01-01"
48+
simulation_end_date: "2025-03-31"
49+
output_dir: data/raw/development-run
50+
timezone: UTC
51+
contract_version: "2026-06-milestone-2"
52+
output_formats:
53+
users: csv
54+
sessions: jsonl
55+
clickstream_events: jsonl
56+
feature_usage: csv
57+
subscriptions: csv
58+
experiment_assignments: csv
59+
customer_feedback: csv

‎configs/local.yaml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ genai:
1515
enabled: false
1616
observability:
1717
log_level: INFO
18-
18+
synthetic_data:
19+
default_profile: sample
20+
sample_output_dir: data/samples/nexaflow
21+
development_output_dir: data/raw/development-run

0 commit comments

Comments
 (0)