# tfs-here/marketpulse architecture

> Architecture diagram of the GitHub repository tfs-here/marketpulse, 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/tfs-here/marketpulse
- Repository: https://github.com/tfs-here/marketpulse

## Overview

Market Pulse is a fictional-data mobile app for discovering and inspecting insider-trade examples. A user starts on Home, reviews locally derived summaries and recent activity, opens the Screener to search or filter trades, then selects a result for its filing details and mock activity chart. The main internal layers are the stack navigator, locally defined trade data and types, and reusable presentation components. The README documents Trade Details behavior, but its source was not sampled; connections to its data and chart reflect that documented workflow, not inspected implementation.

Main entry points: [`src/screens/HomeScreen.tsx`](https://github.com/tfs-here/marketpulse/blob/master/src/screens/HomeScreen.tsx) (Home screen), [`src/screens/ScreenerScreen.tsx`](https://github.com/tfs-here/marketpulse/blob/master/src/screens/ScreenerScreen.tsx) (Trade screener), [`src/navigation/AppNavigator.tsx`](https://github.com/tfs-here/marketpulse/blob/master/src/navigation/AppNavigator.tsx) (Stack navigator), [`src/components/TradeCard.tsx`](https://github.com/tfs-here/marketpulse/blob/master/src/components/TradeCard.tsx) (Trade card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_entry["Expo entry<br/>[index.ts]"]
  node_app["App root<br/>[App.tsx]"]
  node_navigator["Stack navigator<br/>[AppNavigator.tsx]"]
end

subgraph group_discovery["Trade discovery"]
  node_home["Home screen<br/>[HomeScreen.tsx]"]
  node_screener["Trade screener<br/>[ScreenerScreen.tsx]"]
  node_details["Trade details"]
end

subgraph group_data["Local trade data"]
  node_trades[("Mock trades<br/>[mockTrades.ts]")]
  node_trade_types["Trade types<br/>[trade.ts]"]
end

subgraph group_ui["Presentation"]
  node_summary["Summary card<br/>[SummaryCard.tsx]"]
  node_trade_card["Trade card<br/>[TradeCard.tsx]"]
  node_filter_chip["Filter chip<br/>[FilterChip.tsx]"]
  node_signal_badge["Signal badge<br/>[SignalBadge.tsx]"]
  node_activity_chart["Mock activity chart"]
  node_formatters["Value formatters<br/>[formatters.ts]"]
  node_theme["Theme colors<br/>[colors.ts]"]
end

node_user(("Mobile user"))

node_user -->|"launches"| node_entry
node_entry -->|"registers"| node_app
node_app -->|"renders"| node_navigator
node_navigator -->|"routes"| node_home
node_navigator -->|"routes"| node_screener
node_navigator -->|"routes"| node_details
node_home -->|"opens search"| node_screener
node_home -->|"reads"| node_trades
node_home -->|"renders"| node_summary
node_home -->|"renders"| node_trade_card
node_screener -->|"filters"| node_trades
node_screener -->|"renders"| node_filter_chip
node_screener -->|"renders"| node_trade_card
node_screener -->|"opens selected trade"| node_details
node_details -.->|"loads trade"| node_trades
node_details -.->|"supplies activity data"| node_activity_chart
node_trade_card -->|"renders"| node_signal_badge
node_home -->|"formats values"| node_formatters
node_trade_card -->|"formats value"| node_formatters
node_home -->|"uses colors"| node_theme
node_trade_card -->|"uses colors"| node_theme
node_activity_chart -->|"uses colors"| node_theme
node_home -->|"uses route and trade types"| node_trade_types
node_screener -->|"uses route and trade types"| node_trade_types
node_navigator -->|"uses route types"| node_trade_types
node_trades -->|"types records"| node_trade_types

click node_entry "https://github.com/tfs-here/marketpulse/blob/master/index.ts"
click node_app "https://github.com/tfs-here/marketpulse/blob/master/App.tsx"
click node_navigator "https://github.com/tfs-here/marketpulse/blob/master/src/navigation/AppNavigator.tsx"
click node_home "https://github.com/tfs-here/marketpulse/blob/master/src/screens/HomeScreen.tsx"
click node_screener "https://github.com/tfs-here/marketpulse/blob/master/src/screens/ScreenerScreen.tsx"
click node_details "https://github.com/tfs-here/marketpulse/blob/master/src/screens/TradeDetailsScreen.tsx"
click node_trades "https://github.com/tfs-here/marketpulse/blob/master/src/data/mockTrades.ts"
click node_trade_types "https://github.com/tfs-here/marketpulse/blob/master/src/types/trade.ts"
click node_summary "https://github.com/tfs-here/marketpulse/blob/master/src/components/SummaryCard.tsx"
click node_trade_card "https://github.com/tfs-here/marketpulse/blob/master/src/components/TradeCard.tsx"
click node_filter_chip "https://github.com/tfs-here/marketpulse/blob/master/src/components/FilterChip.tsx"
click node_signal_badge "https://github.com/tfs-here/marketpulse/blob/master/src/components/SignalBadge.tsx"
click node_activity_chart "https://github.com/tfs-here/marketpulse/blob/master/src/components/MockActivityChart.tsx"
click node_formatters "https://github.com/tfs-here/marketpulse/blob/master/src/utils/formatters.ts"
click node_theme "https://github.com/tfs-here/marketpulse/blob/master/src/theme/colors.ts"

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_entry,node_app,node_navigator,node_user toneBlue
class node_home,node_screener,node_details toneAmber
class node_trades,node_trade_types toneMint
class node_summary,node_trade_card,node_filter_chip,node_signal_badge,node_activity_chart,node_formatters,node_theme toneRose
```

## Components

### App shell

- [Expo entry](https://github.com/tfs-here/marketpulse/blob/master/index.ts): `index.ts`
- [App root](https://github.com/tfs-here/marketpulse/blob/master/App.tsx): `App.tsx`
- [Stack navigator](https://github.com/tfs-here/marketpulse/blob/master/src/navigation/AppNavigator.tsx): `src/navigation/AppNavigator.tsx`

### Trade discovery

- [Home screen](https://github.com/tfs-here/marketpulse/blob/master/src/screens/HomeScreen.tsx): `src/screens/HomeScreen.tsx`
- [Trade screener](https://github.com/tfs-here/marketpulse/blob/master/src/screens/ScreenerScreen.tsx): `src/screens/ScreenerScreen.tsx`
- [Trade details](https://github.com/tfs-here/marketpulse/blob/master/src/screens/TradeDetailsScreen.tsx): `src/screens/TradeDetailsScreen.tsx`

### Local trade data

- [Mock trades](https://github.com/tfs-here/marketpulse/blob/master/src/data/mockTrades.ts): `src/data/mockTrades.ts`
- [Trade types](https://github.com/tfs-here/marketpulse/blob/master/src/types/trade.ts): `src/types/trade.ts`

### Presentation

- [Summary card](https://github.com/tfs-here/marketpulse/blob/master/src/components/SummaryCard.tsx): `src/components/SummaryCard.tsx`
- [Trade card](https://github.com/tfs-here/marketpulse/blob/master/src/components/TradeCard.tsx): `src/components/TradeCard.tsx`
- [Filter chip](https://github.com/tfs-here/marketpulse/blob/master/src/components/FilterChip.tsx): `src/components/FilterChip.tsx`
- [Signal badge](https://github.com/tfs-here/marketpulse/blob/master/src/components/SignalBadge.tsx): `src/components/SignalBadge.tsx`
- [Mock activity chart](https://github.com/tfs-here/marketpulse/blob/master/src/components/MockActivityChart.tsx): `src/components/MockActivityChart.tsx`
- [Value formatters](https://github.com/tfs-here/marketpulse/blob/master/src/utils/formatters.ts): `src/utils/formatters.ts`
- [Theme colors](https://github.com/tfs-here/marketpulse/blob/master/src/theme/colors.ts): `src/theme/colors.ts`

### Other components

- **Mobile user**

## Connections

- Mobile user → Expo entry: launches
- Expo entry → App root: registers
- App root → Stack navigator: renders
- Stack navigator → Home screen: routes
- Stack navigator → Trade screener: routes
- Stack navigator → Trade details: routes
- Home screen → Trade screener: opens search
- Home screen → Mock trades: reads
- Home screen → Summary card: renders
- Home screen → Trade card: renders
- Trade screener → Mock trades: filters
- Trade screener → Filter chip: renders
- Trade screener → Trade card: renders
- Trade screener → Trade details: opens selected trade
- Trade details → Mock trades: loads trade
- Trade details → Mock activity chart: supplies activity data
- Trade card → Signal badge: renders
- Home screen → Value formatters: formats values
- Trade card → Value formatters: formats value
- Home screen → Theme colors: uses colors
- Trade card → Theme colors: uses colors
- Mock activity chart → Theme colors: uses colors
- Home screen → Trade types: uses route and trade types
- Trade screener → Trade types: uses route and trade types
- Stack navigator → Trade types: uses route types
- Mock trades → Trade types: types records
