How kiranbandi/cbd-dashboard-ui works
1. This repository is the front-end of the CBME Dashboard: a React single-page application that visualizes competency-based medical education data. It is not the backend; the data/API boundary is handled by a separate server repo, and this UI consumes it through Axios-based request utilities.
2. The application shell starts in src/app.jsx, with routing defined under src/pages and shared layout/navigation in components like Container.jsx and NavBar.jsx. The main user experience is route-driven, with distinct pages for Home, Dashboard, Admin, Tools, Program Comparison, and UG-specific pages.
3. State management is centralized in Redux. The store is configured in src/redux/store/configureStore.jsx, with a root reducer and an oracleReducer managing the primary dashboard data and related UI state. This is the main shared state boundary between pages, dashboards, and chart components.
4. The server integration layer lives in src/utils. requestServer.js, endPoints.js, and related helpers encapsulate API calls, query parameter handling, and authorization. This layer separates network/data concerns from the React presentation components and is the main seam for backend communication.
5. The core product is organized into role- and workflow-specific dashboard subsystems under src/components:
- ResidentDashboardGroup: resident EPA progress, trends, schedules, narratives, expired records, and detail graphs.
- FacultyDashbordGroup: faculty performance, score distributions, radar/chart summaries, and record tables.
- NormativeDashboardGroup and ProgramDashboard: comparative and population-level views.
- ProgramEvaluationGroup: stage-wise EPA completion and rotation-based summaries.
- UGGroup: undergraduate-specific dashboards, admin tools, and normative views.
- AdminGroup: user/data management and feedback entry for the core workflow.
6. The UI is heavily chart- and table-centric. Many components are dedicated to graph panels, score distributions, pie charts, line charts, bullet charts, and filterable tables. The README notes a mix of React and D3, and the component tree reflects that separation: React orchestrates state and layout, while chart components render the analytics visuals.
7. A major architectural boundary is the data transformation pipeline in src/utils. Functions such as processFacultyRecords, processSingleProgramRecords, processMultiProgramRecords, processUGRecords, and processRCMFile convert raw server or file-upload data into dashboard-ready structures. This preprocessing step is key to the app because the dashboards expect normalized metrics, stage groupings, and program-specific mappings.
8. The Tools area is a separate workflow focused on file ingestion and export. Components like ElentraProcessor, FileUpload, savePagePDF, and downloadCSV support parsing institutional export files, visualizing the parsed output, and exporting results for research/analysis. This is one of the few parts of the app that operates directly on user-supplied files rather than server data.
9. The application supports multiple educational tracks and datasets through program metadata in src/utils/programInfo. Lists and maps such as PROGRAM_LIST, ROTATION_SCHEDULE_MAP, STAGES_LIST, SCORE_LIST, and individual program definitions under programs/ encode domain-specific rules. These mappings are a core architectural dependency because many charts and filters are driven by program/stage-specific semantics.
10. There is a shared library of reusable UI primitives in src/components/ReusableComponents and common visualization helpers in the dashboard subfolders. These include modals, stat cards, radio buttons, tooltips, info tips, and pie charts, which keeps each dashboard feature composed from smaller presentation building blocks rather than embedding UI logic everywhere.
11. Styling is managed with Sass under src/sass, split by page and component areas. This is a purely front-end presentation layer, but it is organized to mirror the component structure, which makes it easier to map visual regions in an architecture diagram to their corresponding React subsystems.
12. Build and deployment are handled as a standard React/Webpack frontend. The repo includes Webpack configs under build-config, Babel settings, a Dockerfile, and a deploy.sh script. The build/ directory contains compiled assets and sample files, indicating that the app is packaged as a static frontend artifact for deployment behind a separate backend/API service.
Main entry points: index.jsx Routes · requestServer.js Request API · processSingleProgramRecords.js Transforms · Dashboard.jsx Dashboard
Components 28
App shell
SPA entry, routing, and shared layout
- App · Application bootstrap and top-level shell
src/app.jsx
State layer
Redux store and shared dashboard state
- Store · Redux store configuration
src/redux/store/configureStore.jsx - Root reducer · Combines application reducers
src/redux/reducers/rootReducer.jsx - Oracle state · Primary dashboard and UI state slice
src/redux/reducers/oracleReducer.jsx
Data layer
API access and dashboard/file preprocessing
- Request API · Server request wrapper and auth-aware calls
src/utils/requestServer.js - Transforms · Records and file preprocessing for dashboards
src/utils/processSingleProgramRecords.js - Program info · Program, stage, score, and rotation mappings
src/utils/programInfo/index.js - Tooling utils · File upload, parsing, download, and PDF helpers
src/utils/processUGFile.js
UI subsystems
Route pages and feature dashboards
- Routes · Page-level route definitions
src/pages/index.jsx - Container · Shared page frame and content layout
src/components/Container.jsx - NavBar · Primary navigation across dashboard areas
src/components/NavBar.jsx - Home · Public landing or overview page
src/pages/Home.jsx - Dashboard · Main dashboard route entry
src/pages/Dashboard.jsx - Admin · Administrative workflow page
src/pages/Admin.jsx - Tools · File ingestion and export tools
src/pages/Tools.jsx - Compare · Program comparison route
src/pages/ProgramsCompare.jsx - UG Dashboard · Undergraduate dashboard route
src/pages/UGPages/UGDashboard.jsx - UG Admin · Undergraduate admin route
src/pages/UGPages/UGAdmin.jsx - Resident dash · Resident EPA progress, trends, narratives, and schedules
src/components/ResidentDashboardGroup/InfoPanelGroup/InfoPanel.jsx - Faculty dash · Faculty performance, scores, and record views
src/components/FacultyDashbordGroup/FacultyGraphGroup.jsx - Normative dash · Population and comparative dashboard views
src/components/NormativeDashboardGroup/NormativeGraph.jsx - Program compare · Cross-program summaries and distributions
src/components/ProgramCompareGroup/ProgramSummary.jsx - Program eval · Stage-wise EPA completion and rotation summaries
src/components/ProgramEvaluationGroup/ProgramSummary.jsx - UG dashboards · Undergraduate dashboards, scheduling, and admin tools
src/components/UGGroup/UGStudentFilterPanel.jsx - Admin tools · User and data management actions
src/components/AdminGroup/CreateUser.jsx - Reusable UI · Common controls, cards, modals, and charts
src/components/ReusableComponents/Modal.jsx
Connections 44
- App → Routes: routes through · App shell delegates navigation to page routing
- App → Container: wraps · Shared layout frames routed pages
- App → NavBar: navigates with · Global navigation is part of the shell
- Routes → Home: loads · Route map includes landing page
- Routes → Dashboard: loads · Route map includes dashboard page
- Routes → Admin: loads · Route map includes admin page
- Routes → Tools: loads · Route map includes tools page
- Routes → Compare: loads · Route map includes program comparison page
- Routes → UG Dashboard: loads · Route map includes UG dashboard page
- Routes → UG Admin: loads · Route map includes UG admin page
- Dashboard → Resident dash: composes · Dashboard page assembles resident analytics
- Dashboard → Faculty dash: composes · Dashboard page assembles faculty analytics
- Dashboard → Normative dash: composes · Dashboard page assembles normative analytics
- Dashboard → Program eval: composes · Dashboard page assembles program evaluation views
- Admin → Admin tools: composes · Admin page hosts admin workflows
- Tools → Tooling utils: uses · Tools page relies on file and export utilities
- Compare → Program compare: composes · Comparison page renders comparison analytics
- UG Dashboard → UG dashboards: composes · UG dashboard page renders UG subsystem
- UG Admin → UG dashboards: composes · UG admin page shares UG subsystem
- Resident dash → Transforms: feeds · Resident analytics depend on normalized record transforms
- Faculty dash → Transforms: feeds · Faculty analytics depend on record transforms
- Normative dash → Transforms: feeds · Normative views depend on transformed data
- Program compare → Transforms: feeds · Program comparison uses processed program datasets
- Program eval → Transforms: feeds · Program evaluation uses processed records
- UG dashboards → Transforms: feeds · UG dashboards use UG-specific transforms
- Transforms → Program info: maps via · Transforms use program and stage metadata
- Request API → Program info: queries with · API requests are parameterized by domain metadata
- Resident dash → Reusable UI: shares · Resident subsystem is built from reusable UI primitives
- Faculty dash → Reusable UI: shares · Faculty subsystem reuses shared controls and cards
- Admin tools → Reusable UI: shares · Admin workflow uses shared UI primitives
- Dashboard → Store: reads state · Main dashboard is driven by centralized Redux state
- Admin → Store: reads state · Admin workflow also uses shared app state
- Store → Root reducer: configures · Store is built from the root reducer
- Root reducer → Oracle state: combines · Oracle slice is the primary shared state boundary
- Resident dash → Request API: loads data · Resident analytics consume server data through request utilities
- Faculty dash → Request API: loads data · Faculty analytics consume server data through request utilities
- Normative dash → Request API: loads data · Normative analytics consume server data through request utilities
- Admin tools → Request API: mutates data · Admin workflow performs server-backed changes
- UG dashboards → Request API: loads data · UG subsystem consumes server data through request utilities
- Program compare → Request API: loads data · Comparison analytics consume server data through request utilities
- Program eval → Request API: loads data · Evaluation analytics consume server data through request utilities
- Tools → Reusable UI: uses · Tools workflow uses shared file and modal controls
- App → Webpack: bundled by · App is packaged through the Webpack build pipeline
- App → Styles: styled by · Application shell and pages are styled through Sass