# sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce architecture

> Architecture diagram of the GitHub repository sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce
- Repository: https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce

## Overview

This repository describes an in-development ecommerce CDP: a store supplies customer data, which is mapped and transformed into the platform schema, used to generate predictive segments and customer analytics, then targeted with multichannel campaigns. The README also describes offline model training and nine segment types. Most business directories contain only placeholders, so the graph reflects documented capabilities and workflow rather than verified runtime calls; workflow edges cite the README.

Main entry points: [`backend/apps/segments`](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/segments) (Predictive segments), [`backend/apps/mapping`](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/mapping) (Column mapping), [`data_prep/transform`](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/data_prep/transform) (Data preparation), [`backend/schema.sql`](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/blob/main/backend/schema.sql) (PostgreSQL store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data onboarding"]
  node_ingestion["Data ingestion"]
  node_mapping["Column mapping"]
  node_transform["Data preparation"]
  node_schema["Segment schemas"]
end

subgraph group_intelligence["Customer intelligence"]
  node_training["Model training"]
  node_models["Trained models"]
  node_segments["Predictive segments"]
  node_analytics["Customer analytics"]
end

subgraph group_activation["Campaign activation"]
  node_campaigns["Campaign workflows"]
end

subgraph group_platform["Platform foundations"]
  node_database[("PostgreSQL store<br/>[schema.sql]")]
  node_users["Store accounts"]
  node_backend["Django backend"]
end

node_store(("Ecommerce store"))
node_llm{{"LLM service"}}
node_channels{{"Email, WhatsApp, SMS"}}

node_store -->|"uploads or connects"| node_ingestion
node_ingestion -->|"submits data"| node_mapping
node_mapping -->|"maps columns"| node_llm
node_mapping -->|"normalizes fields"| node_transform
node_transform -.->|"uses definitions"| node_schema
node_transform -->|"stores clean data"| node_database
node_training -->|"produces models"| node_models
node_database -->|"supplies customer data"| node_segments
node_schema -.->|"defines segment fields"| node_segments
node_models -->|"supports predictions"| node_segments
node_segments -->|"provides segment results"| node_analytics
node_database -.->|"supplies customer records"| node_analytics
node_analytics -.->|"informs targeting"| node_campaigns
node_segments -->|"targets segments"| node_campaigns
node_campaigns -->|"sends campaigns"| node_channels
node_store -.->|"signs up"| node_users
node_backend -.->|"hosts domain apps"| node_ingestion

click node_ingestion "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/ingestion"
click node_mapping "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/mapping"
click node_transform "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/data_prep/transform"
click node_schema "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/data_prep/schemas"
click node_database "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/blob/main/backend/schema.sql"
click node_training "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/data_prep/training"
click node_models "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/ml_models"
click node_segments "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/segments"
click node_analytics "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/analytics"
click node_campaigns "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/campaigns"
click node_users "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/users"
click node_backend "https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/config"

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_ingestion,node_mapping,node_transform,node_schema toneBlue
class node_training,node_models,node_segments,node_analytics toneAmber
class node_campaigns toneMint
class node_database,node_users,node_backend toneRose
class node_store,node_llm,node_channels toneIndigo
```

## Components

### Data onboarding

- [Data ingestion](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/ingestion): `backend/apps/ingestion`
- [Column mapping](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/mapping): `backend/apps/mapping`
- [Data preparation](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/data_prep/transform): `data_prep/transform`
- [Segment schemas](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/data_prep/schemas): `data_prep/schemas`

### Customer intelligence

- [Model training](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/data_prep/training): `data_prep/training`
- [Trained models](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/ml_models): `backend/ml_models`
- [Predictive segments](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/segments): `backend/apps/segments`
- [Customer analytics](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/analytics): `backend/apps/analytics`

### Campaign activation

- [Campaign workflows](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/campaigns): `backend/apps/campaigns`

### Platform foundations

- [PostgreSQL store](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/blob/main/backend/schema.sql): `backend/schema.sql`
- [Store accounts](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/apps/users): `backend/apps/users`
- [Django backend](https://github.com/sohaib-haider/customerly---customer-data-platform-cdp-for-ecommerce/tree/main/backend/config): `backend/config`

### Other components

- **Ecommerce store**
- **LLM service**
- **Email, WhatsApp, SMS**

## Connections

- Ecommerce store → Data ingestion: uploads or connects (evidence: `README.md`)
- Data ingestion → Column mapping: submits data (evidence: `README.md`)
- Column mapping → LLM service: maps columns (evidence: `README.md`)
- Column mapping → Data preparation: normalizes fields (evidence: `README.md`)
- Data preparation → Segment schemas: uses definitions
- Data preparation → PostgreSQL store: stores clean data (evidence: `README.md`)
- Model training → Trained models: produces models (evidence: `README.md`)
- PostgreSQL store → Predictive segments: supplies customer data (evidence: `README.md`)
- Segment schemas → Predictive segments: defines segment fields
- Trained models → Predictive segments: supports predictions (evidence: `README.md`)
- Predictive segments → Customer analytics: provides segment results (evidence: `README.md`)
- PostgreSQL store → Customer analytics: supplies customer records
- Customer analytics → Campaign workflows: informs targeting
- Predictive segments → Campaign workflows: targets segments (evidence: `README.md`)
- Campaign workflows → Email, WhatsApp, SMS: sends campaigns (evidence: `README.md`)
- Ecommerce store → Store accounts: signs up
- Django backend → Data ingestion: hosts domain apps
