Skip to content
codemaster525640Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cadence · Work Intelligence Platform

One Python project. FastAPI runs the process-mining engine and serves the dashboard — the UI shows real, engine-computed numbers, not mock data.

Run it

cd cadence
pip install -r requirements.txt
python run.py

Open http://127.0.0.1:8000

That's it — no Node, no build step. The dashboard is dependency-free HTML/CSS/JS with hand-rolled SVG charts.

What runs where

Browser (dashboard)  ──fetch──►  FastAPI  ──►  engine (mining, ROI, analytics)
   SVG charts                    /api/*         real computed results
  • GET / → the dashboard
  • GET /api/overview → KPIs, trend, activity mix, app usage, process map
  • GET /api/workflows → mined workflow templates + steps
  • GET /api/automation → ranked automation opportunities (feasibility/ROI/risk)
  • GET /api/analytics → team comparison, focus/switch/rework, heatmap
  • POST /api/assistant → grounded natural-language answers + a chart

Every payload is built at startup by pushing a synthetic dataset through the actual engine functions (merge_executions_into_template, generate_recommendation, team_metrics, classify_activity, ...).

Layout

cadence/
├── run.py                     # python run.py
├── requirements.txt
└── app/
    ├── main.py                # FastAPI: API + serves the UI
    ├── engine/                # the process-mining engine (pure logic)
    │   ├── models.py
    │   ├── capture_and_vision.py
    │   ├── workflow_and_mining.py
    │   ├── automation_and_analytics.py
    │   └── assistant_rag.py
    ├── services/
    │   └── data.py            # builds API payloads by running the engine
    └── static/
        ├── index.html
        ├── styles.css
        └── app.js             # dashboard + SVG charts, calls /api/*

Screen capture (desktop agent)

The agent runs on the monitored machine, separate from the server:

pip install mss                 # cross-platform screenshots
# Windows: pip install psutil pywin32   macOS: pip install pyobjc   Linux: sudo apt install xdotool
cd cadence/agent
python capture_agent.py

It refuses to start until you set "consent_confirmed": true in agent/config.json, and it skips excluded apps/sites before taking any screenshot. Each tick: detect active window → should_capture? → grab → (mask → OCR → vision on the backend). Deploying screen capture on people usually carries legal duties (notice, consent, DPIA under GDPR) — the consent gate is real.

Making it real

  • Live capture: replace the synthetic generator in services/data.py with your event store; the desktop agent feeds capture_and_vision.py (screenshot → mask → OCR → mask PII → vision action detection).
  • Real assistant: services/data.answer() is a local grounded responder — swap it for engine/assistant_rag.answer_question() with your LLM + FAISS.
  • Persistence: point the API at PostgreSQL instead of the in-memory DATA.

Privacy by design

Analytics are team-level only. team_metrics enforces a cohort floor (MIN_COHORT = 5) and refuses to report below it; there is no per-individual scoring function anywhere in the engine.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages