# ryofficial87-ai/bossxv6 architecture

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

- Interactive diagram: https://gitdiagram.com/ryofficial87-ai/bossxv6
- Repository: https://github.com/ryofficial87-ai/bossxv6

## Overview

BossX is a validator masternode application with account access, node and reward management, wallet and peer transfers, trading, news, and an AI agent. The user workflow enters through the app, authenticates and loads a Firestore-backed session, then operates the masternode and ecosystem features through the dashboard and navigation. The server exposes market, news-feed, and agent APIs. The README gives only minimal product detail, so feature scope also follows the navigation definitions; edges are limited to relationships visible in excerpts, the source index, or README.

Main entry points: [`src/App.tsx`](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/App.tsx) (App shell), [`server/apiApp.ts`](https://github.com/ryofficial87-ai/bossxv6/blob/main/server/apiApp.ts) (API routes), [`server/services/marketService.ts`](https://github.com/ryofficial87-ai/bossxv6/blob/main/server/services/marketService.ts) (Market data), [`src/utils/notifStorage.ts`](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/utils/notifStorage.ts) (Notification state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["App shell<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthView.tsx]"]
  node_session["Session data"]
  node_firebase[("Firebase<br/>[firebase.ts]")]
  node_nav["Navigation<br/>[navigation.ts]"]
end

subgraph group_validator["Validator operations"]
  node_dashboard["Dashboard<br/>[DashboardView.tsx]"]
  node_enginehook["Node controls"]
  node_engine["Reward engine"]
  node_access["Access keys<br/>[AccessKeyView.tsx]"]
  node_deposit["Deposits<br/>[DepositView.tsx]"]
  node_withdrawal["Withdrawals<br/>[WithdrawalView.tsx]"]
  node_p2p["Peer transfers<br/>[PeerToPeerView.tsx]"]
  node_referral["Referrals<br/>[ReferralView.tsx]"]
  node_notifications["Notifications"]
  node_notifstorage["Notification state<br/>[notifStorage.ts]"]
end

subgraph group_ecosystem["Market and news"]
  node_market["Internal market"]
  node_chart["Trading chart"]
  node_square["News and community"]
  node_newsfeed["News feed hook"]
end

subgraph group_services["API services"]
  node_api["API routes<br/>[apiApp.ts]"]
  node_marketservice["Market data<br/>[marketService.ts]"]
  node_squareservice["Square feed service"]
  node_agentservice["AI agent service<br/>[agentService.ts]"]
end

node_user(("Validator"))
node_binance(("Binance"))
node_coingecko(("CoinGecko"))

node_user -->|"opens"| node_app
node_app -->|"renders"| node_auth
node_app -->|"loads session"| node_session
node_session -->|"reads and writes"| node_firebase
node_auth -->|"authenticates"| node_firebase
node_app -->|"selects views"| node_nav
node_app -->|"renders"| node_dashboard
node_app -->|"uses controls"| node_enginehook
node_enginehook -->|"calls calculations"| node_engine
node_app -->|"routes to"| node_access
node_app -->|"renders"| node_notifications
node_app -->|"builds notifications"| node_notifstorage
node_notifstorage -->|"formats timestamps"| node_engine
node_app -.->|"routes to"| node_market
node_market -->|"renders"| node_chart
node_app -.->|"routes to"| node_square
node_app -->|"loads feed"| node_newsfeed
node_newsfeed -->|"uses preferences"| node_notifstorage
node_app -.->|"requests APIs"| node_api
node_api -->|"calls market data"| node_marketservice
node_api -->|"calls feed service"| node_squareservice
node_api -->|"calls agent"| node_agentservice
node_marketservice -->|"fetches prices"| node_binance
node_marketservice -->|"fetches prices"| node_coingecko
node_app -.->|"routes to"| node_deposit
node_app -.->|"routes to"| node_withdrawal
node_app -.->|"routes to"| node_p2p
node_app -.->|"routes to"| node_referral

click node_app "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/App.tsx"
click node_auth "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/AuthView.tsx"
click node_session "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/hooks/useFirestoreSession.ts"
click node_firebase "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/firebase.ts"
click node_nav "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/types/navigation.ts"
click node_dashboard "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/DashboardView.tsx"
click node_enginehook "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/hooks/useMasternodeEngine.ts"
click node_engine "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/utils/masternodeEngine.ts"
click node_access "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/AccessKeyView.tsx"
click node_deposit "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/DepositView.tsx"
click node_withdrawal "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/WithdrawalView.tsx"
click node_p2p "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/PeerToPeerView.tsx"
click node_referral "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/ReferralView.tsx"
click node_notifications "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/NotificationBell.tsx"
click node_notifstorage "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/utils/notifStorage.ts"
click node_market "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/InternalMarketView.tsx"
click node_chart "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/BinanceProChart.tsx"
click node_square "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/BossXSquareView.tsx"
click node_newsfeed "https://github.com/ryofficial87-ai/bossxv6/blob/main/src/hooks/useSquareNewsFeed.ts"
click node_api "https://github.com/ryofficial87-ai/bossxv6/blob/main/server/apiApp.ts"
click node_marketservice "https://github.com/ryofficial87-ai/bossxv6/blob/main/server/services/marketService.ts"
click node_squareservice "https://github.com/ryofficial87-ai/bossxv6/blob/main/server/services/squareFeedService.ts"
click node_agentservice "https://github.com/ryofficial87-ai/bossxv6/blob/main/server/services/agentService.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_app,node_auth,node_session,node_firebase,node_nav toneBlue
class node_dashboard,node_enginehook,node_engine,node_access,node_deposit,node_withdrawal,node_p2p,node_referral,node_notifications,node_notifstorage toneAmber
class node_market,node_chart,node_square,node_newsfeed toneMint
class node_api,node_marketservice,node_squareservice,node_agentservice toneRose
class node_user,node_binance,node_coingecko toneIndigo
```

## Components

### Application shell

- [App shell](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/AuthView.tsx): `src/components/AuthView.tsx`
- [Session data](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/hooks/useFirestoreSession.ts): `src/hooks/useFirestoreSession.ts`
- [Firebase](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/firebase.ts): `src/firebase.ts`
- [Navigation](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/types/navigation.ts): `src/types/navigation.ts`

### Validator operations

- [Dashboard](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/DashboardView.tsx): `src/components/DashboardView.tsx`
- [Node controls](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/hooks/useMasternodeEngine.ts): `src/hooks/useMasternodeEngine.ts`
- [Reward engine](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/utils/masternodeEngine.ts): `src/utils/masternodeEngine.ts`
- [Access keys](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/AccessKeyView.tsx): `src/components/AccessKeyView.tsx`
- [Deposits](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/DepositView.tsx): `src/components/DepositView.tsx`
- [Withdrawals](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/WithdrawalView.tsx): `src/components/WithdrawalView.tsx`
- [Peer transfers](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/PeerToPeerView.tsx): `src/components/PeerToPeerView.tsx`
- [Referrals](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/ReferralView.tsx): `src/components/ReferralView.tsx`
- [Notifications](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/NotificationBell.tsx): `src/components/NotificationBell.tsx`
- [Notification state](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/utils/notifStorage.ts): `src/utils/notifStorage.ts`

### Market and news

- [Internal market](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/InternalMarketView.tsx): `src/components/InternalMarketView.tsx`
- [Trading chart](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/BinanceProChart.tsx): `src/components/BinanceProChart.tsx`
- [News and community](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/components/BossXSquareView.tsx): `src/components/BossXSquareView.tsx`
- [News feed hook](https://github.com/ryofficial87-ai/bossxv6/blob/main/src/hooks/useSquareNewsFeed.ts): `src/hooks/useSquareNewsFeed.ts`

### API services

- [API routes](https://github.com/ryofficial87-ai/bossxv6/blob/main/server/apiApp.ts): `server/apiApp.ts`
- [Market data](https://github.com/ryofficial87-ai/bossxv6/blob/main/server/services/marketService.ts): `server/services/marketService.ts`
- [Square feed service](https://github.com/ryofficial87-ai/bossxv6/blob/main/server/services/squareFeedService.ts): `server/services/squareFeedService.ts`
- [AI agent service](https://github.com/ryofficial87-ai/bossxv6/blob/main/server/services/agentService.ts): `server/services/agentService.ts`

### Other components

- **Validator**
- **Binance**
- **CoinGecko**

## Connections

- Validator → App shell: opens
- App shell → Authentication: renders (evidence: `src/App.tsx`)
- App shell → Session data: loads session (evidence: `src/App.tsx`)
- Session data → Firebase: reads and writes (evidence: `src/hooks/useFirestoreSession.ts`)
- Authentication → Firebase: authenticates (evidence: `src/components/AuthView.tsx`)
- App shell → Navigation: selects views (evidence: `src/App.tsx`)
- App shell → Dashboard: renders (evidence: `src/App.tsx`)
- App shell → Node controls: uses controls (evidence: `src/App.tsx`)
- Node controls → Reward engine: calls calculations (evidence: `src/hooks/useMasternodeEngine.ts`)
- App shell → Access keys: routes to (evidence: `src/App.tsx`)
- App shell → Notifications: renders (evidence: `src/App.tsx`)
- App shell → Notification state: builds notifications (evidence: `src/App.tsx`)
- Notification state → Reward engine: formats timestamps (evidence: `src/utils/notifStorage.ts`)
- App shell → Internal market: routes to (evidence: `src/App.tsx`)
- Internal market → Trading chart: renders (evidence: `src/components/InternalMarketView.tsx`)
- App shell → News and community: routes to (evidence: `src/App.tsx`)
- App shell → News feed hook: loads feed (evidence: `src/App.tsx`)
- News feed hook → Notification state: uses preferences (evidence: `src/hooks/useSquareNewsFeed.ts`)
- App shell → API routes: requests APIs
- API routes → Market data: calls market data (evidence: `server/apiApp.ts`)
- API routes → Square feed service: calls feed service (evidence: `server/apiApp.ts`)
- API routes → AI agent service: calls agent (evidence: `server/apiApp.ts`)
- Market data → Binance: fetches prices (evidence: `server/services/marketService.ts`)
- Market data → CoinGecko: fetches prices (evidence: `server/services/marketService.ts`)
- App shell → Deposits: routes to (evidence: `src/App.tsx`)
- App shell → Withdrawals: routes to (evidence: `src/App.tsx`)
- App shell → Peer transfers: routes to (evidence: `src/App.tsx`)
- App shell → Referrals: routes to (evidence: `src/App.tsx`)
