feat: Add embedded backend packaging for all-in-one deployment

- Add backend/run_server.py entry point for embedded deployment
- Add backend/build.py PyInstaller script for backend packaging
- Modify config.py to support frozen executable paths
- Extend client/config.json with backend configuration section
- Add backend sidecar management in Electron main process
- Add Whisper model download progress reporting
- Update build-client.bat with --embedded-backend flag
- Update DEPLOYMENT.md with all-in-one deployment documentation

This enables packaging frontend and backend into a single executable
for simplified enterprise deployment. Backward compatible with
existing separate deployment mode (backend.embedded: false).

🤖 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-17 10:06:29 +08:00
parent b1633fdcff
commit 58f379bc0c
11 changed files with 1003 additions and 17 deletions

View File

@@ -308,6 +308,30 @@
updateWhisperStatus();
const whisperStatusInterval = setInterval(updateWhisperStatus, 5000);
// Listen for model download progress events
window.electronAPI.onModelDownloadProgress((progress) => {
console.log('Model download progress:', progress);
if (progress.status === 'downloading_model') {
const percent = progress.progress || 0;
const downloadedMb = progress.downloaded_mb || 0;
const totalMb = progress.total_mb || 0;
whisperStatusEl.textContent = `⬇️ Downloading ${progress.model}: ${percent}% (${downloadedMb}/${totalMb} MB)`;
whisperStatusEl.style.color = '#ff9800';
} else if (progress.status === 'model_downloaded') {
whisperStatusEl.textContent = `${progress.model} downloaded`;
whisperStatusEl.style.color = '#28a745';
} else if (progress.status === 'loading_model') {
whisperStatusEl.textContent = `⏳ Loading ${progress.model}...`;
whisperStatusEl.style.color = '#ffc107';
} else if (progress.status === 'model_loaded') {
whisperStatusEl.textContent = `✅ Ready`;
whisperStatusEl.style.color = '#28a745';
// Trigger a status refresh
updateWhisperStatus();
}
});
// Load meeting data
async function loadMeeting() {
try {