# anassk-cell/sih_solution_1 architecture

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

- Interactive diagram: https://gitdiagram.com/anassk-cell/sih_solution_1
- Repository: https://github.com/anassk-cell/sih_solution_1

## Overview

TrackSync is a Mumbai suburban railway maintenance-block planning dashboard. Control-room or maintenance users configure a block, inspect a suggested safe window and its train/passenger impact, then review or approve the plan; the UI also exposes presets, reports, and settings. The sampled code shows a client-side React application with local sample data, not a demonstrated backend, external optimizer, or passenger-notification integration. Arrows reflect the documented app composition and explicit component data references; unsampled modules are represented only where the source index supports their role.

Main entry points: [`src/App.tsx`](https://github.com/anassk-cell/sih_solution_1/blob/main/src/App.tsx) (Dashboard State), [`src/data/mumbaiRailwayData.ts`](https://github.com/anassk-cell/sih_solution_1/blob/main/src/data/mumbaiRailwayData.ts) (Railway Sample Data), [`src/components/BottomSummary.tsx`](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/BottomSummary.tsx) (Weekly and Block Summary), [`src/components/MaintenancePlanner.tsx`](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/MaintenancePlanner.tsx) (Maintenance Planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_entry["React Entry<br/>[main.tsx]"]
  node_appshell["Dashboard State<br/>[App.tsx]"]
  node_header["Header and Alerts<br/>[Header.tsx]"]
  node_sidebar["Navigation<br/>[Sidebar.tsx]"]
  node_settings["Optimizer Settings<br/>[SettingsTab.tsx]"]
end

subgraph group_planning["Block Planning"]
  node_planner["Maintenance Planner"]
  node_presets["Scenario Presets"]
  node_customize["Time Customization"]
  node_confirmation["Plan Approval<br/>[ConfirmPanel.tsx]"]
end

subgraph group_operations["Operations Views"]
  node_timeline["Corridor Timeline<br/>[TimelineView.tsx]"]
  node_blockdetails["Block Details"]
  node_summary["Weekly and Block Summary<br/>[BottomSummary.tsx]"]
  node_metrics["Operational Metrics<br/>[MetricCards.tsx]"]
  node_progress["Progress Indicator"]
end

subgraph group_insights["Impact and Reporting"]
  node_passenger["Passenger Forecast"]
  node_passengeralert["Passenger Alert"]
  node_reports["Execution Reports<br/>[ReportsTab.tsx]"]
end

subgraph group_reference["Railway Reference Data"]
  node_railwaydata["Railway Sample Data"]
  node_types["Domain Types<br/>[types.ts]"]
end

node_user(("Railway User"))

node_user -->|"opens dashboard"| node_entry
node_entry -->|"renders"| node_appshell
node_appshell -.->|"renders"| node_header
node_appshell -->|"renders"| node_sidebar
node_appshell -->|"renders"| node_planner
node_appshell -->|"renders"| node_presets
node_appshell -.->|"renders"| node_customize
node_appshell -.->|"renders"| node_passengeralert
node_appshell -->|"renders"| node_timeline
node_appshell -->|"renders"| node_confirmation
node_appshell -->|"renders"| node_summary
node_appshell -->|"renders"| node_reports
node_appshell -->|"renders"| node_settings
node_appshell -.->|"renders"| node_blockdetails
node_appshell -.->|"renders"| node_metrics
node_appshell -.->|"renders"| node_passenger
node_appshell -.->|"initializes plan from"| node_railwaydata
node_planner -.->|"submits plan changes"| node_appshell
node_presets -.->|"selects scenario"| node_appshell
node_confirmation -.->|"submits approval"| node_appshell
node_summary -.->|"selects block"| node_appshell
node_timeline -->|"reads timeline slots"| node_railwaydata
node_summary -->|"reads sample blocks"| node_railwaydata
node_reports -->|"reads report data"| node_railwaydata
node_planner -->|"uses railway data"| node_railwaydata
node_metrics -->|"renders"| node_progress
node_summary -->|"renders"| node_progress

click node_entry "https://github.com/anassk-cell/sih_solution_1/blob/main/src/main.tsx"
click node_appshell "https://github.com/anassk-cell/sih_solution_1/blob/main/src/App.tsx"
click node_header "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/Header.tsx"
click node_sidebar "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/Sidebar.tsx"
click node_settings "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/tabs/SettingsTab.tsx"
click node_planner "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/MaintenancePlanner.tsx"
click node_presets "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/ScenarioPresetsModal.tsx"
click node_customize "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/CustomizeTimeModal.tsx"
click node_confirmation "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/ConfirmPanel.tsx"
click node_timeline "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/TimelineView.tsx"
click node_blockdetails "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/BlockDetailsModal.tsx"
click node_summary "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/BottomSummary.tsx"
click node_metrics "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/MetricCards.tsx"
click node_progress "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/CircularProgress.tsx"
click node_passenger "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/PassengerForecast.tsx"
click node_passengeralert "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/PassengerAlertModal.tsx"
click node_reports "https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/tabs/ReportsTab.tsx"
click node_railwaydata "https://github.com/anassk-cell/sih_solution_1/blob/main/src/data/mumbaiRailwayData.ts"
click node_types "https://github.com/anassk-cell/sih_solution_1/blob/main/src/types.ts"

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_entry,node_appshell,node_header,node_sidebar,node_settings,node_user toneBlue
class node_planner,node_presets,node_customize,node_confirmation toneAmber
class node_timeline,node_blockdetails,node_summary,node_metrics,node_progress toneMint
class node_passenger,node_passengeralert,node_reports toneRose
class node_railwaydata,node_types toneIndigo
```

## Components

### Application Shell

- [React Entry](https://github.com/anassk-cell/sih_solution_1/blob/main/src/main.tsx): `src/main.tsx`
- [Dashboard State](https://github.com/anassk-cell/sih_solution_1/blob/main/src/App.tsx): `src/App.tsx`
- [Header and Alerts](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Navigation](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`
- [Optimizer Settings](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/tabs/SettingsTab.tsx): `src/components/tabs/SettingsTab.tsx`

### Block Planning

- [Maintenance Planner](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/MaintenancePlanner.tsx): `src/components/MaintenancePlanner.tsx`
- [Scenario Presets](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/ScenarioPresetsModal.tsx): `src/components/ScenarioPresetsModal.tsx`
- [Time Customization](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/CustomizeTimeModal.tsx): `src/components/CustomizeTimeModal.tsx`
- [Plan Approval](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/ConfirmPanel.tsx): `src/components/ConfirmPanel.tsx`

### Operations Views

- [Corridor Timeline](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/TimelineView.tsx): `src/components/TimelineView.tsx`
- [Block Details](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/BlockDetailsModal.tsx): `src/components/BlockDetailsModal.tsx`
- [Weekly and Block Summary](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/BottomSummary.tsx): `src/components/BottomSummary.tsx`
- [Operational Metrics](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/MetricCards.tsx): `src/components/MetricCards.tsx`
- [Progress Indicator](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/CircularProgress.tsx): `src/components/CircularProgress.tsx`

### Impact and Reporting

- [Passenger Forecast](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/PassengerForecast.tsx): `src/components/PassengerForecast.tsx`
- [Passenger Alert](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/PassengerAlertModal.tsx): `src/components/PassengerAlertModal.tsx`
- [Execution Reports](https://github.com/anassk-cell/sih_solution_1/blob/main/src/components/tabs/ReportsTab.tsx): `src/components/tabs/ReportsTab.tsx`

### Railway Reference Data

- [Railway Sample Data](https://github.com/anassk-cell/sih_solution_1/blob/main/src/data/mumbaiRailwayData.ts): `src/data/mumbaiRailwayData.ts`
- [Domain Types](https://github.com/anassk-cell/sih_solution_1/blob/main/src/types.ts): `src/types.ts`

### Other components

- **Railway User**

## Connections

- Railway User → React Entry: opens dashboard (evidence: `src/main.tsx`)
- React Entry → Dashboard State: renders (evidence: `src/main.tsx`)
- Dashboard State → Header and Alerts: renders (evidence: `src/App.tsx`)
- Dashboard State → Navigation: renders (evidence: `src/App.tsx`)
- Dashboard State → Maintenance Planner: renders (evidence: `src/App.tsx`)
- Dashboard State → Scenario Presets: renders (evidence: `src/App.tsx`)
- Dashboard State → Time Customization: renders (evidence: `src/App.tsx`)
- Dashboard State → Passenger Alert: renders (evidence: `src/App.tsx`)
- Dashboard State → Corridor Timeline: renders (evidence: `src/App.tsx`)
- Dashboard State → Plan Approval: renders (evidence: `src/App.tsx`)
- Dashboard State → Weekly and Block Summary: renders (evidence: `src/App.tsx`)
- Dashboard State → Execution Reports: renders (evidence: `src/App.tsx`)
- Dashboard State → Optimizer Settings: renders (evidence: `src/App.tsx`)
- Dashboard State → Block Details: renders (evidence: `src/App.tsx`)
- Dashboard State → Operational Metrics: renders (evidence: `src/App.tsx`)
- Dashboard State → Passenger Forecast: renders (evidence: `src/App.tsx`)
- Dashboard State → Railway Sample Data: initializes plan from (evidence: `src/App.tsx`)
- Maintenance Planner → Dashboard State: submits plan changes (evidence: `src/App.tsx`)
- Scenario Presets → Dashboard State: selects scenario (evidence: `src/App.tsx`)
- Plan Approval → Dashboard State: submits approval (evidence: `src/App.tsx`)
- Weekly and Block Summary → Dashboard State: selects block (evidence: `src/App.tsx`)
- Corridor Timeline → Railway Sample Data: reads timeline slots (evidence: `src/components/TimelineView.tsx`)
- Weekly and Block Summary → Railway Sample Data: reads sample blocks (evidence: `src/components/BottomSummary.tsx`)
- Execution Reports → Railway Sample Data: reads report data (evidence: `src/components/tabs/ReportsTab.tsx`)
- Maintenance Planner → Railway Sample Data: uses railway data (evidence: `src/components/MaintenancePlanner.tsx`)
- Operational Metrics → Progress Indicator: renders (evidence: `src/components/MetricCards.tsx`)
- Weekly and Block Summary → Progress Indicator: renders (evidence: `src/components/BottomSummary.tsx`)
