A CoPilot-based agentic system that identifies patterns, routes escalations, learns from feedback, and gives engineers clarity instead of chaos. This repository contains the codebase for the full-stack application for viewing and analyzing internal support escalations.
Project website: https://compass-ai.my.canva.site/
single_source_of_truth_monorepo/
├── frontend/ # React frontend application
├── backend/ # Express.js backend API
├── package.json # Root package.json with convenience scripts
└── README.md # This file
- Node.js 16+ (recommended 18+)
- npm 8+
Check versions:
node -v
npm -vFrom the root directory:
npm run install:allOr install individually:
cd frontend && npm install && cd ..
cd backend && npm install && cd ..Start frontend:
npm run start:frontend- Opens
http://localhost:3000
Start backend:
npm run start:backend- Typically runs on
http://localhost:3001orhttp://localhost:3000(check backend config)
Frontend:
cd frontend
npm startBackend:
cd backend
npm startThe production dataset comes from the scripts in data_preprocessing/:
- Run
csv_to_json.pyto convertcleaned_incidents.csvintoincidents.json(raw structured data). - Run
enrich_incidents.pyto add routing metadata, confidence scores, context, and timelines. This writesincidents_enriched.json. - The backend automatically loads
data_preprocessing/incidents_enriched.json(or any file pointed to byESCALATIONS_DATA_PATH) at startup, so the React app always works with the latest enriched data. A fallback copy inbackend/data/escalations.jsonis only used if the pipeline output is missing.
Both scripts require Python 3.9+ plus the packages listed in the notebooks (scikit-learn, numpy, etc.). Re-run them whenever the CSV changes or you retrain the ML model (model.pkl / label_encoder.pkl).
- Frontend: React app with components in
frontend/src/components/ - Backend: Express.js API in
backend/ - Data: Generated via the pipeline above; no mock data is used in the UI.
Build the frontend for production:
npm run build:frontendRun frontend tests:
npm run test:frontend- Set
REACT_APP_API_URLif your backend runs on a non-default host/port. - Override the backend dataset path with
ESCALATIONS_DATA_PATHif you want to point at a different JSON file. - CORS is enabled in the backend to allow the React frontend to fetch data.