# drakedididi/privatefund_ipos_assistant architecture

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

- Interactive diagram: https://gitdiagram.com/drakedididi/privatefund_ipos_assistant
- Repository: https://github.com/drakedididi/privatefund_ipos_assistant

## Overview

PrivateFund_IPOs_Assistant is a web toolkit for private-fund IPO calendars and operational workflows. Calendar data is collected by exchange and financial-data crawlers, merged into frontend-ready data, and presented in the calendar; the frontend also offers local unlock-date data and sharing support. For operations, users upload files through the tools page, Flask validates and dispatches requests to document, chart, and extraction processors, then returns downloadable results. The README documents transaction tools and the product IPO ledger as display-only in this web trial. Some detailed wiring is documented rather than visible in the sampled source.

Main entry points: [`app.py`](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/app.py) (Flask API), [`merge/Ashare_merge.py`](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/merge/Ashare_merge.py) (A-share merge), [`merge/scramer_merge.py`](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/merge/scramer_merge.py) (Calendar builder), [`frontend/module_tools.html`](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/module_tools.html) (Operations tools page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_calendar["Calendar data"]
  node_bse["BSE crawler<br/>[bse_crawler.py]"]
  node_bond["Bond crawler"]
  node_eastmoney["Eastmoney crawler"]
  node_stockdetail["Stock detail crawler"]
  node_sse["SSE crawler<br/>[sse_crawler.py]"]
  node_sz["SZ crawler<br/>[sz_crawler.py]"]
  node_ashare["A-share merge<br/>[Ashare_merge.py]"]
  node_hshare["H-share merge<br/>[Hshare_merge.py]"]
  node_calendarbuild["Calendar builder<br/>[scramer_merge.py]"]
  node_calendarfiles[("Calendar data")]
  node_holidays[("Trading holidays")]
  node_utilities["Calendar utilities<br/>[utils.py]"]
end

subgraph group_web["Web experience"]
  node_calendarpage["IPO calendar<br/>[IPO.html]"]
  node_unlockdb[("Unlock data<br/>[unlock_db.js]")]
  node_ledger["IPO ledger entry<br/>[ipo_revenue.html]"]
  node_tradepage["Trade tools page<br/>[trade_tools.html]"]
  node_toolsui["Operations tools page<br/>[module_tools.html]"]
end

subgraph group_api["Operations API"]
  node_operator["Flask API<br/>[app.py]"]
end

subgraph group_processors["File processors"]
  node_invoice["Invoice sorting"]
  node_inquiry["Inquiry documents<br/>[video.py]"]
  node_revenue["Revenue charts<br/>[extra_revenue.py]"]
  node_redemption["Redemption notices<br/>[redemption_word.py]"]
  node_valuation["Valuation extraction<br/>[valuation_table.py]"]
  node_withdraw["PDF extraction<br/>[withdraw.py]"]
  node_relateddocs["Related-deal records<br/>[convert_openyxl.py]"]
  node_relatedfund["Related-fund records<br/>[multi_fund.py]"]
end

node_user(("Fund operator"))
node_exchanges{{"Exchange data"}}
node_marketdata{{"Market data"}}

node_exchanges -.->|"supplies listings"| node_bse
node_exchanges -.->|"supplies listings"| node_sse
node_exchanges -.->|"supplies listings"| node_sz
node_marketdata -.->|"supplies data"| node_eastmoney
node_marketdata -.->|"supplies details"| node_stockdetail
node_marketdata -.->|"supplies bond data"| node_bond
node_bse -->|"provides crawl data"| node_ashare
node_eastmoney -->|"provides crawl data"| node_ashare
node_stockdetail -->|"provides details"| node_ashare
node_sse -->|"provides crawl data"| node_ashare
node_sz -->|"provides crawl data"| node_ashare
node_ashare -->|"provides A-share data"| node_calendarbuild
node_hshare -->|"provides H-share data"| node_calendarbuild
node_bond -->|"provides bond data"| node_calendarbuild
node_calendarbuild -->|"writes calendar data"| node_calendarfiles
node_calendarbuild -->|"synchronizes unlock data"| node_unlockdb
node_holidays -.->|"informs date logic"| node_calendarbuild
node_utilities -->|"normalizes dates"| node_ashare
node_calendarfiles -->|"feeds calendar"| node_calendarpage
node_unlockdb -->|"adds unlock data"| node_calendarpage
node_user -->|"views calendar"| node_calendarpage
node_user -->|"uploads files"| node_toolsui
node_toolsui -->|"sends tool requests"| node_operator
node_operator -->|"dispatches invoice job"| node_invoice
node_operator -->|"dispatches inquiry job"| node_inquiry
node_operator -->|"dispatches chart job"| node_revenue
node_operator -->|"dispatches notice job"| node_redemption
node_operator -->|"dispatches extraction"| node_valuation
node_operator -->|"dispatches PDF job"| node_withdraw
node_operator -->|"dispatches records job"| node_relateddocs
node_operator -->|"dispatches fund job"| node_relatedfund
node_operator -.->|"returns downloads"| node_toolsui
node_user -->|"opens trial entry"| node_ledger
node_user -->|"views trial tools"| node_tradepage

click node_bse "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/bse_crawler.py"
click node_bond "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/convertible_bond.py"
click node_eastmoney "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/eastmoney_crawler.py"
click node_stockdetail "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/eastmoney_stock_detail.py"
click node_sse "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/sse_crawler.py"
click node_sz "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/sz_crawler.py"
click node_ashare "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/merge/Ashare_merge.py"
click node_hshare "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/merge/Hshare_merge.py"
click node_calendarbuild "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/merge/scramer_merge.py"
click node_holidays "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/data/trading_holidays.json"
click node_calendarpage "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/IPO.html"
click node_unlockdb "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/unlock_db.js"
click node_ledger "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/ipo_revenue.html"
click node_tradepage "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/trade_tools.html"
click node_toolsui "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/module_tools.html"
click node_operator "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/app.py"
click node_invoice "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/invoice/invoice_organization_local.py"
click node_inquiry "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/inquiry_video/video.py"
click node_revenue "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/extra_revenue/extra_revenue.py"
click node_redemption "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/big_redemption/redemption_word.py"
click node_valuation "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/valuation_table/valuation_table.py"
click node_withdraw "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/withdraw.py"
click node_relateddocs "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/related_deal/convert_openyxl.py"
click node_relatedfund "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/related_deal/multi_fund.py"
click node_utilities "https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/utils/utils.py"

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_bse,node_bond,node_eastmoney,node_stockdetail,node_sse,node_sz,node_ashare,node_hshare,node_calendarbuild,node_calendarfiles,node_holidays,node_utilities toneBlue
class node_calendarpage,node_unlockdb,node_ledger,node_tradepage,node_toolsui toneAmber
class node_operator toneMint
class node_invoice,node_inquiry,node_revenue,node_redemption,node_valuation,node_withdraw,node_relateddocs,node_relatedfund toneRose
class node_user,node_exchanges,node_marketdata toneIndigo
```

## Components

### Calendar data

- [BSE crawler](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/bse_crawler.py): `crawlers/bse_crawler.py`
- [Bond crawler](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/convertible_bond.py): `crawlers/convertible_bond.py`
- [Eastmoney crawler](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/eastmoney_crawler.py): `crawlers/eastmoney_crawler.py`
- [Stock detail crawler](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/eastmoney_stock_detail.py): `crawlers/eastmoney_stock_detail.py`
- [SSE crawler](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/sse_crawler.py): `crawlers/sse_crawler.py`
- [SZ crawler](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/crawlers/sz_crawler.py): `crawlers/sz_crawler.py`
- [A-share merge](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/merge/Ashare_merge.py): `merge/Ashare_merge.py`
- [H-share merge](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/merge/Hshare_merge.py): `merge/Hshare_merge.py`
- [Calendar builder](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/merge/scramer_merge.py): `merge/scramer_merge.py`
- **Calendar data**
- [Trading holidays](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/data/trading_holidays.json): `data/trading_holidays.json`
- [Calendar utilities](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/utils/utils.py): `utils/utils.py`

### Web experience

- [IPO calendar](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/IPO.html): `frontend/IPO.html`
- [Unlock data](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/unlock_db.js): `frontend/unlock_db.js`
- [IPO ledger entry](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/ipo_revenue.html): `frontend/ipo_revenue.html`
- [Trade tools page](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/trade_tools.html): `frontend/trade_tools.html`
- [Operations tools page](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/frontend/module_tools.html): `frontend/module_tools.html`

### Operations API

- [Flask API](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/app.py): `app.py`

### File processors

- [Invoice sorting](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/invoice/invoice_organization_local.py): `module_tools/invoice/invoice_organization_local.py`
- [Inquiry documents](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/inquiry_video/video.py): `module_tools/inquiry_video/video.py`
- [Revenue charts](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/extra_revenue/extra_revenue.py): `module_tools/extra_revenue/extra_revenue.py`
- [Redemption notices](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/big_redemption/redemption_word.py): `module_tools/big_redemption/redemption_word.py`
- [Valuation extraction](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/valuation_table/valuation_table.py): `module_tools/valuation_table/valuation_table.py`
- [PDF extraction](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/withdraw.py): `module_tools/withdraw.py`
- [Related-deal records](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/related_deal/convert_openyxl.py): `module_tools/related_deal/convert_openyxl.py`
- [Related-fund records](https://github.com/drakedididi/privatefund_ipos_assistant/blob/main/module_tools/related_deal/multi_fund.py): `module_tools/related_deal/multi_fund.py`

### Other components

- **Fund operator**
- **Exchange data**
- **Market data**

## Connections

- Exchange data → BSE crawler: supplies listings (evidence: `README.md`)
- Exchange data → SSE crawler: supplies listings (evidence: `README.md`)
- Exchange data → SZ crawler: supplies listings (evidence: `README.md`)
- Market data → Eastmoney crawler: supplies data (evidence: `README.md`)
- Market data → Stock detail crawler: supplies details (evidence: `README.md`)
- Market data → Bond crawler: supplies bond data (evidence: `README.md`)
- BSE crawler → A-share merge: provides crawl data (evidence: `merge/Ashare_merge.py`)
- Eastmoney crawler → A-share merge: provides crawl data (evidence: `merge/Ashare_merge.py`)
- Stock detail crawler → A-share merge: provides details (evidence: `merge/Ashare_merge.py`)
- SSE crawler → A-share merge: provides crawl data (evidence: `merge/Ashare_merge.py`)
- SZ crawler → A-share merge: provides crawl data (evidence: `merge/Ashare_merge.py`)
- A-share merge → Calendar builder: provides A-share data (evidence: `merge/scramer_merge.py`)
- H-share merge → Calendar builder: provides H-share data (evidence: `merge/scramer_merge.py`)
- Bond crawler → Calendar builder: provides bond data (evidence: `merge/scramer_merge.py`)
- Calendar builder → Calendar data: writes calendar data (evidence: `README.md`)
- Calendar builder → Unlock data: synchronizes unlock data (evidence: `merge/scramer_merge.py`)
- Trading holidays → Calendar builder: informs date logic (evidence: `README.md`)
- Calendar utilities → A-share merge: normalizes dates (evidence: `merge/Ashare_merge.py`)
- Calendar data → IPO calendar: feeds calendar (evidence: `README.md`)
- Unlock data → IPO calendar: adds unlock data (evidence: `README.md`)
- Fund operator → IPO calendar: views calendar (evidence: `README.md`)
- Fund operator → Operations tools page: uploads files (evidence: `README.md`)
- Operations tools page → Flask API: sends tool requests (evidence: `README.md`)
- Flask API → Invoice sorting: dispatches invoice job (evidence: `app.py`)
- Flask API → Inquiry documents: dispatches inquiry job (evidence: `app.py`)
- Flask API → Revenue charts: dispatches chart job (evidence: `app.py`)
- Flask API → Redemption notices: dispatches notice job (evidence: `app.py`)
- Flask API → Valuation extraction: dispatches extraction (evidence: `app.py`)
- Flask API → PDF extraction: dispatches PDF job (evidence: `app.py`)
- Flask API → Related-deal records: dispatches records job (evidence: `app.py`)
- Flask API → Related-fund records: dispatches fund job (evidence: `app.py`)
- Flask API → Operations tools page: returns downloads (evidence: `README.md`)
- Fund operator → IPO ledger entry: opens trial entry (evidence: `README.md`)
- Fund operator → Trade tools page: views trial tools (evidence: `README.md`)
