# Tasks: Add Flexible Deployment Options ## 1. Portable Extraction Path - [x] 1.1 Update `client/package.json` - Add `unpackDirName: "Meeting-Assistant"` to portable config ## 2. Configuration Schema for SQLite - [x] 2.1 Update `client/config.json` - Add `database.type` field (default: "mysql") - [x] 2.2 Update `client/config.json` - Add `database.sqlitePath` field (default: "data/meeting.db") ## 3. Backend Configuration - [x] 3.1 Update `backend/app/config.py` - Add `DB_TYPE` setting - [x] 3.2 Update `backend/app/config.py` - Add `SQLITE_PATH` setting - [x] 3.3 Update `backend/run_server.py` - Pass `DB_TYPE` and `SQLITE_PATH` to environment ## 4. Database Abstraction Layer - [x] 4.1 Refactor `backend/app/database.py` - Create `init_db()` dispatcher function - [x] 4.2 Implement `init_sqlite()` - SQLite connection with row_factory - [x] 4.3 Implement `init_mysql()` - Keep existing MySQL pool logic - [x] 4.4 Create unified `get_db_cursor()` context manager for both backends - [x] 4.5 Add SQLite table creation statements (convert MySQL syntax) - [x] 4.6 Add thread lock for SQLite connection safety ## 5. Build Script Integration - [x] 5.1 Update `scripts/build-client.bat` - Add `--database-type` parameter parsing - [x] 5.2 Update `scripts/build-client.bat` - Add `update_config_database` function - [x] 5.3 Update help message with new parameter ## 6. Testing - [x] 6.1 Test SQLite mode - Create meeting, query, update, delete - [x] 6.2 Test MySQL mode - Ensure backward compatibility - [ ] 6.3 Test portable extraction to `%TEMP%\Meeting-Assistant` (requires Windows build) ## 7. Documentation - [x] 7.1 Update DEPLOYMENT.md with SQLite mode instructions - [x] 7.2 Update DEPLOYMENT.md with --database-type parameter - [x] 7.3 Update DEPLOYMENT.md with portable extraction path info