5.9 KiB
Brief Extractor GUI
Modern web interface for the Enhanced Brief Processing System with real-time progress tracking, multi-model AI processing, and Microsoft SSO authentication.
Quick Start
Development Mode
- Install Dependencies:
# Backend
pip install -r server_requirements.txt
# Frontend
cd frontend
npm install
cd ..
- Configure Environment:
# Copy and edit .env file with your API keys
# DEV_MODE=true is already set for local development
- Start Services:
# Terminal 1: Backend
python run_server.py
# Terminal 2: Frontend
cd frontend
npm run dev
- Access Application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Health Check: http://localhost:8000/health
Production Deployment
- Configure Authentication:
# Update .env with your Microsoft Azure AD app registration:
MSAL_CLIENT_ID=your-client-id
MSAL_CLIENT_SECRET=your-client-secret
MSAL_TENANT_ID=your-tenant-id
DEV_MODE=false
- Deploy with Docker:
# Build and start all services
docker-compose up -d
# Check status
docker-compose ps
docker-compose logs -f
Architecture
Backend (Python/Quart)
- Async web framework with WebSocket support
- Job queue system with concurrent processing
- Multi-model AI integration preserving existing processing logic
- Real-time progress tracking via WebSocket
- MSAL authentication with dev mode bypass
- File management with auto-cleanup
Frontend (React/TypeScript)
- Modern React with TypeScript and Vite
- Real-time updates via WebSocket
- MSAL integration for SSO authentication
- Model configuration interface
- Progress visualization with provider status
- Responsive design with Tailwind CSS
Key Features
✅ Multi-file upload with drag-and-drop ✅ Real-time progress for all processing stages ✅ Model selection (primary + consolidation models) ✅ Cost estimation before processing ✅ Live log streaming for active jobs ✅ Batch operations (multi-upload, batch download) ✅ Authentication (MSAL SSO + dev mode) ✅ Auto-cleanup of processed files ✅ Docker deployment ready
API Endpoints
Authentication
GET /api/auth/config- Get MSAL configurationPOST /api/auth/validate- Validate access tokenGET /api/auth/user- Get current user infoPOST /api/auth/logout- Get logout URL
Jobs
POST /api/jobs- Upload files and create jobsGET /api/jobs- List user's jobsGET /api/jobs/<id>- Get job detailsGET /api/jobs/<id>/download- Download CSV resultGET /api/jobs/<id>/logs- Get job logsDELETE /api/jobs/<id>- Delete jobPOST /api/jobs/batch-download- Download multiple CSVs as ZIP
Configuration
GET /api/config/models- Available models with pricingGET /api/config/defaults- Default configurationPOST /api/config/estimate- Estimate processing costPOST /api/config/validate- Validate model configuration
System
GET /health- Health checkGET /api/config/system- System information
WebSocket Events
Job Lifecycle
queue.snapshot- Initial job listjob.created- New job added to queuejob.progress- Progress updatejob.provider_update- Individual model statusjob.log- Real-time log entryjob.completed- Job finished successfullyjob.failed- Job failed with errorjob.deleted- Job removed
Environment Variables
See .env file for complete configuration. Key settings:
# Development
DEV_MODE=true # Bypass MSAL in development
ALLOWED_ORIGINS=http://localhost:3000
# Authentication (Production)
MSAL_CLIENT_ID=your-client-id
MSAL_CLIENT_SECRET=your-secret
MSAL_TENANT_ID=your-tenant-id
# Performance
MAX_CONCURRENT_JOBS=2
MAX_UPLOAD_SIZE_MB=200
FILE_RETENTION_HOURS=24
# All existing AI model API keys remain the same
CLI Compatibility
The original CLI interface remains fully functional:
# Original usage still works
python core/process_brief_enhanced.py document.pdf
# With custom models
python core/process_brief_enhanced.py document.pdf \
--primary-models openai-gpt5,anthropic-sonnet4 \
--consolidation-model anthropic-opus4
Development Notes
Project Structure
├── server/ # Quart backend
│ ├── api/ # REST endpoints
│ ├── auth/ # MSAL authentication
│ ├── jobs/ # Job management
│ ├── ws/ # WebSocket handling
│ └── runners/ # Job processing
├── core/ # Original processing logic (moved)
├── frontend/ # React frontend
├── prompts/ # AI prompts and schemas
└── docker-compose.yml # Container orchestration
Adding Features
- New API endpoints: Add to
server/api/ - WebSocket events: Extend
ws/manager.py - UI components: Add to
frontend/src/components/ - Processing logic: Modify
core/modules
Testing
# Backend tests
cd server
python -m pytest
# Frontend tests
cd frontend
npm test
# Integration tests
docker-compose -f docker-compose.test.yml up --abort-on-container-exit
Production Checklist
- Configure Microsoft Azure AD app registration
- Set production environment variables
- Configure HTTPS certificates
- Set up monitoring and logging
- Configure backup for processed files
- Set up alerts for processing failures
- Load test with expected file volumes
Support
For issues or questions:
- Check logs:
docker-compose logs - Health check: Visit
/healthendpoint - WebSocket status: Check browser dev tools
- File permissions: Ensure
server/data/is writable
The GUI provides the same powerful multi-model AI processing as the CLI with an intuitive web interface, real-time progress tracking, and enterprise authentication.