---
name: "BAIC Dashboard"
client: BAIC
status: active
tech: [Python, Flask, Hypercorn, React, Vite, Recharts, PapaParse, Azure AD, Make.com]
local_path: /Users/ai_leed/Documents/Projects/Oliver/baic_dashboard
deploy: python + npm run dev
url: 
server: TBD (BASE_PATH=/dashboard/)
tags: [baic, analytics, dashboard, flask, react, recharts, make, azure-ad]
created: 2026-04-14
last_commit: 2025-11-19
commits: 11
---

## Overview
Oliver Agency Reporting Module — analytics dashboard for conversation and message volumes. Backend fetches from Make.com webhook, enriches data, serves via REST API. Frontend filters client-side.

**Data flow:**
Make.com webhook → Flask API → enrich messages with conversation metadata → React SPA → Recharts visualization

## Tech Stack
- **Frontend:** React + Vite SPA (`/frontend/`) + Recharts + PapaParse (CSV export)
- **Backend:** Python Flask (`/backend/app.py`) + Hypercorn ASGI
- **Auth:** Azure AD (MSAL) — requires Azure App Registration
- **Data source:** Make.com webhook URL
- **Infrastructure:** No Docker

## Env Config (`.env`)
```
DOMAIN=
BASE_PATH=/dashboard/
AZURE_TENANT_ID=
AZURE_CLIENT_ID=
MAKE_WEBHOOK_URL=
# Duplicate all with VITE_ prefix for frontend
```

## Architecture
```
Make.com webhook (data source)
    ↓
Flask backend (/backend/app.py)
    ↓ message enrichment (+ conversation metadata, assistant name mapping)
React SPA (client-side filtering + CSV export)
    └── Recharts (visualization)
    └── PapaParse (CSV export)
```

**Assistant ID mapping:** `assistantMapping.js` maps IDs → friendly display names.

## Dev Commands
```bash
cp .env.example .env    # Configure Azure AD + Make.com URL
# Start both:
cd backend && python app.py
cd frontend && npm run dev
```

## Deployment
- **Local path:** `/Users/ai_leed/Documents/Projects/Oliver/baic_dashboard`
- **Server base path:** `/dashboard/`
- **Last deploy:** 2025-11-19 (restart backend service fix)

## Timeline / Git History
| Date | Change |
|------|--------|
| 2025-11-19 | Update deploy script to restart backend service instead of start |

## Sessions
### 2026-04-24 – Asked for integration and hooks verification
**Asked:** Asked for integration and hooks verification across Claude, Obsidian, and cc-dashboard on this machine.
**Done:** Verified and fixed missing PROJECTS_ROOT configuration in settings.json hooks for scripts and cc-collector path resolution.

### 2026-04-14 – Project catalogued
**Done:** Added to Obsidian second brain with full details.

---
## Change Log
| Date | Requested | Changed | Files |
|------|-----------|---------|-------|
| 2026-04-24 | Integration audit | Added PROJECTS_ROOT to hooks, Fixed cc-collector path resolution | settings.json, cc-collector config |
| 2025-11-19 | Deploy fix | Restart backend instead of start | deploy script |

## Related
- [[cc-dashboard/CC Dashboard]]
