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>
2.0 KiB
2.0 KiB
middleware Specification
Purpose
TBD - created by archiving change add-meeting-assistant-mvp. Update Purpose after archive.
Requirements
Requirement: FastAPI Server Configuration
The middleware server SHALL be implemented using Python FastAPI framework with environment-based configuration.
Scenario: Server startup with valid configuration
- WHEN the server starts with valid .env file containing DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_NAME, DIFY_API_URL, DIFY_API_KEY
- THEN the server SHALL start successfully and accept connections
Scenario: Server startup with missing configuration
- WHEN the server starts with missing required environment variables
- THEN the server SHALL fail to start with descriptive error message
Requirement: Database Connection Pool
The middleware server SHALL maintain a connection pool to the MySQL database at mysql.theaken.com:33306.
Scenario: Database connection success
- WHEN the server connects to MySQL with valid credentials
- THEN a connection pool SHALL be established and queries SHALL execute successfully
Scenario: Database connection failure
- WHEN the database is unreachable
- THEN the server SHALL return HTTP 503 with error details for affected endpoints
Requirement: Table Initialization
The middleware server SHALL ensure all required tables exist on startup with the meeting_ prefix.
Scenario: Tables created on first run
- WHEN the server starts and tables do not exist
- THEN the server SHALL create meeting_users, meeting_records, meeting_conclusions, and meeting_action_items tables
Scenario: Tables already exist
- WHEN the server starts and tables already exist
- THEN the server SHALL skip table creation and continue normally
Requirement: CORS Configuration
The middleware server SHALL allow cross-origin requests from the Electron client.
Scenario: CORS preflight request
- WHEN Electron client sends OPTIONS request
- THEN the server SHALL respond with appropriate CORS headers allowing the request