feat: add Citations and WatchlistChat components, integrate with API

- Implemented Citations component to display citation data.
- Created WatchlistDrawer and ChatSidebar components for managing watchlists and AI chat functionality.
- Integrated API calls for watchlist management and chat interactions.
- Updated index.tsx to include new components in the main application layout.
- Added API client in lib/api.ts for structured API interactions.
- Developed Alerts, Dashboard, Portfolio, Routines, Screener, and Report pages with relevant data fetching and UI components.
- Introduced styles in tokens.css for consistent theming across the application.
- Configured TypeScript and Vite for project setup and development.
This commit is contained in:
asepharyana
2026-09-15 12:36:48 +07:00
parent 0db2cf28b3
commit 8c184ccae1
111 changed files with 12349 additions and 62 deletions
+39
View File
@@ -0,0 +1,39 @@
{
"symbol": "BBCA.JK",
"start": "2026-09-07",
"end": "2026-09-11",
"origin": "all",
"cohort": "all",
"top_buyers": [
{
"rank": 1,
"broker_code": "MG",
"net_idr": 520000000000,
"buy_idr": 800000000000,
"sell_idr": 280000000000
},
{
"rank": 2,
"broker_code": "AK",
"net_idr": 410000000000,
"buy_idr": 700000000000,
"sell_idr": 290000000000
},
{
"rank": 3,
"broker_code": "CC",
"net_idr": 290000000000,
"buy_idr": 500000000000,
"sell_idr": 210000000000
}
],
"top_sellers": [
{
"rank": 1,
"broker_code": "BK",
"net_idr": -180000000000,
"buy_idr": 200000000000,
"sell_idr": 380000000000
}
]
}
+30
View File
@@ -0,0 +1,30 @@
[
{
"code": "MG",
"name": "Semesta Indovest",
"is_foreign": false,
"cohort": "mixed",
"license_type": "broker"
},
{
"code": "AK",
"name": "UBS Sekuritas",
"is_foreign": true,
"cohort": "institutional",
"license_type": "broker"
},
{
"code": "CC",
"name": "Mandiri Sekuritas",
"is_foreign": false,
"cohort": "institutional",
"license_type": "broker"
},
{
"code": "BK",
"name": "JPMorgan Sekuritas",
"is_foreign": true,
"cohort": "institutional",
"license_type": "broker"
}
]
+32
View File
@@ -0,0 +1,32 @@
{
"date": "2026-09-11",
"metric": "net",
"origin": "all",
"cohort": "all",
"results": [
{
"rank": 1,
"broker_code": "MG",
"gross": 1080000000000,
"net": 520000000000
},
{
"rank": 2,
"broker_code": "AK",
"gross": 990000000000,
"net": 410000000000
},
{
"rank": 3,
"broker_code": "CC",
"gross": 710000000000,
"net": 290000000000
},
{
"rank": 4,
"broker_code": "BK",
"gross": 580000000000,
"net": -180000000000
}
]
}
+18
View File
@@ -0,0 +1,18 @@
{
"results": [
{
"symbol": "BBCA.JK",
"date": "2026-09-11",
"close": 9950
},
{
"symbol": "BBRI.JK",
"date": "2026-09-11",
"close": 4200
}
],
"pagination": {
"total": 2,
"count": 2
}
}
+19
View File
@@ -0,0 +1,19 @@
{
"symbol": "BBCA.JK",
"overview": {
"name": "Bank Central Asia"
},
"valuation": {
"pe_ratio": 24.5,
"pb_ratio": 4.8
},
"profitability": {
"roe": 0.21
},
"leverage": {
"debt_to_equity": 0.9
},
"dividend": {
"payout_ratio": 0.62
}
}
+18
View File
@@ -0,0 +1,18 @@
{
"symbol": "ROE.JK",
"overview": {
"name": "ROE Test"
},
"valuation": {
"pe_ratio": 10
},
"profitability": {
"roe": 8
},
"leverage": {
"debt_to_equity": 0.5
},
"dividend": {
"payout_ratio": 0.4
}
}
+26
View File
@@ -0,0 +1,26 @@
{
"symbol": "BBCA.JK",
"corporate_actions": {
"dividend": [
{
"ex_date": "2025-06-01",
"dividend_per_share": 250
}
],
"upcoming_dividend": [
{
"ex_date": "2026-10-07",
"dividend_per_share": 270
}
],
"agm": [
{
"date": "2026-11-20"
}
],
"stock_split": [],
"right_issue": [],
"warrant": [],
"bonus": []
}
}
+212
View File
@@ -0,0 +1,212 @@
[
{
"symbol": "BBCA.JK",
"date": "2026-08-12",
"close": 9600,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-13",
"close": 9610,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-14",
"close": 9620,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-15",
"close": 9630,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-16",
"close": 9640,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-17",
"close": 9650,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-18",
"close": 9660,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-19",
"close": 9670,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-20",
"close": 9680,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-21",
"close": 9690,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-22",
"close": 9700,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-23",
"close": 9710,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-24",
"close": 9720,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-25",
"close": 9730,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-26",
"close": 9740,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-27",
"close": 9750,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-28",
"close": 9760,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-29",
"close": 9770,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-30",
"close": 9780,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-08-31",
"close": 9790,
"open": 9590,
"high": 9650,
"low": 9550,
"volume": 90000000,
"market_cap": 1180000000000000
},
{
"symbol": "BBCA.JK",
"date": "2026-09-11",
"close": 9950,
"open": 9700,
"high": 9990,
"low": 9680,
"volume": 288000000,
"market_cap": 1220000000000000
}
]
+16
View File
@@ -0,0 +1,16 @@
{
"results": [
{
"title": "Direksi beli saham BBCA",
"symbol": "BBCA",
"timestamp": "2026-09-10T10:00:00Z",
"transaction_type": "buy",
"holder_type": "insider",
"holder_name": "Direktur X",
"amount_transaction": 500000,
"price": 9850,
"transaction_value": 4925000000,
"source": "https://idx.example/f"
}
]
}
+27
View File
@@ -0,0 +1,27 @@
{
"symbol": "BBCA.JK",
"start": "2026-09-07",
"end": "2026-09-11",
"data": [
{
"date": "2026-09-07",
"net_foreign_inflow": 120000000000
},
{
"date": "2026-09-08",
"net_foreign_inflow": 95000000000
},
{
"date": "2026-09-09",
"net_foreign_inflow": 140000000000
},
{
"date": "2026-09-10",
"net_foreign_inflow": 80000000000
},
{
"date": "2026-09-11",
"net_foreign_inflow": 340000000000
}
]
}
+7
View File
@@ -0,0 +1,7 @@
[
{
"symbol": "BBCA.JK",
"company_name": "Bank Central Asia",
"free_float": 0.45
}
]
+10
View File
@@ -0,0 +1,10 @@
{
"symbol": "BBCA.JK",
"company_name": "Bank Central Asia",
"listing_date": "2000-05-31",
"chg_7d": 0.01,
"chg_30d": 0.03,
"chg_90d": 0.08,
"chg_365d": 0.25,
"offering_price": 1400
}
+161
View File
@@ -0,0 +1,161 @@
{
"week": "2026-09-07..2026-09-11",
"snapshots": [
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "broker-summary-top",
"file": "broker_summary_top_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "foreign-flow",
"file": "foreign_flow_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "daily",
"file": "daily_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "news",
"file": "news_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "filings",
"file": "filings_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "company-report",
"file": "company_report_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "financials-quarterly",
"file": "quarterly_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "corporate-actions",
"file": "corp_actions_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-10",
"source": "quarterly-dates",
"file": "quarterly_dates_bbca.json"
},
{
"ticker": "IDX",
"date": "2026-09-11",
"source": "brokers-registry",
"file": "brokers_registry.json"
},
{
"ticker": "IDX",
"date": "2026-09-11",
"source": "brokers-top",
"file": "brokers_top_idx.json"
},
{
"ticker": "IDX",
"date": "2026-09-11",
"source": "sector-flow",
"file": "sector_flow_idx.json"
},
{
"ticker": "IDX",
"date": "2026-09-11",
"source": "top-changes",
"file": "top_changes_idx.json"
},
{
"ticker": "IDX",
"date": "2026-09-11",
"source": "free-float",
"file": "free_float_idx.json"
},
{
"ticker": "IDX",
"date": "2026-09-11",
"source": "close",
"file": "close_idx.json"
},
{
"ticker": "TLKM",
"date": "2026-09-10",
"source": "suspensions",
"file": "suspensions_tlkm.json"
},
{
"ticker": "IDX",
"date": "2026-09-11",
"source": "subsector-valuation",
"file": "subsector_banks.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "segments",
"file": "segments_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "listing-performance",
"file": "listing_bbca.json"
},
{
"ticker": "BBCA",
"date": "2026-09-11",
"source": "quarterly-dates",
"file": "quarterly_ticker_bbca.json"
},
{
"ticker": "IDX",
"date": "2026-09-11",
"source": "most-traded",
"file": "most_traded_idx.json"
},
{
"ticker": "ROE",
"date": "2026-09-11",
"source": "financials-quarterly",
"file": "quarterly_roe.json"
},
{
"ticker": "ROE",
"date": "2026-09-11",
"source": "company-report",
"file": "company_report_roe.json"
}
],
"watchlist": [
"BBCA",
"TLKM"
],
"routines": [
{
"user_key": "demo",
"type": "morning-briefing",
"schedule": "30 7 * * *",
"channels": []
},
{
"user_key": "demo",
"type": "accumulation-radar",
"schedule": "*/30 9-16 * * 1-5",
"channels": []
}
]
}
+22
View File
@@ -0,0 +1,22 @@
[
{
"symbol": "BBCA.JK",
"volume": 288000000
},
{
"symbol": "BBRI.JK",
"volume": 150000000
},
{
"symbol": "BMRI.JK",
"volume": 120000000
},
{
"symbol": "TLKM.JK",
"volume": 90000000
},
{
"symbol": "ASII.JK",
"volume": 80000000
}
]
+31
View File
@@ -0,0 +1,31 @@
{
"results": [
{
"title": "BBCA laba naik 18% didorong kredit korporasi",
"body": "laba naik rekor",
"source": "https://idx.example/a",
"timestamp": "2026-09-10T08:00:00Z",
"symbols": [
"BBCA"
]
},
{
"title": "Analis upgrade BBCA, target tumbuh dua digit",
"body": "upgrade tumbuh positive",
"source": "https://idx.example/b",
"timestamp": "2026-09-11T08:00:00Z",
"symbols": [
"BBCA"
]
},
{
"title": "BBCA umumkan jadwal RUPS tahunan",
"body": "jadwal rutin",
"source": "https://idx.example/c",
"timestamp": "2026-09-09T08:00:00Z",
"symbols": [
"BBCA"
]
}
]
}
+42
View File
@@ -0,0 +1,42 @@
[
{
"symbol": "BBCA.JK",
"date": "2024-09-30",
"revenue": 24000000000,
"earnings": 12000000000,
"total_assets": 1400000000000,
"total_equity": 240000000000,
"operating_cash_flow": 15000000000,
"total_debt": 200000000000
},
{
"symbol": "BBCA.JK",
"date": "2024-12-31",
"revenue": 25500000000,
"earnings": 12800000000,
"total_assets": 1430000000000,
"total_equity": 248000000000,
"operating_cash_flow": 16000000000,
"total_debt": 205000000000
},
{
"symbol": "BBCA.JK",
"date": "2025-03-31",
"revenue": 26800000000,
"earnings": 13400000000,
"total_assets": 1460000000000,
"total_equity": 256000000000,
"operating_cash_flow": 16500000000,
"total_debt": 208000000000
},
{
"symbol": "BBCA.JK",
"date": "2025-06-30",
"revenue": 28200000000,
"earnings": 14100000000,
"total_assets": 1490000000000,
"total_equity": 264000000000,
"operating_cash_flow": 17200000000,
"total_debt": 210000000000
}
]
+7
View File
@@ -0,0 +1,7 @@
[
{
"symbol": "BBCA",
"date": "2026-07-28",
"year": 2026
}
]
+42
View File
@@ -0,0 +1,42 @@
[
{
"symbol": "ROE.JK",
"date": "2025-09-30",
"revenue": 100,
"earnings": 100,
"total_assets": 2000,
"total_equity": 1000,
"operating_cash_flow": 50,
"total_debt": 100
},
{
"symbol": "ROE.JK",
"date": "2025-12-31",
"revenue": 105,
"earnings": 102,
"total_assets": 2200,
"total_equity": 1150,
"operating_cash_flow": 50,
"total_debt": 100
},
{
"symbol": "ROE.JK",
"date": "2026-03-31",
"revenue": 110,
"earnings": 104,
"total_assets": 2400,
"total_equity": 1300,
"operating_cash_flow": 50,
"total_debt": 100
},
{
"symbol": "ROE.JK",
"date": "2026-06-30",
"revenue": 115,
"earnings": 105,
"total_assets": 2600,
"total_equity": 1500,
"operating_cash_flow": 50,
"total_debt": 100
}
]
+10
View File
@@ -0,0 +1,10 @@
[
{
"report_date": "2026-07-28",
"quarter": "q2"
},
{
"report_date": "2026-04-28",
"quarter": "q1"
}
]
+13
View File
@@ -0,0 +1,13 @@
{
"week": "2026-09-11",
"current": {
"financials": -800000000,
"consumer": 1100000000,
"infrastructure": 200000000
},
"previous": {
"financials": 900000000,
"consumer": -300000000,
"infrastructure": 150000000
}
}
+16
View File
@@ -0,0 +1,16 @@
{
"symbol": "BBCA.JK",
"financial_year": 2025,
"revenue_breakdown": [
{
"value": 67446394000000,
"source": "Loans",
"target": "Interest Income"
},
{
"value": 12000000000,
"source": "Fees",
"target": "Non-Interest Income"
}
]
}
+5
View File
@@ -0,0 +1,5 @@
{
"sub_sector": "banks",
"median_pe": 16.2,
"median_pb": 2.1
}
+10
View File
@@ -0,0 +1,10 @@
{
"results": [
{
"symbol": "TLKM.JK",
"suspension_date": "2026-09-10",
"reason": "Volatilitas harga luar biasa",
"pdf_url": "https://idx.example/s.pdf"
}
]
}
+16
View File
@@ -0,0 +1,16 @@
{
"top_gainers": {
"1d": [
{
"name": "Bank Central Asia",
"symbol": "BBCA.JK",
"price_change": 0.032,
"last_close_price": 9950,
"latest_close_date": "2026-09-11"
}
]
},
"top_losers": {
"1d": []
}
}