Files
Meeting_Assistant/openspec/changes/archive/2025-12-14-extract-environment-variables/tasks.md
egg e7a06e2b8f chore: Archive all pending OpenSpec proposals
Force archive the following proposals:
- add-audio-device-selector (complete)
- add-embedded-backend-packaging (19/26 tasks)
- add-flexible-deployment-options (20/21 tasks)

New specs created:
- audio-device-management (7 requirements)
- embedded-backend (8 requirements)

Updated specs:
- transcription (+2 requirements for model download progress)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 08:44:04 +08:00

2.0 KiB

Tasks: Extract Environment Variables

1. Backend Configuration

  • 1.1 Update backend/app/config.py with new environment variables
    • Add: BACKEND_HOST, BACKEND_PORT
    • Add: DB_POOL_SIZE, JWT_EXPIRE_HOURS
    • Add: UPLOAD_TIMEOUT, DIFY_STT_TIMEOUT, LLM_TIMEOUT, AUTH_TIMEOUT
    • Add: TEMPLATE_DIR, RECORD_DIR, MAX_FILE_SIZE, SUPPORTED_AUDIO_FORMATS
  • 1.2 Update backend/app/database.py to use DB_POOL_SIZE from config
  • 1.3 Update backend/app/routers/ai.py to use Dify timeout configs (DIFY_STT_TIMEOUT, LLM_TIMEOUT)
  • 1.4 Update backend/app/routers/auth.py to use AUTH_TIMEOUT and JWT_EXPIRE_HOURS from config
  • 1.5 Update backend/app/routers/export.py to use TEMPLATE_DIR and RECORD_DIR from config
  • 1.6 Update backend/.env with all new variables
  • 1.7 Update backend/.env.example with all variables (without sensitive values)

2. Frontend/Electron Configuration

  • 2.1 Create client/.env with VITE_API_BASE_URL and Whisper settings
  • 2.2 Create client/.env.example as template
  • 2.3 Update client/src/services/api.js to use import.meta.env.VITE_API_BASE_URL
  • 2.4 Update client/src/main.js to pass Whisper env vars to Sidecar process

3. Startup Scripts

  • 3.1 Update start.sh to load environment variables properly
  • 3.2 Create scripts/deploy-backend.sh for standalone backend deployment

4. Deployment Documentation

  • 4.1 Create docs/1panel-deployment.md with step-by-step guide
    • Include: Prerequisites and system requirements
    • Include: Python environment setup
    • Include: Environment variable configuration (IT only needs HOST + PORT)
    • Include: Nginx reverse proxy configuration example
    • Include: Systemd service file example
    • Include: SSL/HTTPS setup guide (optional)
    • Include: Troubleshooting common issues

5. Validation

  • 5.1 Test backend starts with new config
  • 5.2 Test frontend builds with environment variables
  • 5.3 Test API connectivity between frontend and backend
  • 5.4 Verify all hardcoded values are externalized