# FastTool monolith analysis and modular refactor plan

- Source analyzed: `FastTool/legacy_main.py`
- Total API routes discovered: **266**
- Total Pydantic models discovered: **4**
- WebSocket handlers discovered: **0**
- Middleware handlers discovered: **1**

## Route inventory (method + path)

- `GET /`
- `GET /Strategy`
- `GET /Zebull/{PanelUser}`
- `GET /Aliceblue/{PanelUser}`
- `GET /MStockOTP/{PanelUser}`
- `POST /MStockBroker`
- `GET /Groww/{PanelUser}`
- `GET /Finvasia/{PanelUser}`
- `GET /MarkethubIntellect/{PanelUser}`
- `GET /MarkethubMM/{PanelUser}`
- `GET /Markethub/{PanelUser}`
- `GET /Indira/{PanelUser}`
- `GET /Mandot/{PanelUser}`
- `GET /AddExpiry/{PanelUser}`
- `GET /Exchange`
- `GET /OptionExchange`
- `GET /OptionSymbol`
- `GET /OptionSymbol/{Exchange}`
- `GET /Bearish`
- `GET /Bullish`
- `GET /Volatile`
- `GET /Neutral`
- `GET /BullishCandlePattern`
- `GET /BearishCandlePattern`
- `GET /ContinuationCandlePattern`
- `GET /BullishChartingPattern`
- `GET /BearishChartingPattern`
- `GET /ContinuationChartingPattern`
- `GET /Dashboard/{PanelUser}`
- `GET /DashboardOpen/{PanelUser}`
- `GET /OptionStretegy`
- `GET /Pattern/{PatternName}`
- `GET /Timeframe`
- `GET /JainamBroker/{Username}`
- `GET /broker/JainamBroker`
- `GET /ICICIBroker/{Username}`
- `GET /broker/ICICI`
- `GET /FayersBroker/{Username}`
- `GET /broker/Fayers`
- `GET /UpstoxBroker/{Username}`
- `GET /BajajBroker/{Username}`
- `GET /broker/Bajaj`
- `GET /broker/UpstoxBroker`
- `GET /Zerodha/{Username}`
- `GET /broker/Zerodha`
- `GET /AliceblueNew/{Username}`
- `GET /broker/AliceBlue`
- `GET /Dhan/{Username}`
- `GET /broker/Dhan`
- `GET /MastertrustBroker/{Username}`
- `GET /broker/Mastertrust`
- `GET /5PaisaBroker/{Username}`
- `GET /broker/5paisa`
- `GET /AngelBroker/{Username}`
- `GET /broker/Angel`
- `GET /AngelBroker_New/{Username}`
- `GET /broker/Angel_New`
- `GET /KotakBroker/{Username}`
- `GET /KotakBroker_New/{Username}`
- `GET /Profile/{Username}`
- `GET /TradingStatus/{User}`
- `POST /CandlestickPattern`
- `POST /ChartPattern`
- `GET /Script/{Script}`
- `POST /SymbolP`
- `POST /ConnectBroker`
- `GET /IPaddress`
- `GET /Brokername/{Username}`
- `POST /Broker`
- `POST /Vendorapikey`
- `GET /Vendorapikeydata/{Brokername}`
- `POST /GetSym`
- `POST /GetInstrument`
- `POST /GetStrike`
- `POST /GetStrikeToken`
- `POST /OptionGetExpiry`
- `GET /SingleIndexToken`
- `GET /AccessToken/{New}`
- `POST /GetExpiry`
- `POST /Token`
- `POST /Resetpass`
- `POST /RegenrateKey`
- `POST /forgetpass`
- `POST /Signup`
- `POST /login`
- `POST /OptionSST`
- `POST /MaxPnlStrike`
- `POST /CheckPnL`
- `POST /CPrice`
- `POST /FUTCPrice`
- `POST /Premiumfind`
- `POST /Data1111`
- `POST /Addscript`
- `POST /OptionAddscript`
- `POST /ScalpAddscript`
- `POST /Data`
- `POST /Discontinue`
- `POST /Continue`
- `POST /MatchPosition`
- `POST /Squareoff`
- `POST /Tradereport`
- `POST /ScalpingData`
- `POST /PnlData`
- `POST /Equitycurve`
- `POST /Drawdown`
- `POST /Barchart`
- `POST /fiveprofit`
- `POST /fiveloss`
- `POST /Tradehistory`
- `POST /Updatescript`
- `POST /Traderesponse`
- `GET /PanelTrack/{Username}`
- `POST /PanelTrackAll`
- `POST /PanelTrack`
- `GET /ClientTaskStatus/{User}`
- `POST /LastPattern`
- `POST /CCLPattern`
- `GET /DailyData/{Symbol}`
- `POST /LastPatternCandle`
- `POST /NetPnL`
- `POST /SelectedPattern`
- `POST /ClientGroupAllot`
- `POST /ClientGroupUnsubscribe`
- `POST /admindashboardclient`
- `GET /admindashboardclient1`
- `POST /admindashboardtrade`
- `GET /admindashboardData`
- `GET /admindashboardData23`
- `POST /addnewclient`
- `GET /Renweldate/{Username}`
- `POST /UpdateUserStatus`
- `GET /AdminProfile`
- `POST /adminupdate`
- `GET /Profile`
- `GET /Brokernamelist`
- `POST /EditClientPanel`
- `GET /GETBrokerGroupRecord/{Username}`
- `POST /AdmBroker`
- `GET /TaskStatus`
- `POST /UserallScriptDetail`
- `POST /Servicereport`
- `GET /Username`
- `GET /Usernamelist/{User}`
- `GET /SubUsername`
- `POST /AdminData`
- `POST /Threadreport`
- `POST /MasterAccount`
- `POST /UpdateMasterAccount`
- `GET /GETMasterAccount`
- `GET /GETMasterAccountLogs`
- `GET /CAllThreadreport`
- `GET /AllThreadreport`
- `GET /Datastart`
- `GET /AutoLogin`
- `GET /Last_Pattern`
- `GET /AdmBroker`
- `POST /upload_images`
- `GET /SMTPDetail`
- `POST /TradeRecord`
- `POST /adminstrategiesgroup`
- `GET /admingrouptable`
- `POST /deletegroup`
- `POST /AdminAddscript`
- `POST /Admingoldenaddscript`
- `GET /Grropselct`
- `POST /clientalotgroupname`
- `POST /groupstrategies`
- `POST /Admin_Delete_Script`
- `POST /uploadimagefile`
- `GET /icon`
- `GET /logo`
- `GET /frontimage`
- `GET /Companyname`
- `GET /favicon`
- `GET /CandlestickImage/{Patternname}`
- `POST /PatternDetail`
- `POST /Option_Detail`
- `POST /ScalpingPositionDetails`
- `GET /Segment`
- `POST /AddOn`
- `GET /GetAddondata`
- `POST /AddPlan`
- `POST /addnewplan`
- `GET /EditPlanname`
- `POST /EditPlan`
- `POST /Clienttransaction`
- `POST /transctionrequest`
- `GET /transctionrequestProcess`
- `POST /BuyPlan12`
- `GET /NewAllPlanDetails`
- `GET /Plannames`
- `GET /PlannameList`
- `GET /AllUserPlanDetails/{PanelUser}`
- `GET /ExpirePlanDetails/{PanelUser}`
- `GET /ClienttransactionDetails/{PanelUser}`
- `GET /Allotplan/{PanelUser}`
- `GET /OptionChain`
- `POST /Purchasedplan`
- `GET /checkbalance/{PanelUser}`
- `GET /checkbalanceAdmin`
- `GET /AllotStretegy/{PanelUser}`
- `GET /AllotStretegy1/{PanelUser}`
- `GET /ScriptCount/{PanelUser}`
- `GET /ChartAllotStretegy/{PanelUser}`
- `GET /Stretegy`
- `GET /MainStrategy`
- `GET /MainStrategy/{Username}`
- `GET /LivetradeUser`
- `POST /CreateSubAdmin`
- `GET /SubAdminPermission/{Username}`
- `GET /Subadmindetails`
- `GET /SubAdminname`
- `POST /Subadmindashboard/{Subadminname}`
- `GET /subadmindashboardclient1/{Subadminname}`
- `POST /subadmindashboardtrade`
- `GET /SubAdminsellrecord/{Subadminname}`
- `GET /subadmindashboardData23/{Subadminname}`
- `GET /SubadminClientdetails/{Subadminname}`
- `GET /SubAdminGrropselct/{Subadminname}`
- `GET /SubadminClientname/{Subadminname}`
- `POST /SubadminPermissionUpdate`
- `GET /StrategyTag`
- `GET /findKey/{Username}`
- `GET /ClientStrategyTag/{Username}`
- `GET /SubAdminPermission/Admin`
- `GET /ClientStrategyTagDetails/{Username}`
- `POST /ChartingStretegyTag`
- `GET /GetChartingStrategyByTag/{Strategytag}`
- `POST /EditChartingStretegyTag`
- `POST /ChartingPlatform`
- `POST /ChartingPlatformDelete`
- `POST /OptionchainDelete`
- `GET /ChartingPlatformData/{Username}`
- `GET /ChartingPlatformSegment`
- `POST /ChartingPlatformData1`
- `POST /AdminChartingPlatformData1`
- `POST /ChartingPlatformStatus`
- `POST /ChartingPlatformsegment`
- `POST /NewBrokerAdd`
- `GET /api/getThreadReport`
- `GET /adminClientnameSAdmin`
- `GET /AdminPermission`
- `GET /AdminBrokerName`
- `GET /adminClientdetailsSAdmin`
- `GET /AdminBrokerAPIInfo/{Brokername}`
- `GET /AmmountDetailSAdmin`
- `POST /AddAmountSAdmin`
- `POST /ClosePanelSAdmin`
- `POST /BrokerPermissionSAdmin`
- `POST /PermissionUpdateSAdmin`
- `GET /SubadminDetailsSAdmin`
- `POST /ClientUpdateDetailsSAdmin`
- `POST /ClientDeleteDetailsSAdmin`
- `POST /SubadminDeleteDetailsSAdmin`
- `POST /UpdateAdminS`
- `POST /CreateAdminSA`
- `POST /AdminofferSA`
- `GET /AdminBroker`
- `POST /AddCouponCode`
- `GET /CouponCodeDetails`
- `GET /GetTheme`
- `POST /CouponCode`
- `GET /AutoLoginget`
- `GET /DataStartget`
- `GET /StrategyTagdata`
- `GET /Alicetoken`

## Pydantic models

- `TokenData`
- `StrictBaseModel`
- `ForgetPass`
- `BrokerPermission`

## Middleware

- `log_requests`

## WebSockets

- None found
