# Graph Report - .  (2026-07-20)

## Corpus Check
- 46 files · ~29,480 words
- Verdict: corpus is large enough that graph structure adds value.

## Summary
- 231 nodes · 288 edges · 24 communities detected
- Extraction: 91% EXTRACTED · 9% INFERRED · 0% AMBIGUOUS · INFERRED: 25 edges (avg confidence: 0.82)
- Token cost: 0 input · 0 output

## Community Hubs (Navigation)
- [[_COMMUNITY_Application Core|Application Core]]
- [[_COMMUNITY_Data Layer|Data Layer]]
- [[_COMMUNITY_Analytics Engine|Analytics Engine]]
- [[_COMMUNITY_AI Integration|AI Integration]]
- [[_COMMUNITY_Insights Engine|Insights Engine]]
- [[_COMMUNITY_Data API|Data API]]
- [[_COMMUNITY_User & Seeding|User & Seeding]]
- [[_COMMUNITY_Analytics API|Analytics API]]
- [[_COMMUNITY_Auth API|Auth API]]
- [[_COMMUNITY_Service Provider|Service Provider]]
- [[_COMMUNITY_Dashboard API|Dashboard API]]
- [[_COMMUNITY_Gemini API|Gemini API]]
- [[_COMMUNITY_Insights API|Insights API]]
- [[_COMMUNITY_Settings API|Settings API]]
- [[_COMMUNITY_Test Factory|Test Factory]]
- [[_COMMUNITY_Auth Middleware|Auth Middleware]]
- [[_COMMUNITY_Feature Tests|Feature Tests]]
- [[_COMMUNITY_Unit Tests|Unit Tests]]
- [[_COMMUNITY_Core Config|Core Config]]
- [[_COMMUNITY_Base Controller|Base Controller]]
- [[_COMMUNITY_Test Base|Test Base]]
- [[_COMMUNITY_Auth Config|Auth Config]]
- [[_COMMUNITY_Welcome Concept|Welcome Concept]]
- [[_COMMUNITY_Provider Concept|Provider Concept]]

## God Nodes (most connected - your core abstractions)
1. `AnalyticsService` - 27 edges
2. `PzemData` - 26 edges
3. `DataService` - 15 edges
4. `GeminiService` - 14 edges
5. `InsightsService` - 14 edges
6. `DataController` - 13 edges
7. `DataService` - 10 edges
8. `InsightsService` - 10 edges
9. `PzemData` - 9 edges
10. `AnalyticsService` - 9 edges

## Surprising Connections (you probably didn't know these)
- `web routes` --references--> `EnsureUserIsAuthenticated`  [INFERRED]
  routes/web.php → app/Http/Middleware/EnsureUserIsAuthenticated.php
- `PzemData` --references--> `create_pzem_data_table migration`  [EXTRACTED]
  app/Models/PzemData.php → database/migrations/2026_07_11_112535_create_pzem_data_table.php
- `dashboard view` --shares_data_with--> `DataService`  [INFERRED]
  resources/views/dashboard.blade.php → app/Services/DataService.php
- `dashboard view` --shares_data_with--> `AnalyticsService`  [INFERRED]
  resources/views/dashboard.blade.php → app/Services/AnalyticsService.php
- `dashboard view` --shares_data_with--> `InsightsService`  [INFERRED]
  resources/views/dashboard.blade.php → app/Services/InsightsService.php

## Hyperedges (group relationships)
- **PZEM sensor data flow through services to dashboard** — model_pzemdata, service_dataservice, controller_dashboardcontroller, view_dashboard [INFERRED 0.95]
- **AI-powered insights pipeline via Gemini** — service_geminiservice, service_dataservice, service_insightsservice, controller_geminicontroller [INFERRED 0.90]
- **Analytics compute engine with caching and sampling** — service_analyticsservice, model_pzemdata, config_energy, concept_linear_regression [INFERRED 0.85]

## Communities (48 total, 22 thin omitted)

### Community 0 - "Application Core"
Cohesion: 0.1
Nodes (35): cache invalidation on PzemData creation, circadian centroid for load pattern analysis, Gemini API context building, health score calculation, multi-dimensional z-score anomaly detection, linear regression for trend analysis, load state classification, scopeHourly (+27 more)

### Community 23 - "Core Config"
Cohesion: 0.67
Nodes (3): app config, database config, session config

## Knowledge Gaps
- **23 isolated node(s):** `Controller`, `TestCase`, `User`, `EnsureUserIsAuthenticated`, `auth config` (+18 more)
  These have ≤1 connection - possible missing edges or undocumented components.
- **22 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.

## Suggested Questions
_Questions this graph is uniquely positioned to answer:_

- **Why does `PzemData` connect `Data Layer` to `Analytics Engine`, `Insights Engine`?**
  _High betweenness centrality (0.075) - this node is a cross-community bridge._
- **Are the 12 inferred relationships involving `PzemData` (e.g. with `.get()` and `.module()`) actually correct?**
  _`PzemData` has 12 INFERRED edges - model-reasoned connections that need verification._
- **What connects `Controller`, `TestCase`, `User` to the rest of the system?**
  _23 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Application Core` be split into smaller, more focused modules?**
  _Cohesion score 0.1 - nodes in this community are weakly interconnected._
- **Should `Data Layer` be split into smaller, more focused modules?**
  _Cohesion score 0.09 - nodes in this community are weakly interconnected._
- **Should `Data API` be split into smaller, more focused modules?**
  _Cohesion score 0.14 - nodes in this community are weakly interconnected._