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

48
backend/tests/conftest.py Normal file
View File

@@ -0,0 +1,48 @@
"""
Pytest configuration and fixtures.
"""
import pytest
import sys
import os
# Add the backend directory to the path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
@pytest.fixture(autouse=True)
def mock_env(monkeypatch):
"""Set up mock environment variables for all tests."""
monkeypatch.setenv("DB_HOST", "localhost")
monkeypatch.setenv("DB_PORT", "3306")
monkeypatch.setenv("DB_USER", "test")
monkeypatch.setenv("DB_PASS", "test")
monkeypatch.setenv("DB_NAME", "test_db")
monkeypatch.setenv("AUTH_API_URL", "https://auth.test.com/login")
monkeypatch.setenv("DIFY_API_URL", "https://dify.test.com/v1")
monkeypatch.setenv("DIFY_API_KEY", "test-api-key")
monkeypatch.setenv("ADMIN_EMAIL", "admin@test.com")
monkeypatch.setenv("JWT_SECRET", "test-jwt-secret")
@pytest.fixture
def sample_meeting():
"""Sample meeting data for tests."""
return {
"subject": "Test Meeting",
"meeting_time": "2025-01-15T10:00:00",
"location": "Conference Room A",
"chairperson": "John Doe",
"recorder": "Jane Smith",
"attendees": "alice@test.com, bob@test.com",
}
@pytest.fixture
def sample_transcript():
"""Sample transcript for AI tests."""
return """
今天的會議主要討論了Q1預算和新員工招聘計劃。
決定將行銷預算增加10%
小明負責在下週五前提交最終報告。
"""