# zinefalouti/coinbull architecture

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

- Interactive diagram: https://gitdiagram.com/zinefalouti/coinbull
- Repository: https://github.com/zinefalouti/coinbull

## Overview

Coin Bull is a React stock and portfolio dashboard with a public landing page. Users enter through the routed app, browse market data and stock details, buy holdings into a portfolio, and review or sell them into history; separate routes provide balance charts, currency conversion, and an assistant. The graph reflects routed components and source-index references plus shown Firestore operations. Some feature files were not excerpted, so uncertain internal calls are omitted.

Main entry points: [`src/App.js`](https://github.com/zinefalouti/coinbull/blob/main/src/App.js) (Route application), [`src/marketing/landing.js`](https://github.com/zinefalouti/coinbull/blob/main/src/marketing/landing.js) (Marketing landing), [`src/core/comps/stockdetaildata.js`](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/stockdetaildata.js) (Stock detail and buy), [`src/core/comps/portfoliodata.js`](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/portfoliodata.js) (Portfolio holdings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and landing"]
  node_app["Route application<br/>[App.js]"]
  node_landing["Marketing landing<br/>[landing.js]"]
  node_marketingsections["Landing sections<br/>[blocks.js]"]
  node_marketingpricing["Pricing section<br/>[pricing.js]"]
  node_marketingfaq["FAQ section<br/>[faq.js]"]
  node_marketingfooter["Marketing footer<br/>[footer.js]"]
end

subgraph group_market["Market and holdings"]
  node_marketlist["Stock listings<br/>[stocks.js]"]
  node_stockdetail["Stock detail and buy<br/>[stockdetaildata.js]"]
  node_portfolio["Portfolio holdings<br/>[portfoliodata.js]"]
  node_history["Trade history<br/>[historydata.js]"]
end

subgraph group_workspace["Dashboard tools"]
  node_dashboard["Dashboard<br/>[dashboard.js]"]
  node_dashboardbody["Dashboard panels<br/>[dashboardbody.js]"]
  node_converter["Currency converter<br/>[converter.js]"]
  node_converterbody["Conversion interface<br/>[converterbody.js]"]
  node_assistant["Assistant<br/>[assistant.js]"]
  node_chat["Chat integration<br/>[botpresschat.js]"]
  node_nav["Workspace navigation<br/>[sidebar.js]"]
  node_mobileheader["Mobile navigation<br/>[mobileheader.js]"]
end

subgraph group_shared["Shared services"]
  node_stockrecords["Stock data<br/>[stocks.js]"]
  node_stockdescriptions["Stock descriptions<br/>[stockdesc.js]"]
  node_prediction["AI predictions<br/>[aiprediction.js]"]
  node_currencyml["Currency conversion logic<br/>[currencyml.js]"]
  node_firebase["Firebase setup<br/>[firebase.js]"]
end

node_user(("Visitor"))
node_firestore[("Firestore")]

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_marketlist
node_app -->|"routes to"| node_stockdetail
node_app -->|"routes to"| node_portfolio
node_app -->|"routes to"| node_converter
node_app -->|"routes to"| node_assistant
node_landing -->|"renders"| node_marketingsections
node_landing -->|"renders"| node_marketingpricing
node_landing -->|"renders"| node_marketingfaq
node_landing -->|"renders"| node_marketingfooter
node_stockdetail -->|"reads and writes"| node_firestore
node_stockdetail -->|"reads prices"| node_stockrecords
node_stockdetail -->|"reads descriptions"| node_stockdescriptions
node_stockdetail -->|"uses predictions"| node_prediction
node_portfolio -->|"reads and updates"| node_firestore
node_portfolio -->|"reads prices"| node_stockrecords
node_portfolio -->|"records sales"| node_history
node_history -->|"reads history"| node_firestore
node_dashboard -->|"renders"| node_dashboardbody
node_dashboardbody -.->|"uses stock data"| node_stockrecords
node_converter -->|"renders"| node_converterbody
node_converterbody -->|"uses conversion logic"| node_currencyml
node_assistant -->|"renders"| node_chat
node_firebase -->|"initializes"| node_firestore
node_dashboard -->|"renders"| node_nav
node_dashboard -->|"renders"| node_mobileheader

click node_app "https://github.com/zinefalouti/coinbull/blob/main/src/App.js"
click node_landing "https://github.com/zinefalouti/coinbull/blob/main/src/marketing/landing.js"
click node_marketlist "https://github.com/zinefalouti/coinbull/blob/main/src/core/stocks.js"
click node_stockrecords "https://github.com/zinefalouti/coinbull/blob/main/src/utility/stocks.js"
click node_stockdetail "https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/stockdetaildata.js"
click node_stockdescriptions "https://github.com/zinefalouti/coinbull/blob/main/src/utility/stockdesc.js"
click node_prediction "https://github.com/zinefalouti/coinbull/blob/main/src/utility/aiprediction.js"
click node_portfolio "https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/portfoliodata.js"
click node_history "https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/historydata.js"
click node_dashboard "https://github.com/zinefalouti/coinbull/blob/main/src/core/dashboard.js"
click node_dashboardbody "https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/dashboardbody.js"
click node_converter "https://github.com/zinefalouti/coinbull/blob/main/src/core/converter.js"
click node_converterbody "https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/converterbody.js"
click node_currencyml "https://github.com/zinefalouti/coinbull/blob/main/src/utility/currencyml.js"
click node_assistant "https://github.com/zinefalouti/coinbull/blob/main/src/core/assistant.js"
click node_chat "https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/botpresschat.js"
click node_firebase "https://github.com/zinefalouti/coinbull/blob/main/src/firebase.js"
click node_marketingsections "https://github.com/zinefalouti/coinbull/blob/main/src/marketing/blocks.js"
click node_marketingpricing "https://github.com/zinefalouti/coinbull/blob/main/src/marketing/pricing.js"
click node_marketingfaq "https://github.com/zinefalouti/coinbull/blob/main/src/marketing/faq.js"
click node_marketingfooter "https://github.com/zinefalouti/coinbull/blob/main/src/marketing/footer.js"
click node_nav "https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/sidebar.js"
click node_mobileheader "https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/mobileheader.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_app,node_landing,node_marketingsections,node_marketingpricing,node_marketingfaq,node_marketingfooter toneBlue
class node_marketlist,node_stockdetail,node_portfolio,node_history,node_firestore toneAmber
class node_dashboard,node_dashboardbody,node_converter,node_converterbody,node_assistant,node_chat,node_nav,node_mobileheader toneMint
class node_stockrecords,node_stockdescriptions,node_prediction,node_currencyml,node_firebase toneRose
class node_user toneIndigo
```

## Components

### App and landing

- [Route application](https://github.com/zinefalouti/coinbull/blob/main/src/App.js): `src/App.js`
- [Marketing landing](https://github.com/zinefalouti/coinbull/blob/main/src/marketing/landing.js): `src/marketing/landing.js`
- [Landing sections](https://github.com/zinefalouti/coinbull/blob/main/src/marketing/blocks.js): `src/marketing/blocks.js`
- [Pricing section](https://github.com/zinefalouti/coinbull/blob/main/src/marketing/pricing.js): `src/marketing/pricing.js`
- [FAQ section](https://github.com/zinefalouti/coinbull/blob/main/src/marketing/faq.js): `src/marketing/faq.js`
- [Marketing footer](https://github.com/zinefalouti/coinbull/blob/main/src/marketing/footer.js): `src/marketing/footer.js`

### Market and holdings

- [Stock listings](https://github.com/zinefalouti/coinbull/blob/main/src/core/stocks.js): `src/core/stocks.js`
- [Stock detail and buy](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/stockdetaildata.js): `src/core/comps/stockdetaildata.js`
- [Portfolio holdings](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/portfoliodata.js): `src/core/comps/portfoliodata.js`
- [Trade history](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/historydata.js): `src/core/comps/historydata.js`

### Dashboard tools

- [Dashboard](https://github.com/zinefalouti/coinbull/blob/main/src/core/dashboard.js): `src/core/dashboard.js`
- [Dashboard panels](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/dashboardbody.js): `src/core/comps/dashboardbody.js`
- [Currency converter](https://github.com/zinefalouti/coinbull/blob/main/src/core/converter.js): `src/core/converter.js`
- [Conversion interface](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/converterbody.js): `src/core/comps/converterbody.js`
- [Assistant](https://github.com/zinefalouti/coinbull/blob/main/src/core/assistant.js): `src/core/assistant.js`
- [Chat integration](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/botpresschat.js): `src/core/comps/botpresschat.js`
- [Workspace navigation](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/sidebar.js): `src/core/comps/sidebar.js`
- [Mobile navigation](https://github.com/zinefalouti/coinbull/blob/main/src/core/comps/mobileheader.js): `src/core/comps/mobileheader.js`

### Shared services

- [Stock data](https://github.com/zinefalouti/coinbull/blob/main/src/utility/stocks.js): `src/utility/stocks.js`
- [Stock descriptions](https://github.com/zinefalouti/coinbull/blob/main/src/utility/stockdesc.js): `src/utility/stockdesc.js`
- [AI predictions](https://github.com/zinefalouti/coinbull/blob/main/src/utility/aiprediction.js): `src/utility/aiprediction.js`
- [Currency conversion logic](https://github.com/zinefalouti/coinbull/blob/main/src/utility/currencyml.js): `src/utility/currencyml.js`
- [Firebase setup](https://github.com/zinefalouti/coinbull/blob/main/src/firebase.js): `src/firebase.js`

### Other components

- **Visitor**
- **Firestore**

## Connections

- Visitor → Route application: opens (evidence: `src/App.js`)
- Route application → Marketing landing: routes to (evidence: `src/App.js`)
- Route application → Dashboard: routes to (evidence: `src/App.js`)
- Route application → Stock listings: routes to (evidence: `src/App.js`)
- Route application → Stock detail and buy: routes to (evidence: `src/App.js`)
- Route application → Portfolio holdings: routes to (evidence: `src/App.js`)
- Route application → Currency converter: routes to (evidence: `src/App.js`)
- Route application → Assistant: routes to (evidence: `src/App.js`)
- Marketing landing → Landing sections: renders (evidence: `src/marketing/landing.js`)
- Marketing landing → Pricing section: renders (evidence: `src/marketing/landing.js`)
- Marketing landing → FAQ section: renders (evidence: `src/marketing/landing.js`)
- Marketing landing → Marketing footer: renders (evidence: `src/marketing/landing.js`)
- Stock detail and buy → Firestore: reads and writes (evidence: `src/core/comps/stockdetaildata.js`)
- Stock detail and buy → Stock data: reads prices (evidence: `src/core/comps/stockdetaildata.js`)
- Stock detail and buy → Stock descriptions: reads descriptions (evidence: `src/core/comps/stockdetaildata.js`)
- Stock detail and buy → AI predictions: uses predictions (evidence: `src/core/comps/stockdetaildata.js`)
- Portfolio holdings → Firestore: reads and updates (evidence: `src/core/comps/portfoliodata.js`)
- Portfolio holdings → Stock data: reads prices (evidence: `src/core/comps/portfoliodata.js`)
- Portfolio holdings → Trade history: records sales (evidence: `src/core/comps/portfoliodata.js`)
- Trade history → Firestore: reads history (evidence: `src/core/comps/historydata.js`)
- Dashboard → Dashboard panels: renders (evidence: `src/core/dashboard.js`)
- Dashboard panels → Stock data: uses stock data
- Currency converter → Conversion interface: renders (evidence: `src/core/converter.js`)
- Conversion interface → Currency conversion logic: uses conversion logic (evidence: `src/core/comps/converterbody.js`)
- Assistant → Chat integration: renders (evidence: `src/core/assistant.js`)
- Firebase setup → Firestore: initializes (evidence: `src/firebase.js`)
- Dashboard → Workspace navigation: renders (evidence: `src/core/dashboard.js`)
- Dashboard → Mobile navigation: renders (evidence: `src/core/dashboard.js`)
