No description
Find a file
Vadym Samoilenko 46ccccc3dd Add Per-User Report tab with bar chart, table, and CSV export
New tab in Dashboard switches between the existing Volume Report and a
Per-User view showing message counts aggregated by User_ID. Reuses
existing filteredMessages, processedUserData, date/org filters.
CSV export matches the format Michael sends to the BAIC UK client.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 13:12:49 +01:00
backend Add Timestamp field to enriched messages using conversation StartTime fallback 2025-11-18 14:50:16 -06:00
frontend Add Per-User Report tab with bar chart, table, and CSV export 2026-05-06 13:12:49 +01:00
.env.example Configure MSAL redirect URI explicitly via environment variables 2025-11-18 09:27:13 -06:00
.gitignore extracted all domains, URLS, secrets, etc. to .env and wrote a deploy script to deploy on server 2025-11-12 16:27:59 -06:00
CLAUDE.md extracted all domains, URLS, secrets, etc. to .env and wrote a deploy script to deploy on server 2025-11-12 16:27:59 -06:00
deploy.sh Update deploy script to restart backend service instead of start 2025-11-19 09:17:19 -06:00
email_analysis.py extracted all domains, URLS, secrets, etc. to .env and wrote a deploy script to deploy on server 2025-11-12 16:27:59 -06:00
README.md extracted all domains, URLS, secrets, etc. to .env and wrote a deploy script to deploy on server 2025-11-12 16:27:59 -06:00
run.sh extracted all domains, URLS, secrets, etc. to .env and wrote a deploy script to deploy on server 2025-11-12 16:27:59 -06:00
test_user_mapping.js initial commit 2025-11-12 15:55:59 -06:00
USER_FILTERING_NOTES.md initial commit 2025-11-12 15:55:59 -06:00

Oliver Agency Reporting Module

A web-based reporting module to display usage analytics for conversations and messages with various filtering options and CSV export functionality.

Project Structure

  • /backend: Python Flask backend API
  • /frontend: React + Vite frontend application

Environment Setup

Before running the application, you need to configure environment variables:

  1. Copy the example environment file:

    cp .env.example .env
    
  2. Edit .env with your configuration:

    • DOMAIN: Your deployment domain (e.g., yourdomain.com)
    • BASE_PATH: Application base path (default: /dashboard/)
    • AZURE_TENANT_ID: Azure AD tenant identifier
    • AZURE_CLIENT_ID: Azure AD application (client) identifier
    • BACKEND_PORT: Backend server port (default: 5001)
    • MAKE_WEBHOOK_URL: Make.com webhook endpoint
    • VITE_* variables: Duplicate the above values with VITE_ prefix for frontend
  3. Azure AD Setup:

    • Create an app registration in Azure Portal
    • Add redirect URIs for your deployment domain
    • Copy the Tenant ID and Client ID to your .env file

Getting Started

Run both backend and frontend together:

./run.sh

This script automatically loads environment variables from .env and starts both servers.

Backend

  1. Navigate to the backend directory:

    cd backend
    
  2. Activate the virtual environment:

    source venv/bin/activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Load environment variables and start the development server:

    # Load environment variables
    set -a && source ../.env && set +a
    # Start server
    python app.py
    

The API will be available at http://localhost:{BACKEND_PORT} (default: 5001).

Frontend

  1. Navigate to the frontend directory:

    cd frontend
    
  2. Install dependencies:

    npm install
    
  3. Start the development server:

    npm run dev
    

The application will be available at http://localhost:5173.

Features

  • Dashboard displaying conversation and message volume over time
  • Filter data by user, assistant, brand/TOV, and date range
  • Export filtered data to CSV
  • Interactive graph with assistant-specific coloring

API Endpoints

  • GET /api/data: Returns all conversations and messages data