feat: Meeting Assistant MVP - Complete implementation

Enterprise Meeting Knowledge Management System with:

Backend (FastAPI):
- Authentication proxy with JWT (pj-auth-api integration)
- MySQL database with 4 tables (users, meetings, conclusions, actions)
- Meeting CRUD with system code generation (C-YYYYMMDD-XX, A-YYYYMMDD-XX)
- Dify LLM integration for AI summarization
- Excel export with openpyxl
- 20 unit tests (all passing)

Client (Electron):
- Login page with company auth
- Meeting list with create/delete
- Meeting detail with real-time transcription
- Editable transcript textarea (single block, easy editing)
- AI summarization with conclusions/action items
- 5-second segment recording (efficient for long meetings)

Sidecar (Python):
- faster-whisper medium model with int8 quantization
- ONNX Runtime VAD (lightweight, ~20MB vs PyTorch ~2GB)
- Chinese punctuation processing
- OpenCC for Traditional Chinese conversion
- Anti-hallucination parameters
- Auto-cleanup of temp audio files

OpenSpec:
- add-meeting-assistant-mvp (47 tasks, archived)
- add-realtime-transcription (29 tasks, archived)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
egg
2025-12-10 20:17:44 +08:00
commit 8b6184ecc5
65 changed files with 10510 additions and 0 deletions

177
DEPLOYMENT.md Normal file
View File

@@ -0,0 +1,177 @@
# Meeting Assistant Deployment Guide
## Prerequisites
- Python 3.10+
- Node.js 18+
- MySQL 8.0+
- Access to Dify LLM service
## Backend Deployment
### 1. Setup Environment
```bash
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
```
### 2. Configure Environment Variables
```bash
# Copy example and edit
cp .env.example .env
# Edit .env with actual values:
# - DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_NAME
# - AUTH_API_URL
# - DIFY_API_URL, DIFY_API_KEY
# - ADMIN_EMAIL
# - JWT_SECRET (generate a secure random string)
```
### 3. Run Server
```bash
# Development
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
# Production
uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4
```
### 4. Verify Deployment
```bash
curl http://localhost:8000/api/health
# Should return: {"status":"healthy","service":"meeting-assistant"}
```
## Electron Client Deployment
### 1. Setup
```bash
cd client
# Install dependencies
npm install
```
### 2. Development
```bash
npm start
```
### 3. Build for Distribution
```bash
# Build portable executable
npm run build
```
The executable will be in `client/dist/`.
## Transcription Sidecar
### 1. Setup
```bash
cd sidecar
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install pyinstaller
```
### 2. Download Whisper Model
The model will be downloaded automatically on first run. For faster startup, pre-download:
```python
from faster_whisper import WhisperModel
model = WhisperModel("small", device="cpu", compute_type="int8")
```
### 3. Build Executable
```bash
python build.py
```
The executable will be in `sidecar/dist/transcriber`.
### 4. Package with Electron
Copy `sidecar/dist/` to `client/sidecar/` before building Electron app.
## Database Setup
The backend will automatically create tables on first startup. To manually verify:
```sql
USE db_A060;
SHOW TABLES LIKE 'meeting_%';
```
Expected tables:
- `meeting_users`
- `meeting_records`
- `meeting_conclusions`
- `meeting_action_items`
## Testing
### Backend Tests
```bash
cd backend
pytest tests/ -v
```
### Performance Verification
On target hardware (i5/8GB):
1. Start the Electron app
2. Record 1 minute of audio
3. Verify transcription completes within acceptable time
4. Test AI summarization with the transcript
## Troubleshooting
### Database Connection Issues
1. Verify MySQL is accessible from server
2. Check firewall rules for port 33306
3. Verify credentials in .env
### Dify API Issues
1. Verify API key is valid
2. Check Dify service status
3. Review timeout settings for long transcripts
### Transcription Issues
1. Verify microphone permissions
2. Check sidecar executable runs standalone
3. Review audio format (16kHz, 16-bit, mono)
## Security Notes
- Never commit `.env` files
- Keep JWT_SECRET secure and unique per deployment
- Ensure HTTPS in production
- Regular security updates for dependencies