# dyingpotato890/chatlytics architecture

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

- Interactive diagram: https://gitdiagram.com/dyingpotato890/chatlytics
- Repository: https://github.com/dyingpotato890/chatlytics

## Overview

Chatlytics is a Flutter app for importing WhatsApp chat exports and exploring conversation analytics, with a separate daily AI-summary capability. The README documents the principal features; the sampled source contains only platform bootstrap code, so relationships among Dart pages, parsing, models, and widgets are inferred from names and documentation rather than verified call sites.

Main entry points: [`lib/pages/analysis_page.dart`](https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/analysis_page.dart) (Analysis page), [`lib/pages/home_page.dart`](https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/home_page.dart) (Home), [`lib/pages/ai_sumary_menu.dart`](https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/ai_sumary_menu.dart) (Summary menu), [`lib/services/whatsapp.dart`](https://github.com/dyingpotato890/chatlytics/blob/main/lib/services/whatsapp.dart) (WhatsApp import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App flow"]
  node_home["Home<br/>[home_page.dart]"]
  node_analysis["Analysis page<br/>[analysis_page.dart]"]
  node_summary_menu["Summary menu"]
end

subgraph group_import["Chat import"]
  node_whatsapp["WhatsApp import<br/>[whatsapp.dart]"]
  node_chat_data["Chat data<br/>[data.dart]"]
  node_message["Message<br/>[message.dart]"]
  node_streak_info["Streak info<br/>[streak_info.dart]"]
end

subgraph group_analytics["Chat analytics"]
  node_overview["Overview<br/>[overview.dart]"]
  node_monthly["Monthly trends"]
  node_weekly["Weekly trends"]
  node_yearly["Annual trends"]
  node_participants["Messages per user"]
  node_first_last["First and last"]
  node_words["Top words<br/>[top_words.dart]"]
  node_emoji["Emoji analysis"]
  node_days["Most active days"]
  node_hours["Most active hours"]
  node_streak["Messaging streak<br/>[streak.dart]"]
  node_links["Link analysis<br/>[link_analysis.dart]"]
  node_cuss_words["Cuss words"]
end

subgraph group_presentation["Insights UI"]
  node_summary["Daily AI summary<br/>[ai_summary.dart]"]
end

node_user(("Chatlytics user"))

node_user -->|"opens app"| node_home
node_home -->|"imports chat"| node_whatsapp
node_home -->|"opens analysis"| node_analysis
node_analysis -->|"shows insights"| node_overview
node_analysis -->|"shows trends"| node_monthly
node_analysis -->|"shows trends"| node_weekly
node_analysis -->|"shows trends"| node_yearly
node_analysis -->|"shows counts"| node_participants
node_analysis -->|"shows dates"| node_first_last
node_analysis -->|"shows words"| node_words
node_analysis -->|"shows emojis"| node_emoji
node_analysis -->|"shows activity"| node_days
node_analysis -->|"shows activity"| node_hours
node_analysis -->|"shows streak"| node_streak
node_analysis -->|"shows links"| node_links
node_analysis -->|"shows words"| node_cuss_words
node_home -->|"opens summaries"| node_summary_menu
node_summary_menu -->|"requests summary"| node_summary

click node_home "https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/home_page.dart"
click node_analysis "https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/analysis_page.dart"
click node_summary_menu "https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/ai_sumary_menu.dart"
click node_whatsapp "https://github.com/dyingpotato890/chatlytics/blob/main/lib/services/whatsapp.dart"
click node_chat_data "https://github.com/dyingpotato890/chatlytics/blob/main/lib/models/data.dart"
click node_message "https://github.com/dyingpotato890/chatlytics/blob/main/lib/models/message.dart"
click node_streak_info "https://github.com/dyingpotato890/chatlytics/blob/main/lib/models/streak_info.dart"
click node_overview "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/overview.dart"
click node_monthly "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/chats_per_months.dart"
click node_weekly "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/chats_per_week.dart"
click node_yearly "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/chats_per_year.dart"
click node_participants "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/messages_per_user.dart"
click node_first_last "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/first_last_message.dart"
click node_words "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/top_words.dart"
click node_emoji "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/emoji_analysis.dart"
click node_days "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/most_talked_days.dart"
click node_hours "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/most_talked_hours.dart"
click node_streak "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/streak.dart"
click node_summary "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/ai_summary.dart"
click node_links "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/link_analysis.dart"
click node_cuss_words "https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/top_cuss_words.dart"

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_home,node_analysis,node_summary_menu,node_user toneBlue
class node_whatsapp,node_chat_data,node_message,node_streak_info toneAmber
class node_overview,node_monthly,node_weekly,node_yearly,node_participants,node_first_last,node_words,node_emoji,node_days,node_hours,node_streak,node_links,node_cuss_words toneMint
class node_summary toneRose
```

## Components

### App flow

- [Home](https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/home_page.dart): `lib/pages/home_page.dart`
- [Analysis page](https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/analysis_page.dart): `lib/pages/analysis_page.dart`
- [Summary menu](https://github.com/dyingpotato890/chatlytics/blob/main/lib/pages/ai_sumary_menu.dart): `lib/pages/ai_sumary_menu.dart`

### Chat import

- [WhatsApp import](https://github.com/dyingpotato890/chatlytics/blob/main/lib/services/whatsapp.dart): `lib/services/whatsapp.dart`
- [Chat data](https://github.com/dyingpotato890/chatlytics/blob/main/lib/models/data.dart): `lib/models/data.dart`
- [Message](https://github.com/dyingpotato890/chatlytics/blob/main/lib/models/message.dart): `lib/models/message.dart`
- [Streak info](https://github.com/dyingpotato890/chatlytics/blob/main/lib/models/streak_info.dart): `lib/models/streak_info.dart`

### Chat analytics

- [Overview](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/overview.dart): `lib/widgets/overview.dart`
- [Monthly trends](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/chats_per_months.dart): `lib/widgets/chats_per_months.dart`
- [Weekly trends](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/chats_per_week.dart): `lib/widgets/chats_per_week.dart`
- [Annual trends](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/chats_per_year.dart): `lib/widgets/chats_per_year.dart`
- [Messages per user](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/messages_per_user.dart): `lib/widgets/messages_per_user.dart`
- [First and last](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/first_last_message.dart): `lib/widgets/first_last_message.dart`
- [Top words](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/top_words.dart): `lib/widgets/top_words.dart`
- [Emoji analysis](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/emoji_analysis.dart): `lib/widgets/emoji_analysis.dart`
- [Most active days](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/most_talked_days.dart): `lib/widgets/most_talked_days.dart`
- [Most active hours](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/most_talked_hours.dart): `lib/widgets/most_talked_hours.dart`
- [Messaging streak](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/streak.dart): `lib/widgets/streak.dart`
- [Link analysis](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/link_analysis.dart): `lib/widgets/link_analysis.dart`
- [Cuss words](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/top_cuss_words.dart): `lib/widgets/top_cuss_words.dart`

### Insights UI

- [Daily AI summary](https://github.com/dyingpotato890/chatlytics/blob/main/lib/widgets/ai_summary.dart): `lib/widgets/ai_summary.dart`

### Other components

- **Chatlytics user**

## Connections

- Chatlytics user → Home: opens app
- Home → WhatsApp import: imports chat
- Home → Analysis page: opens analysis
- Analysis page → Overview: shows insights
- Analysis page → Monthly trends: shows trends
- Analysis page → Weekly trends: shows trends
- Analysis page → Annual trends: shows trends
- Analysis page → Messages per user: shows counts
- Analysis page → First and last: shows dates
- Analysis page → Top words: shows words
- Analysis page → Emoji analysis: shows emojis
- Analysis page → Most active days: shows activity
- Analysis page → Most active hours: shows activity
- Analysis page → Messaging streak: shows streak
- Analysis page → Link analysis: shows links
- Analysis page → Cuss words: shows words
- Home → Summary menu: opens summaries
- Summary menu → Daily AI summary: requests summary
