How skishan2004/wholesale-commercial-analysis works
This is a wholesale commercial traffic analysis application: users explore operator and carrier data, import records, model carrier allocations, compare scenarios, and prepare an approved final decision. The graph separates the React workspaces, server-side ingestion and reporting, simulation/approval domain logic, and persistent storage. Several feature modules are documented by the source index but not excerpted; their presence is represented, while uncertain internal call paths are omitted.
Main entry points: server.ts HTTP API · CarrierSimulationWorkspace.tsx Simulation workspace · dbRepository.ts Traffic data services · finalScenarioRepository.ts Final scenario repository
Components 27
Analysis workspaces
- Application shell
client/src/App.tsx - Simulation workspace
client/src/components/CarrierSimulationWorkspace.tsx - Operator explorer
client/src/components/OperatorsView.tsx - Carrier explorer
client/src/components/CarriersView.tsx - Visualizations
client/src/components/SimulationVisualizations.tsx - Scenario comparison
client/src/components/SimulationComparisonMatrix.tsx - AI recommendations
client/src/components/AiRecommendationBanner.tsx - Final scenario workspace
client/src/components/FinalScenarioWorkspace.tsx - Decision approval
client/src/components/FinalDecisionApprovalPage.tsx - Approval history
client/src/components/ApprovalHistoryWorkspace.tsx - PDF export
client/src/utils/pdfExportUtils.ts - Response parsing
client/src/utils/apiUtils.ts
Data and reporting
- HTTP API
server/src/server.ts - Data import
client/src/components/DataImportSection.tsx - Import validation
server/src/services/dataValidation.ts - Excel import
server/src/services/excelImportService.ts - Traffic data services
server/src/services/dbRepository.ts - Data export
server/src/services/exportService.ts - MNO data
server/src/services/mnoDataService.ts
Simulation and decisions
- Calculation engine
server/src/calculation/calculationEngine.ts - Calculation models
server/src/calculation/types.ts - Simulation repository
server/src/services/simulationRepository.ts - Final scenario repository
server/src/services/finalScenarioRepository.ts - Recommendation service
server/src/services/aiRecommendationService.ts - Approval repository
server/src/services/approvalRepository.ts
Persistence
- Prisma database client
server/src/db/prismaClient.ts
Other components
- Analyst
Connections 43
- Analyst → Application shell: uses
client/src/App.tsx - Application shell → Simulation workspace: opens
client/src/App.tsx - Application shell → Operator explorer: opens
client/src/App.tsx - Application shell → Carrier explorer: opens
client/src/App.tsx - Simulation workspace → Visualizations: renders
client/src/components/CarrierSimulationWorkspace.tsx - Simulation workspace → Scenario comparison: renders
client/src/components/CarrierSimulationWorkspace.tsx - Simulation workspace → AI recommendations: renders
client/src/components/CarrierSimulationWorkspace.tsx - Simulation workspace → Final scenario workspace: opens
client/src/components/CarrierSimulationWorkspace.tsx - Simulation workspace → Decision approval: opens
client/src/components/CarrierSimulationWorkspace.tsx - Simulation workspace → Approval history: opens
client/src/components/CarrierSimulationWorkspace.tsx - Simulation workspace → Response parsing: parses responses
client/src/components/CarrierSimulationWorkspace.tsx - Final scenario workspace → Response parsing: parses responses
client/src/components/FinalScenarioWorkspace.tsx - Approval history → Response parsing: parses responses
client/src/components/ApprovalHistoryWorkspace.tsx - Approval history → PDF export: exports decision
client/src/components/ApprovalHistoryWorkspace.tsx - Decision approval → PDF export: exports decision
client/src/components/FinalDecisionApprovalPage.tsx - Data import → HTTP API: uploads data
- Simulation workspace → HTTP API: requests scenarios
- Final scenario workspace → HTTP API: requests final scenario
- HTTP API → Calculation engine: calculates
server/src/server.ts - HTTP API → Simulation repository: routes simulation operations
server/src/server.ts - HTTP API → Final scenario repository: updates final scenario
server/src/server.ts - HTTP API → Approval repository: routes approvals
server/src/server.ts - HTTP API → Recommendation service: requests recommendations
server/src/server.ts - HTTP API → Excel import: imports spreadsheet
server/src/server.ts - HTTP API → Traffic data services: commits imports
server/src/server.ts - HTTP API → Traffic data services: reads dashboard data
server/src/server.ts - HTTP API → Traffic data services: loads export records
server/src/server.ts - HTTP API → Data export: formats exports
server/src/server.ts - HTTP API → MNO data: loads MNO data
server/src/server.ts - Excel import → Import validation: validates records
server/src/services/excelImportService.ts - Traffic data services → Excel import: parses spreadsheet
server/src/services/dbRepository.ts - Traffic data services → Calculation engine: calculates records
server/src/services/dbRepository.ts - Simulation repository → Calculation engine: calculates scenarios
server/src/services/simulationRepository.ts - Final scenario repository → Calculation engine: calculates final scenario
server/src/services/finalScenarioRepository.ts - Final scenario repository → Simulation repository: loads simulations
server/src/services/finalScenarioRepository.ts - Simulation repository → Prisma database client: reads and writes
server/src/services/simulationRepository.ts - Final scenario repository → Prisma database client: reads and writes
server/src/services/finalScenarioRepository.ts - Traffic data services → Prisma database client: reads and writes
server/src/services/dbRepository.ts - Approval repository → Prisma database client: persists approvals
server/src/services/approvalRepository.ts - Calculation engine → Calculation models: uses models
server/src/calculation/calculationEngine.ts - Simulation repository → Calculation models: uses models
server/src/services/simulationRepository.ts - Final scenario repository → Calculation models: uses models
server/src/services/finalScenarioRepository.ts - Recommendation service → Calculation models: uses models
server/src/services/aiRecommendationService.ts