# erikroa/nova-customer-intelligence architecture

> Architecture diagram of the GitHub repository erikroa/nova-customer-intelligence, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/erikroa/nova-customer-intelligence
- Repository: https://github.com/erikroa/nova-customer-intelligence

## Overview

NovaCRM is a dbt customer-intelligence analytics project. Its documented workflow transforms CSV seed data through staging and core models into customer-success and revenue marts, which feed Looker Studio dashboards. The README documents the layer structure and model purposes; detailed SQL dependencies were not sampled, so links below show only documented or strongly domain-supported flows.

Main entry points: [`models/core/dim_account.sql`](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/dim_account.sql) (Account dimension), [`models/core/fct_revenue.sql`](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/fct_revenue.sql) (Revenue facts), [`seeds`](https://github.com/erikroa/nova-customer-intelligence/tree/main/seeds) (Raw CSV seeds), [`models/core/fct_tickets.sql`](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/fct_tickets.sql) (Ticket facts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Source data"]
  node_seeds["Raw CSV seeds"]
end

subgraph group_staging["Staging models"]
  node_stg_accounts["Stage accounts<br/>[stg_accounts.sql]"]
  node_stg_subscriptions["Stage subscriptions"]
  node_stg_invoices["Stage invoices<br/>[stg_invoices.sql]"]
  node_stg_usage["Stage usage"]
  node_stg_tickets["Stage tickets"]
end

subgraph group_core["Core models"]
  node_dim_account["Account dimension<br/>[dim_account.sql]"]
  node_dim_product["Product dimension<br/>[dim_product.sql]"]
  node_dim_date["Date dimension<br/>[dim_date.sql]"]
  node_fct_revenue["Revenue facts<br/>[fct_revenue.sql]"]
  node_fct_usage["Usage facts<br/>[fct_usage.sql]"]
  node_fct_tickets["Ticket facts<br/>[fct_tickets.sql]"]
  node_health_score["Health scoring macro"]
  node_segment_macro["Segment macro"]
end

subgraph group_analytics["Analytics outputs"]
  node_health["Customer health scores"]
  node_churn["Churn risk view"]
  node_nrr["NRR summary<br/>[nrr_summary.sql]"]
  node_cohorts["Revenue cohorts"]
  node_sla["SLA adherence<br/>[sla_adherence.sql]"]
end

node_operator(("Analytics user"))
node_bigquery[("BigQuery")]
node_looker["Looker Studio"]

node_seeds -->|"stages account data"| node_stg_accounts
node_seeds -->|"stages subscription data"| node_stg_subscriptions
node_seeds -->|"stages invoice data"| node_stg_invoices
node_seeds -->|"stages usage data"| node_stg_usage
node_seeds -->|"stages ticket data"| node_stg_tickets
node_stg_accounts -->|"profiles accounts"| node_dim_account
node_stg_subscriptions -->|"enriches accounts"| node_dim_account
node_stg_tickets -->|"enriches accounts"| node_dim_account
node_stg_subscriptions -->|"describes products"| node_dim_product
node_stg_invoices -->|"supplies billing"| node_fct_revenue
node_stg_subscriptions -->|"supplies MRR"| node_fct_revenue
node_dim_account -->|"keys revenue"| node_fct_revenue
node_dim_date -->|"dates revenue"| node_fct_revenue
node_stg_usage -->|"aggregates events"| node_fct_usage
node_dim_account -->|"keys usage"| node_fct_usage
node_dim_date -->|"dates usage"| node_fct_usage
node_stg_tickets -->|"enriches tickets"| node_fct_tickets
node_dim_account -->|"keys tickets"| node_fct_tickets
node_health_score -->|"scores accounts"| node_health
node_segment_macro -->|"classifies segments"| node_dim_account
node_dim_account -->|"scores accounts"| node_health
node_fct_usage -->|"measures engagement"| node_health
node_fct_tickets -->|"measures support"| node_health
node_fct_revenue -->|"measures revenue"| node_health
node_dim_account -->|"flags risk"| node_churn
node_fct_usage -->|"tracks usage trends"| node_churn
node_fct_tickets -->|"tracks escalations"| node_churn
node_fct_revenue -->|"tracks revenue"| node_churn
node_fct_revenue -->|"calculates retention"| node_nrr
node_dim_account -->|"groups accounts"| node_cohorts
node_fct_revenue -->|"measures retention"| node_cohorts
node_fct_tickets -->|"measures adherence"| node_sla
node_bigquery -.->|"serves mart data"| node_looker
node_operator -->|"views dashboards"| node_looker

click node_seeds "https://github.com/erikroa/nova-customer-intelligence/tree/main/seeds"
click node_stg_accounts "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_accounts.sql"
click node_stg_subscriptions "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_subscriptions.sql"
click node_stg_invoices "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_invoices.sql"
click node_stg_usage "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_usage_events.sql"
click node_stg_tickets "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_support_tickets.sql"
click node_dim_account "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/dim_account.sql"
click node_dim_product "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/dim_product.sql"
click node_dim_date "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/dim_date.sql"
click node_fct_revenue "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/fct_revenue.sql"
click node_fct_usage "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/fct_usage.sql"
click node_fct_tickets "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/fct_tickets.sql"
click node_health_score "https://github.com/erikroa/nova-customer-intelligence/blob/main/macros/calculate_health_score.sql"
click node_segment_macro "https://github.com/erikroa/nova-customer-intelligence/blob/main/macros/classify_segment.sql"
click node_health "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/customer_health_scores.sql"
click node_churn "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/churn_risk_view.sql"
click node_nrr "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/nrr_summary.sql"
click node_cohorts "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/revenue_cohort_analysis.sql"
click node_sla "https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/sla_adherence.sql"

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_seeds,node_operator toneBlue
class node_stg_accounts,node_stg_subscriptions,node_stg_invoices,node_stg_usage,node_stg_tickets,node_bigquery toneAmber
class node_dim_account,node_dim_product,node_dim_date,node_fct_revenue,node_fct_usage,node_fct_tickets,node_health_score,node_segment_macro toneMint
class node_health,node_churn,node_nrr,node_cohorts,node_sla toneRose
class node_looker toneIndigo
```

## Components

### Source data

- [Raw CSV seeds](https://github.com/erikroa/nova-customer-intelligence/tree/main/seeds): `seeds`

### Staging models

- [Stage accounts](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_accounts.sql): `models/staging/models/staging/stg_accounts.sql`
- [Stage subscriptions](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_subscriptions.sql): `models/staging/models/staging/stg_subscriptions.sql`
- [Stage invoices](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_invoices.sql): `models/staging/models/staging/stg_invoices.sql`
- [Stage usage](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_usage_events.sql): `models/staging/models/staging/stg_usage_events.sql`
- [Stage tickets](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/staging/models/staging/stg_support_tickets.sql): `models/staging/models/staging/stg_support_tickets.sql`

### Core models

- [Account dimension](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/dim_account.sql): `models/core/dim_account.sql`
- [Product dimension](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/dim_product.sql): `models/core/dim_product.sql`
- [Date dimension](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/dim_date.sql): `models/core/dim_date.sql`
- [Revenue facts](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/fct_revenue.sql): `models/core/fct_revenue.sql`
- [Usage facts](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/fct_usage.sql): `models/core/fct_usage.sql`
- [Ticket facts](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/core/fct_tickets.sql): `models/core/fct_tickets.sql`
- [Health scoring macro](https://github.com/erikroa/nova-customer-intelligence/blob/main/macros/calculate_health_score.sql): `macros/calculate_health_score.sql`
- [Segment macro](https://github.com/erikroa/nova-customer-intelligence/blob/main/macros/classify_segment.sql): `macros/classify_segment.sql`

### Analytics outputs

- [Customer health scores](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/customer_health_scores.sql): `models/marts/customer_health_scores.sql`
- [Churn risk view](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/churn_risk_view.sql): `models/marts/churn_risk_view.sql`
- [NRR summary](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/nrr_summary.sql): `models/marts/nrr_summary.sql`
- [Revenue cohorts](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/revenue_cohort_analysis.sql): `models/marts/revenue_cohort_analysis.sql`
- [SLA adherence](https://github.com/erikroa/nova-customer-intelligence/blob/main/models/marts/sla_adherence.sql): `models/marts/sla_adherence.sql`

### Other components

- **Analytics user**
- **BigQuery**
- **Looker Studio**

## Connections

- Raw CSV seeds → Stage accounts: stages account data
- Raw CSV seeds → Stage subscriptions: stages subscription data
- Raw CSV seeds → Stage invoices: stages invoice data
- Raw CSV seeds → Stage usage: stages usage data
- Raw CSV seeds → Stage tickets: stages ticket data
- Stage accounts → Account dimension: profiles accounts
- Stage subscriptions → Account dimension: enriches accounts
- Stage tickets → Account dimension: enriches accounts
- Stage subscriptions → Product dimension: describes products
- Stage invoices → Revenue facts: supplies billing
- Stage subscriptions → Revenue facts: supplies MRR
- Account dimension → Revenue facts: keys revenue
- Date dimension → Revenue facts: dates revenue
- Stage usage → Usage facts: aggregates events
- Account dimension → Usage facts: keys usage
- Date dimension → Usage facts: dates usage
- Stage tickets → Ticket facts: enriches tickets
- Account dimension → Ticket facts: keys tickets
- Health scoring macro → Customer health scores: scores accounts
- Segment macro → Account dimension: classifies segments
- Account dimension → Customer health scores: scores accounts
- Usage facts → Customer health scores: measures engagement
- Ticket facts → Customer health scores: measures support
- Revenue facts → Customer health scores: measures revenue
- Account dimension → Churn risk view: flags risk
- Usage facts → Churn risk view: tracks usage trends
- Ticket facts → Churn risk view: tracks escalations
- Revenue facts → Churn risk view: tracks revenue
- Revenue facts → NRR summary: calculates retention
- Account dimension → Revenue cohorts: groups accounts
- Revenue facts → Revenue cohorts: measures retention
- Ticket facts → SLA adherence: measures adherence
- BigQuery → Looker Studio: serves mart data
- Analytics user → Looker Studio: views dashboards
