# charan270469/dailyez architecture

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

- Interactive diagram: https://gitdiagram.com/charan270469/dailyez
- Repository: https://github.com/charan270469/dailyez

## Overview

#### Purpose and entry points
DailyEz is a full-stack priority-inbox product intended to consolidate important communications and rank them by user relevance. The browser application starts at `src/main.tsx`, renders `src/App.tsx`, and is built with Vite (`vite.config.ts`). The backend entry point is `server/index.js`.

#### Client application shell
The frontend is a TypeScript React dashboard organized around a persistent layout and navigation:
- `src/DashboardLayout.tsx`
- `src/components/Sidebar.tsx`
- `src/components/TopNavbar.tsx`

It presents separate priority, inbox, matched, archive, analytics, settings, help, and watchlist views. The primary message-review surfaces are `src/components/PriorityFeed.tsx`, `src/components/InboxFeed.tsx`, and `src/components/MessageDetailModal.tsx`.

#### Client/server boundary
Frontend data access is centralized in `src/lib/api.ts`, which is the key boundary between UI state and backend endpoints. Shared client-side message/domain shapes live in `src/types.ts`; `src/mockData.ts` likely supports development/demo rendering when live data is absent. Authentication-facing UI and connected-platform state are represented by `src/components/EditProfileModal.tsx` and `src/components/ConnectedPlatforms.tsx`.

#### Backend API, identity, and persistence
The server owns request handling, authentication, and database access:
- `server/index.js`
- `server/auth.js`
- `server/authRoutes.js`
- `server/db.js`

This separates identity/session or provider authorization concerns from message processing. The exact database and auth provider are not identifiable from the supplied tree, but Gmail access likely crosses this boundary before ingestion.

#### Gmail ingestion stage
Gmail is the only explicitly implemented source adapter in the repository:
- `server/gmail/fetchMessages.js`
- `server/index.js`
- `server/authRoutes.js`

Its control flow is expected to authenticate/connect a user, fetch Gmail messages, then pass message content and metadata into the matching pipeline. Although the product description names WhatsApp and Discord, no corresponding source adapters appear in this tree.

#### Relevance and watchlist matching pipeline
Message prioritization is decomposed into focused server-side stages:
- `server/agents/parseSignalEntity.js`
- `server/agents/matchSourceIntent.js`
- `server/agents/keywordMatch.js`
- `server/agents/matchSignal.js`
- `server/watchlistMatcher.js`

The likely flow is: parse entities/signals from an incoming message, assess source intent, compare terms and entities against a watchlist, then produce a match/relevance signal. This modular boundary is the core ranking/explainability layer that feeds the priority and matched-message UI.

#### User feedback and presentation loop
Matched or prioritized records are surfaced through `src/components/MatchedTab.tsx`, `src/components/InboxMessageCard.tsx`, and `src/components/WatchlistPanel.tsx`. User-managed watchlist criteria form the principal feedback/control input into server matching. Analytics visualization is isolated in `src/components/AnalyticsTab.tsx` and `src/components/DailyVolumeChart.tsx`, while archived content is handled by `src/components/ArchiveTab.tsx`.

Main entry points: [`src/DashboardLayout.tsx`](https://github.com/charan270469/dailyez/blob/main/src/DashboardLayout.tsx) (Dashboard layout), [`src/lib/api.ts`](https://github.com/charan270469/dailyez/blob/main/src/lib/api.ts) (API client), [`server/db.js`](https://github.com/charan270469/dailyez/blob/main/server/db.js) (Database access), [`src/components/PriorityFeed.tsx`](https://github.com/charan270469/dailyez/blob/main/src/components/PriorityFeed.tsx) (Priority and inbox feeds)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_client_entry["React entry<br/>Vite React bootstrap<br/>[main.tsx]"]
  node_app_shell["App shell<br/>React application<br/>[App.tsx]"]
  node_dashboard["Dashboard layout<br/>persistent layout"]
  node_navigation["Sidebar and top nav<br/>navigation UI<br/>[Sidebar.tsx]"]
  node_message_feeds["Priority and inbox feeds<br/>message review UI<br/>[PriorityFeed.tsx]"]
  node_message_detail["Message detail<br/>review modal"]
  node_matched_watchlist_ui["Matched and watchlist UI<br/>feedback controls<br/>[MatchedTab.tsx]"]
  node_analytics_archive["Analytics and archive<br/>dashboard views<br/>[AnalyticsTab.tsx]"]
  node_api_client["API client<br/>frontend data boundary<br/>[api.ts]"]
  node_domain_types["Message domain types<br/>TypeScript models<br/>[types.ts]"]
end

subgraph group_api["Server API"]
  node_server["Server entry<br/>HTTP API<br/>[index.js]"]
  node_auth_routes["Auth routes<br/>identity endpoints<br/>[authRoutes.js]"]
  node_auth["Authentication<br/>identity integration<br/>[auth.js]"]
  node_database[("Database access<br/>persistence boundary<br/>[db.js]")]
end

subgraph group_ingestion["Gmail ingestion"]
  node_gmail_fetch["Gmail fetcher<br/>source adapter<br/>[fetchMessages.js]"]
end

subgraph group_matching["Relevance matching"]
  node_entity_parser["Signal entity parser<br/>message enrichment"]
  node_source_intent["Source intent matcher<br/>relevance stage"]
  node_keyword_match["Keyword matcher<br/>relevance stage<br/>[keywordMatch.js]"]
  node_signal_match["Signal matcher<br/>relevance stage<br/>[matchSignal.js]"]
  node_watchlist_matcher["Watchlist matcher<br/>ranking orchestrator"]
end

node_client_entry -->|"renders"| node_app_shell
node_app_shell -->|"hosts"| node_dashboard
node_dashboard -->|"includes"| node_navigation
node_dashboard -->|"presents"| node_message_feeds
node_message_feeds -->|"opens"| node_message_detail
node_dashboard -->|"presents"| node_matched_watchlist_ui
node_dashboard -->|"presents"| node_analytics_archive
node_message_feeds -->|"loads messages"| node_api_client
node_matched_watchlist_ui -->|"reads and updates criteria"| node_api_client
node_api_client -.->|"uses"| node_domain_types
node_api_client -->|"HTTP requests"| node_server
node_server -->|"serves"| node_auth_routes
node_auth_routes -->|"authenticates"| node_auth
node_server -->|"reads and writes"| node_database
node_auth_routes -->|"authorizes access"| node_gmail_fetch
node_gmail_fetch -->|"supplies messages"| node_entity_parser
node_entity_parser -->|"enriched content"| node_source_intent
node_entity_parser -->|"entities and terms"| node_keyword_match
node_source_intent -->|"intent assessment"| node_signal_match
node_keyword_match -->|"keyword evidence"| node_signal_match
node_signal_match -->|"match evidence"| node_watchlist_matcher
node_database -->|"watchlist criteria"| node_watchlist_matcher
node_watchlist_matcher -->|"stores match results"| node_database
node_database -.->|"messages and matches"| node_api_client

click node_client_entry "https://github.com/charan270469/dailyez/blob/main/src/main.tsx"
click node_app_shell "https://github.com/charan270469/dailyez/blob/main/src/App.tsx"
click node_dashboard "https://github.com/charan270469/dailyez/blob/main/src/DashboardLayout.tsx"
click node_navigation "https://github.com/charan270469/dailyez/blob/main/src/components/Sidebar.tsx"
click node_message_feeds "https://github.com/charan270469/dailyez/blob/main/src/components/PriorityFeed.tsx"
click node_message_detail "https://github.com/charan270469/dailyez/blob/main/src/components/MessageDetailModal.tsx"
click node_matched_watchlist_ui "https://github.com/charan270469/dailyez/blob/main/src/components/MatchedTab.tsx"
click node_analytics_archive "https://github.com/charan270469/dailyez/blob/main/src/components/AnalyticsTab.tsx"
click node_api_client "https://github.com/charan270469/dailyez/blob/main/src/lib/api.ts"
click node_domain_types "https://github.com/charan270469/dailyez/blob/main/src/types.ts"
click node_server "https://github.com/charan270469/dailyez/blob/main/server/index.js"
click node_auth_routes "https://github.com/charan270469/dailyez/blob/main/server/authRoutes.js"
click node_auth "https://github.com/charan270469/dailyez/blob/main/server/auth.js"
click node_database "https://github.com/charan270469/dailyez/blob/main/server/db.js"
click node_gmail_fetch "https://github.com/charan270469/dailyez/blob/main/server/gmail/fetchMessages.js"
click node_entity_parser "https://github.com/charan270469/dailyez/blob/main/server/agents/parseSignalEntity.js"
click node_source_intent "https://github.com/charan270469/dailyez/blob/main/server/agents/matchSourceIntent.js"
click node_keyword_match "https://github.com/charan270469/dailyez/blob/main/server/agents/keywordMatch.js"
click node_signal_match "https://github.com/charan270469/dailyez/blob/main/server/agents/matchSignal.js"
click node_watchlist_matcher "https://github.com/charan270469/dailyez/blob/main/server/watchlistMatcher.js"

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_client_entry,node_app_shell,node_dashboard,node_navigation,node_message_feeds,node_message_detail,node_matched_watchlist_ui,node_analytics_archive,node_api_client,node_domain_types toneBlue
class node_server,node_auth_routes,node_auth,node_database toneAmber
class node_gmail_fetch toneMint
class node_entity_parser,node_source_intent,node_keyword_match,node_signal_match,node_watchlist_matcher toneRose
```

## Components

### React client

- [React entry](https://github.com/charan270469/dailyez/blob/main/src/main.tsx): Vite React bootstrap · `src/main.tsx`
- [App shell](https://github.com/charan270469/dailyez/blob/main/src/App.tsx): React application · `src/App.tsx`
- [Dashboard layout](https://github.com/charan270469/dailyez/blob/main/src/DashboardLayout.tsx): persistent layout · `src/DashboardLayout.tsx`
- [Sidebar and top nav](https://github.com/charan270469/dailyez/blob/main/src/components/Sidebar.tsx): navigation UI · `src/components/Sidebar.tsx`
- [Priority and inbox feeds](https://github.com/charan270469/dailyez/blob/main/src/components/PriorityFeed.tsx): message review UI · `src/components/PriorityFeed.tsx`
- [Message detail](https://github.com/charan270469/dailyez/blob/main/src/components/MessageDetailModal.tsx): review modal · `src/components/MessageDetailModal.tsx`
- [Matched and watchlist UI](https://github.com/charan270469/dailyez/blob/main/src/components/MatchedTab.tsx): feedback controls · Users manage criteria and inspect matched messages. · `src/components/MatchedTab.tsx`
- [Analytics and archive](https://github.com/charan270469/dailyez/blob/main/src/components/AnalyticsTab.tsx): dashboard views · `src/components/AnalyticsTab.tsx`
- [API client](https://github.com/charan270469/dailyez/blob/main/src/lib/api.ts): frontend data boundary · `src/lib/api.ts`
- [Message domain types](https://github.com/charan270469/dailyez/blob/main/src/types.ts): TypeScript models · `src/types.ts`

### Server API

- [Server entry](https://github.com/charan270469/dailyez/blob/main/server/index.js): HTTP API · `server/index.js`
- [Auth routes](https://github.com/charan270469/dailyez/blob/main/server/authRoutes.js): identity endpoints · `server/authRoutes.js`
- [Authentication](https://github.com/charan270469/dailyez/blob/main/server/auth.js): identity integration · `server/auth.js`
- [Database access](https://github.com/charan270469/dailyez/blob/main/server/db.js): persistence boundary · `server/db.js`

### Gmail ingestion

- [Gmail fetcher](https://github.com/charan270469/dailyez/blob/main/server/gmail/fetchMessages.js): source adapter · Only explicit message-source adapter. · `server/gmail/fetchMessages.js`

### Relevance matching

- [Signal entity parser](https://github.com/charan270469/dailyez/blob/main/server/agents/parseSignalEntity.js): message enrichment · `server/agents/parseSignalEntity.js`
- [Source intent matcher](https://github.com/charan270469/dailyez/blob/main/server/agents/matchSourceIntent.js): relevance stage · `server/agents/matchSourceIntent.js`
- [Keyword matcher](https://github.com/charan270469/dailyez/blob/main/server/agents/keywordMatch.js): relevance stage · `server/agents/keywordMatch.js`
- [Signal matcher](https://github.com/charan270469/dailyez/blob/main/server/agents/matchSignal.js): relevance stage · `server/agents/matchSignal.js`
- [Watchlist matcher](https://github.com/charan270469/dailyez/blob/main/server/watchlistMatcher.js): ranking orchestrator · Produces relevance and match signals from message data and criteria. · `server/watchlistMatcher.js`

## Connections

- React entry → App shell: renders
- App shell → Dashboard layout: hosts
- Dashboard layout → Sidebar and top nav: includes
- Dashboard layout → Priority and inbox feeds: presents
- Priority and inbox feeds → Message detail: opens
- Dashboard layout → Matched and watchlist UI: presents
- Dashboard layout → Analytics and archive: presents
- Priority and inbox feeds → API client: loads messages
- Matched and watchlist UI → API client: reads and updates criteria
- API client → Message domain types: uses
- API client → Server entry: HTTP requests
- Server entry → Auth routes: serves
- Auth routes → Authentication: authenticates
- Server entry → Database access: reads and writes
- Auth routes → Gmail fetcher: authorizes access
- Gmail fetcher → Signal entity parser: supplies messages
- Signal entity parser → Source intent matcher: enriched content
- Signal entity parser → Keyword matcher: entities and terms
- Source intent matcher → Signal matcher: intent assessment
- Keyword matcher → Signal matcher: keyword evidence
- Signal matcher → Watchlist matcher: match evidence
- Database access → Watchlist matcher: watchlist criteria
- Watchlist matcher → Database access: stores match results
- Database access → API client: messages and matches · Returned through server endpoints.
