# Tasks: Unify Environment Scripts ## 1. Package Audit and Update - [x] 1.1 Review Python dependencies in `requirements.txt` for unused/outdated packages - [x] 1.2 Review Node.js dependencies in `frontend/package.json` - [x] 1.3 Document system-level dependencies (apt packages, nvm, pandoc, etc.) - [x] 1.4 Update `requirements.txt` with corrected versions and comments ## 2. Environment Configuration Cleanup - [x] 2.1 Audit `.env`, `.env.local`, `.env.example` files in root and frontend - [x] 2.2 Consolidate duplicate environment variables - [x] 2.3 Update `.env.example` with all required variables - [x] 2.4 Remove sensitive data from version control (if any) ## 3. Update Setup Script - [x] 3.1 Add pre-flight checks (disk space, memory, existing installations) - [x] 3.2 Improve error messages with solutions - [x] 3.3 Add optional component installation (e.g., skip GPU detection if not needed) - [x] 3.4 Add database initialization step to setup script - [ ] 3.5 Test setup on clean Ubuntu 22.04/WSL2 environment ## 4. Create Unified Startup Script - [x] 4.1 Create `start.sh` with subcommands (all/backend/frontend) - [x] 4.2 Add process management (start, stop, restart, status) - [x] 4.3 Add log output options (combined/separate) - [x] 4.4 Preserve individual scripts for backwards compatibility (optional) - Removed old scripts - [x] 4.5 Test unified script in development environment ## 5. Documentation - [ ] 5.1 Update README with new startup instructions (skipped per user request) - [ ] 5.2 Add troubleshooting section for common issues (skipped per user request)