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>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Change: Add Flexible Deployment Options
|
||||
|
||||
## Why
|
||||
Enterprise deployment environments vary significantly. Some networks block MySQL port 33306, preventing access to cloud databases. Additionally, the current portable executable extracts to a random folder in `%TEMP%`, causing Windows Defender warnings on each launch and potential permission issues.
|
||||
|
||||
## What Changes
|
||||
- **SQLite database support** - Allow choosing between MySQL (cloud) and SQLite (local) databases at build time via `--database-type` parameter
|
||||
- **Fixed portable extraction path** - Configure `unpackDirName` to use a predictable folder name instead of random UUID
|
||||
|
||||
## Impact
|
||||
- Affected specs: `embedded-backend` (modified)
|
||||
- Affected code:
|
||||
- `client/config.json` - Add `database.type` and `database.sqlitePath` fields
|
||||
- `client/package.json` - Add `unpackDirName` to portable configuration
|
||||
- `backend/app/config.py` - Add `DB_TYPE` and `SQLITE_PATH` settings
|
||||
- `backend/app/database.py` - Conditional SQLite/MySQL initialization
|
||||
- `backend/run_server.py` - Pass database type environment variables
|
||||
- `scripts/build-client.bat` - Add `--database-type` parameter
|
||||
@@ -0,0 +1,57 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: SQLite Database Support
|
||||
The backend SHALL support SQLite as an alternative to MySQL for offline/standalone deployments.
|
||||
|
||||
#### Scenario: SQLite mode initialization
|
||||
- **WHEN** `database.type` is set to `"sqlite"` in config.json
|
||||
- **THEN** backend SHALL create SQLite database at `database.sqlitePath`
|
||||
- **AND** initialize all required tables using SQLite-compatible syntax
|
||||
|
||||
#### Scenario: MySQL mode initialization
|
||||
- **WHEN** `database.type` is set to `"mysql"` or not specified in config.json
|
||||
- **THEN** backend SHALL connect to MySQL using credentials from `database` section
|
||||
- **AND** behave exactly as before this change
|
||||
|
||||
#### Scenario: SQLite thread safety
|
||||
- **WHEN** multiple concurrent requests access SQLite database
|
||||
- **THEN** backend SHALL use thread lock to serialize database operations
|
||||
- **AND** use `check_same_thread=False` for SQLite connection
|
||||
|
||||
#### Scenario: SQLite data persistence
|
||||
- **WHEN** app is closed and reopened
|
||||
- **THEN** all meeting data SHALL persist in SQLite file
|
||||
- **AND** be accessible on next launch
|
||||
|
||||
### Requirement: Portable Extraction Path Configuration
|
||||
The portable Windows build SHALL extract to a predictable folder name.
|
||||
|
||||
#### Scenario: Fixed extraction folder
|
||||
- **WHEN** portable executable starts
|
||||
- **THEN** it SHALL extract to `%TEMP%\Meeting-Assistant` instead of random UUID folder
|
||||
|
||||
#### Scenario: Windows Defender consistency
|
||||
- **WHEN** user launches portable executable multiple times
|
||||
- **THEN** Windows Defender SHALL NOT prompt for permission each time
|
||||
- **BECAUSE** extraction path is consistent across launches
|
||||
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Unified Configuration Schema
|
||||
All configuration for frontend, backend, and whisper SHALL be in a single `config.json` file.
|
||||
|
||||
#### Scenario: Backend configuration loading
|
||||
- **WHEN** backend sidecar starts
|
||||
- **THEN** it SHALL read database type from `config.json` backend.database.type section
|
||||
- **AND** read SQLite path from `config.json` backend.database.sqlitePath section (if SQLite mode)
|
||||
- **AND** read database credentials from `config.json` backend.database section (if MySQL mode)
|
||||
- **AND** read API keys from `config.json` backend.externalApis section
|
||||
- **AND** read auth settings from `config.json` backend.auth section
|
||||
|
||||
#### Scenario: Configuration priority
|
||||
- **WHEN** both environment variable and config.json value exist
|
||||
- **THEN** environment variable SHALL take precedence
|
||||
|
||||
#### Scenario: Default values
|
||||
- **WHEN** configuration value is not specified
|
||||
- **THEN** system SHALL use sensible defaults (host: 127.0.0.1, port: 8000, database.type: mysql)
|
||||
@@ -0,0 +1,36 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user