View and manage tasks from TODO.md file. Filter, search, and drag tasks across columns.
**Priority Classification**: Functional failures → High priority (To Do), General errors → Medium priority (Backlog)
**User Request Handling**: Direct requests added as high priority to To Do section
Hosting Management System: Implement Nginx config reading service in web/services/config_manager.py. Add methods to list all Nginx configs, read specific config file, validate config paths, and return formatted config content. Include error handling for missing files and permission issues.
Hosting Management System: Create config editing UI at /configs route. Display list of all Nginx configs with syntax-highlighted editor using CodeMirror or Monaco. Add save/cancel buttons and real-time validation feedback. Ensure changes are staged before applying.
Hosting Management System: Implement Nginx config validation with 'nginx -t' before applying changes. Add API endpoint POST /api/configs/nginx/test that runs validation and returns success/error. Display validation results in UI before allowing save. Test with intentionally broken config.
Hosting Management System: Add API endpoint PUT /api/configs/nginx/{site} for updating config files. Validate input, create backup, write new config, test with nginx -t, reload if valid. Rollback on failure. Test with all three sites (cigar, tobacco, hosting).
Hosting Management System: Write pytest tests for config management covering read, write, validate, backup, restore, and rollback scenarios. Achieve 100% coverage for config_manager.py. Mock filesystem operations and nginx commands.
Cigar Management System: Setup Devise gem for user authentication. Configure Devise with email/password authentication, confirmable, recoverable, and rememberable modules. Create User model with email, encrypted_password, and admin boolean. Verify Devise routes are properly installed.
Cigar Management System: Create default admin user via rake task using credentials from .secrets.json (email: admin@remoteds.us). Add db/seeds.rb entry for admin user creation. Verify admin user can login, logout, and reset password. Test all Devise flows with RSpec.
Cigar Management System: Modify ApplicationController to require authentication for all routes using before_action :authenticate_user! Add public routes exception list if needed. Verify unauthenticated users are redirected to login. Test with RSpec request specs.
Cigar Management System: Create Humidor model with name, location, capacity, and temperature/humidity fields. Add CRUD views with Bootstrap 5 styling. Implement humidor listing, create, edit, and delete functionality. Verify all CRUD operations work correctly.
Cigar Management System: Create Cigar model with brand, name, size, wrapper, strength, humidor association. Add CRUD views with search and filtering. Implement pagination for large lists. Test all CRUD operations and associations with RSpec.
Cigar Management System: Write comprehensive RSpec tests for all models, controllers, and views covering validations, associations, CRUD operations, search, and filtering. Achieve minimum 80% test coverage.
Tobacco Management System: Create default admin user via rake task using credentials from .secrets.json (email: admin@remoteds.us). Add db/seeds.rb entry for admin user creation. Verify admin user can login, logout, and reset password. Test all Devise flows with RSpec.
Tobacco Management System: Modify ApplicationController to require authentication for all routes using before_action :authenticate_user! Add public routes exception list if needed. Verify unauthenticated users are redirected to login. Test with RSpec request specs.
Tobacco Management System: Create Product model with name, brand, type (pipe/cigar/cigarette), flavor_profile, nicotine_strength fields. Add CRUD views with Bootstrap 5 styling. Implement search and filtering by type and brand. Test all CRUD operations with RSpec.
Tobacco Management System: Write comprehensive RSpec tests for all models, controllers, and views covering validations, associations, CRUD operations, search, and inventory tracking. Achieve minimum 80% test coverage.
Infrastructure: Document PostgreSQL restore procedure in BACKUP_RESTORE_GUIDE.md. Include steps for stopping services, dropping/creating database, restoring from backup, and restarting services. Test restore procedure on QA environment.
Documentation: Document full Ruby 3.3+/Rails 7.2+ local development setup including rbenv/rvm installation, PostgreSQL setup, gem installation, and database creation. Add to development guide with step-by-step instructions.
Hosting Management System: Implement Nginx config reading service in web/services/config_manager.py. Add methods to list all Nginx configs, read specific config file, validate config paths, and return formatted config content. Include error handling for missing files and permission issues.
Hosting Management System: Create config editing UI at /configs route. Display list of all Nginx configs with syntax-highlighted editor using CodeMirror or Monaco. Add save/cancel buttons and real-time validation feedback. Ensure changes are staged before applying.
Hosting Management System: Implement Nginx config validation with 'nginx -t' before applying changes. Add API endpoint POST /api/configs/nginx/test that runs validation and returns success/error. Display validation results in UI before allowing save. Test with intentionally broken config.
Hosting Management System: Add API endpoint PUT /api/configs/nginx/{site} for updating config files. Validate input, create backup, write new config, test with nginx -t, reload if valid. Rollback on failure. Test with all three sites (cigar, tobacco, hosting).
Hosting Management System: Write pytest tests for config management covering read, write, validate, backup, restore, and rollback scenarios. Achieve 100% coverage for config_manager.py. Mock filesystem operations and nginx commands.
Cigar Management System: Setup Devise gem for user authentication. Configure Devise with email/password authentication, confirmable, recoverable, and rememberable modules. Create User model with email, encrypted_password, and admin boolean. Verify Devise routes are properly installed.
Cigar Management System: Create default admin user via rake task using credentials from .secrets.json (email: admin@remoteds.us). Add db/seeds.rb entry for admin user creation. Verify admin user can login, logout, and reset password. Test all Devise flows with RSpec.
Cigar Management System: Create Cigar model with brand, name, size, wrapper, strength, humidor association. Add CRUD views with search and filtering. Implement pagination for large lists. Test all CRUD operations and associations with RSpec.
Cigar Management System: Write comprehensive RSpec tests for all models, controllers, and views covering validations, associations, CRUD operations, search, and filtering. Achieve minimum 80% test coverage.
Tobacco Management System: Create default admin user via rake task using credentials from .secrets.json (email: admin@remoteds.us). Add db/seeds.rb entry for admin user creation. Verify admin user can login, logout, and reset password. Test all Devise flows with RSpec.
Tobacco Management System: Create Product model with name, brand, type (pipe/cigar/cigarette), flavor_profile, nicotine_strength fields. Add CRUD views with Bootstrap 5 styling. Implement search and filtering by type and brand. Test all CRUD operations with RSpec.
Tobacco Management System: Write comprehensive RSpec tests for all models, controllers, and views covering validations, associations, CRUD operations, search, and inventory tracking. Achieve minimum 80% test coverage.
Infrastructure: Implement automated PostgreSQL backup with pg_dump running via cron every 6 hours. Store backups in /opt/backups/postgresql/ with 7-day rotation. Create backup script in /usr/local/bin/backup_databases.sh. Verify backup files are created and rotated correctly.
Infrastructure: Document PostgreSQL restore procedure in BACKUP_RESTORE_GUIDE.md. Include steps for stopping services, dropping/creating database, restoring from backup, and restarting services. Test restore procedure on QA environment.
Documentation: Document full Ruby 3.3+/Rails 7.2+ local development setup including rbenv/rvm installation, PostgreSQL setup, gem installation, and database creation. Add to development guide with step-by-step instructions.
Phase 4: Add local/remote execution modes to manager.py (--execute-locally, --execute-remotely flags)
Deploy cigar app from scratch with new database-backed setup
Deploy hosting app updates to production server
Test input validation
Test error responses
Test full workflows (deploy → start → stop)
Test with real systemctl commands (in test environment)
Test Nginx config changes
Test CLI commands
Test API communication
Test error handling
Test authentication
Test JWT token validation
Test rate limiting
Test password requirements
✅ Minimum 80% code coverage
✅ No hardcoded credentials in tests
✅ Use fixtures for test data
✅ Clean up test data after tests
[x] Update .secrets.json format
[x] Create web/ directory structure
[x] Implement basic FastAPI app with authentication
[x] Create dashboard HTML template
[x] Deploy to server (bootstrap method)
[x] Write tests for authentication
[x] Implement app status checking
[x] Implement start/stop/restart functionality
[x] Create app management UI
[x] Add API endpoints for app control
[x] Write tests for app management
[x] Test with cigar and tobacco apps
[x] Add `letsencrypt_email` to `config.json` (contact for LE terms)
[x] Install Certbot + nginx plugin on remote host
[x] Issue staging certs for: hosting.remoteds.us, cigars.remoteds.us, tobacco.remoteds.us
[x] Switch to production issuance for all three domains
[ ] Verify auto-renew timer and dry-run; confirm Nginx reload on renew
[x] Update `ssl_config` to LE live paths (if not already)
[x] Implement log reading service
[x] Create logs UI with filtering
[x] Add Nginx log support
[x] Implement real-time log tailing
[x] Write tests for log viewing
[ ] Implement config reading/writing
[ ] Create config editing UI
[ ] Add Nginx config validation
[ ] Implement backup/restore
[ ] Write tests for config management
[ ] Create troubleshooting scripts
[ ] Implement script runner service
[ ] Create scripts UI
[ ] Add script output streaming
[ ] Write tests for script execution
[ ] Implement self-update functionality
[ ] Add deployment UI
[ ] Test graceful restart
[ ] Document update procedures
[ ] Write tests for self-updates
✅ Can access https://hosting.remoteds.us with password
✅ Dashboard shows all apps with status
✅ Authentication tests pass
✅ Deployed via bootstrap method
✅ Can start/stop/restart all Rails apps via web UI
✅ Can start/stop/restart via API from laptop
✅ All app management tests pass
✅ Can view logs for all Rails apps
✅ Can view Nginx access and error logs
✅ Can search and filter logs
✅ All log viewing tests pass
✅ Can view all Nginx configs
✅ Can edit and test configs
✅ Changes are validated before applying
✅ All config management tests pass
✅ Can list all troubleshooting scripts
✅ Can execute scripts with parameters
✅ Can view script output in real-time
✅ All script execution tests pass
✅ Can update hosting system via web UI
✅ Updates are graceful (no downtime)
✅ Can rollback if needed
✅ All self-update tests pass
**Phase 1**: Core Infrastructure - Authentication, basic web interface
**Phase 2**: App Management - Start/stop/restart functionality
**Phase 3**: Log Viewing - Comprehensive log viewing with filtering
**Phase 4**: Config Management - Nginx configuration editing
**Phase 5**: Script Execution - Troubleshooting script runner
**Phase 6**: Self-Management - System updates and deployment
**Total Tests**: 89 passing tests
**Log Viewer Tests**: 23 tests covering all functionality
**API Routes Tests**: 26 tests covering all endpoints
**Existing Tests**: 40 tests for core functionality
**NO root-level git repository** - only individual app repos exist
**Local CLI tool only** (no Flask/FastAPI locally)
**Rails-only** applications on remote (Puma + Nginx)
**Remote web interface** at hosting.remoteds.us (to be built)
**Infrastructure as Code** - everything automated and repeatable
**Location**: `/Users/bpauley/Projects/mangement-systems/hosting-management-system/`
**Type**: Python 3.12 CLI tool (`manager.py`)
**Framework**: Click + Fabric/Paramiko
**Purpose**: Provision servers, deploy apps, manage configs
**No Web Server**: CLI-only, no local dashboard
**Host**: Ubuntu 25.04 LTS (Digital Ocean)
**Apps Deployed**:
`cigars.remoteds.us` → Cigar Management (Rails 7.2.2 + Puma)
`tobacco.remoteds.us` → Tobacco Management (Rails 7.2.2 + Puma)
`hosting.remoteds.us` → Management Interface (Rails 7.2.2 + Puma)
**Web Server**: Nginx (reverse proxy to Puma)
**App Server**: Puma (running as www-data user)
**Database**: PostgreSQL
Local: CLI tool (`manager.py`)
Remote: Rails web interface (to be built)
Same Ruby version (3.3+)
Same Rails version (7.2.2)
Same gem versions
✅ Manual verification complete
Redeployments **NEVER erase production data** by default
Database and uploaded files are preserved
Only use `--reset-data` flag when explicitly needed
All operations are idempotent (safe to run multiple times)
[ ] Create `DEPLOYMENT_LOG.md` in hosting-management-system/
[ ] Verify `deployment_key` and `deployment_key.pub` exist
[ ] Create `remote_cli_tools/` directory with scripts:
`parse_logs.sh` - Find errors in logs
`check_status.sh` - Check all service statuses
`restart_service.sh` - Quick service restart
[ ] Add `_install_remote_cli_tools()` method to provisioning
[ ] Add `view_logs` CLI command (stream journalctl)
[ ] Add `check_status` CLI command (query systemctl)
[ ] Verify SSH key deployment works correctly
[ ] Verify www-data ownership is set correctly
[ ] Document current server state in DEPLOYMENT_LOG.md
[ ] Run full provision + deploy cycle
[ ] Verify all apps deploy successfully
[ ] Test SSH key deployment
[ ] Test www-data ownership
[ ] **Destroy server and rebuild** to verify repeatability
[ ] Rewrite hosting-management-system/README.md
[ ] Remove all FastAPI/Flask references
[ ] Document CLI-only architecture
[ ] Add deployment procedure examples
[ ] Cross-reference with agents.md
[ ] Install Ruby 3.3+ locally
[ ] Install Rails 7.2.2 locally
[ ] Verify local environment matches production
[ ] Document local setup process
[ ] Create test checklist template
**Technology**: Rails 7.2.2 application
**Location**: `/var/www/hosting` on remote server
**Domain**: hosting.remoteds.us
**Features**:
Secure login/password authentication
Dashboard showing all app statuses
Real-time log viewing
App control (start/stop/restart)
Trigger deployments
View configurations
API endpoints for programmatic access
Backup management
Create new Rails 7.2.2 app in hosting-management-system repo
Add to config.json as deployment target
Deploy via same manager.py tool
Build authentication system
Create dashboard views
Implement API endpoints
[ ] Pytest coverage for ALL manager.py Fabric tasks
[ ] Mock connection tests
[ ] qa-test-repo deployment smoke tests
[ ] Full deployment cycle automated tests
[ ] Data preservation verification tests
"In Progress" item references old secrets management (complete)
Missing Phase 1 infrastructure tasks
No tasks for DEPLOYMENT_LOG.md creation
No tasks for remote CLI tools
Verify and document SSH key deployment
Create remote_cli_tools directory and scripts
Update manager.py with remote tool installation
Full provision + deploy cycle test
✅ Can provision bare Ubuntu server to production-ready state
✅ All steps documented in DEPLOYMENT_LOG.md
✅ Destroy/rebuild produces identical results
✅ No manual intervention required
✅ All configuration in code (Infrastructure as Code)
✅ Local Ruby/Rails environment matches production
✅ Can develop and test Rails apps locally
✅ Test suite running locally
✅ Development workflow documented
✅ hosting.remoteds.us serves management interface
✅ Can monitor all apps via web dashboard
✅ Can control apps via web interface
✅ API endpoints functional
✅ Secure authentication working
**Remember**: NO root-level git - only individual app repos
**Testing**: No production deploy without passing local tests
**Data Safety**: Never erase production data unless explicitly told
**Documentation**: Update DEPLOYMENT_LOG.md with every change
**Fixed Delete Bug**: Template was using `task.line_number` instead of `task.id` for PostgreSQL
**Fixed Pydantic v2**: Changed `regex` to `pattern` in field validation
**Added Tags API**: `/api/v1/kanban/tags` endpoint for tag management
**Added Tag Management**: Full CRUD interface at `/tags`
**Added Tag Filter**: Filter kanban tasks by assigned tags
<7 Days, <=2 Weeks, <=1 Month, <=3 Months, <=1 Year, All Issues
**Updated Task Cards**: Display tags with custom colors
**Added Manage Tags Button**: Quick access from kanban board
**Added Unit Tests**: 20 comprehensive pytest tests for all CRUD operations
**All Tests Pass**: Verified locally before deployment
**Test Coverage**: API endpoints, database models, validation rules
**PostgreSQL Remote Access**: Configured for user `bpauley`
**Firewall**: Opened port 5432 for remote connections
**Dependencies**: `sqlalchemy` and `psycopg2-binary` in requirements.txt
**Database**: `hosting_production` PostgreSQL database
**Tables**:
`kanban_tasks` - Main task storage with full metadata
`kanban_task_history` - Audit log for all changes
`kanban_tags` - Flexible tagging system
`kanban_task_tags` - Many-to-many task/tag relationship
**Schema File**: `docs/DATABASE_MIGRATION_KANBAN.sql`
**Migration Script**: `docs/migrate_todo_to_postgres.py`
**Source**: `/opt/hosting-api/TODO.md` → PostgreSQL
**Preserves**: All metadata (created_at, epic, priority, occurrence_count)
**Backup**: Original TODO.md automatically backed up
**Base URL**: `/api/v1/kanban/*`
**Authentication**: JWT Bearer token required
**All endpoints updated** to use SQLAlchemy instead of file operations
`GET /tasks` - Now supports advanced filtering (section, priority, status, epic)
`GET /tasks/{task_id}` - Changed from line_number to database ID
`POST /tasks` - Returns database ID instead of line number
`PUT /tasks/{task_id}` - Database-backed updates with transaction support
`POST /tasks/{task_id}/move` - Atomic section moves with position tracking
`DELETE /tasks/{task_id}` - Proper cascade delete with history preservation
`GET /health` - New endpoint for database connectivity checks
**Routes**: `docs/kanban_api_routes_postgres.py`
**Models**: `docs/kanban_models.py` (SQLAlchemy)
**File**: `docs/test_kanban_postgres.py`
**Framework**: pytest with requests library
**Test Classes**:
✅ API endpoint testing (all CRUD operations)
✅ Database constraint validation
✅ Authentication/authorization
✅ Filtering and pagination
✅ Task lifecycle (create → move → complete → delete)
✅ Concurrent access scenarios
✅ Web interface integration
**agents.md**:
Updated TODO Management System Rules section
Changed data storage from file to PostgreSQL database
Updated API endpoint documentation
Added database backup information
Removed file-based references
**KANBAN_POSTGRES_IMPLEMENTATION.md**: Complete implementation guide
Step-by-step migration procedures
Testing checklist
Troubleshooting guide
Rollback plan
Security considerations
**config.json**: Added `hosting` app configuration with database field
**.secrets.json**: Requires `hosting_production` database credentials
**Dependencies**: Added SQLAlchemy, psycopg2-binary, alembic to requirements.txt
**Included**: Kanban data now part of PostgreSQL backup system
**Automatic**: Same backup schedule as Rails applications
**No additional work**: Leverages existing infrastructure
Check: `priority IN ('high', 'medium', 'low')`
Check: `owner IN ('user', 'agent')`
`idx_kanban_section` on `section`
`idx_kanban_status` on `status`
`idx_kanban_priority` on `priority`
`idx_kanban_created_at` on `created_at DESC`
`idx_kanban_epic` on `epic`
`idx_kanban_position` on `section, position`
Auto-update `updated_at` on row modification
Log changes to `kanban_task_history` table
✅ Backup existing TODO.md file
✅ Document current task count and distribution
✅ Test migration script with dry-run
✅ Verify database connectivity
Run migration script: `python migrate_todo_to_postgres.py /opt/hosting-api/TODO.md`
Verify all tasks imported correctly
Check for any parsing errors
Validate metadata preservation
Remove or archive TODO.md files
Update all references to file-based system
Verify web interface displays correctly
Run full test suite
Monitor performance
[ ] All pytest tests pass
[ ] Database connection successful
[ ] CRUD operations work correctly
[ ] Constraints enforce data integrity
[ ] Audit trail logs changes
[ ] API endpoints respond correctly
[ ] Web interface renders tasks
[ ] Filtering and sorting work
[ ] Drag-and-drop functionality preserved
[ ] Authentication enforced
[ ] List queries < 100ms
[ ] Concurrent user access works
[ ] No file locking issues
[ ] Database indexes utilized
**Implementation Guide**: [docs/KANBAN_POSTGRES_IMPLEMENTATION.md](KANBAN_POSTGRES_IMPLEMENTATION.md)
**Database Schema**: [docs/DATABASE_MIGRATION_KANBAN.sql](DATABASE_MIGRATION_KANBAN.sql)
**SQLAlchemy Models**: [docs/kanban_models.py](kanban_models.py)
**API Routes**: [docs/kanban_api_routes_postgres.py](kanban_api_routes_postgres.py)
**Test Suite**: [docs/test_kanban_postgres.py](test_kanban_postgres.py)
**Migration Script**: [docs/migrate_todo_to_postgres.py](migrate_todo_to_postgres.py)
**Updated Rules**: [agents.md § TODO Management System Rules](../agents.md#todo-management-system-rules)
**agents.md**: Added comprehensive TODO Management System Rules section with kanban board management, data structure, startup workflow, error processing, completion criteria, filtering system, and future web interface specifications
**TODO.md**: Completely restructured with proper kanban board format, metadata JSON structure, timestamps, epics, and filtering capabilities
**Log Tracking**: Created `/tmp/last_log_check.txt` for tracking log parsing timestamps
**Metadata Schema**: Implemented JSON metadata for each TODO item including:
`created_at`: ISO 8601 timestamp for item creation
`priority`: high/medium/low classification
`assigned_to`: user/agent assignment
`epic`: System or subsystem categorization
`occurrence_count`: Tracking for recurring issues
**Epic Organization**: 8 epics defined (Cigar Management System, Tobacco Management System, Hosting Management System, Infrastructure, Documentation, Testing, Integration, Development Environment)
**Log Parsing**: Automated parsing of log files for errors/failures/404/500/auth errors
**Duplicate Detection**: Checks existing TODO items before creating new error entries
**Occurrence Tracking**: Increments count for recurring issues
**Startup Workflow**: Defined 6-step process for every conversation (read agents.md, parse logs, create issues, work on To Do by priority)
**Backup**: Original TODO.md backed up to TODO.md.backup
**Data Migration**: All existing items preserved with proper metadata and timestamps
**Rule Enforcement**: No duplicate items between columns, proper item movement (not copying)
✅ agents.md rules updated and documented
✅ TODO.md structure implemented with metadata
✅ Log parsing system tested with actual log files
✅ Error detection and TODO creation verified
✅ Timestamp management implemented
✅ Epic categorization system established
✅ Filter framework in place for future web interface
Web interface for drag-and-drop not yet implemented (planned future feature)
Log parsing currently manual - automation to be added
No API endpoints yet for programmatic TODO management
Implement web-based kanban board with drag-and-drop functionality
Add automated log parsing with scheduled execution
Create API endpoints for TODO CRUD operations
Implement priority lanes within each column
Add subtask relationships and epic management
**Cigar Management System**: Created Rails 8.1.0 app with "Hello Cigar World" landing page
**Tobacco Management System**: Created Rails 8.1.0 app with "Hello Tobacco World" landing page
Both apps configured with PostgreSQL database and Ruby 3.4.7
Repository structure established for both apps under `/Users/bpauley/Projects/mangement-systems/`
Git repositories initialized and committed with initial Rails setup
Basic routing configured: `root "home#index"` for both applications
Health check endpoint available at `/up` for both apps
Home controller created with index action for both apps
Rails apps scaffolded with standard directory structure
Bootstrap and modern Rails stack (Turbo, Stimulus, Importmap) included
Docker configuration added via Kamal
Development environment ready for local testing
Both apps start successfully in development mode
Routes respond correctly with custom "Hello World" messages
Git repositories properly initialized with 99 files each
Updated `agents.md` with detailed domain models for both Cigar and Tobacco systems
Added comprehensive JSON API format specifications
TODO.md updated with granular task breakdown (29 total tasks)
Ruby environment resolved using mise (Ruby 3.4.7, Rails 8.1.0)
Proper shell configuration (zsh with .zshrc profile)
Both apps committed to Git and ready for deployment
Implement production deployment with Unicorn + Nginx
Add database migrations and service management capabilities
Scaffolded Flask dashboard with Bootstrap 5 and Bootstrap Icons
Added routes: `GET /` (dashboard), `GET /health`, `POST /actions/run` (invoke manager actions),
Admin endpoints for local control: `POST /_admin/shutdown`, `POST /_admin/restart`
Configured file logging to `hosting-management-system/logs/web_app.log`
Per-request logging via `after_request` hook
Added uvicorn logging config at `hosting-management-system/uvicorn_logging.ini` to split app vs access logs (`web_app.log`, `web_access.log`)
Repositories management: list/add/delete repos
Backups panel: list backups, restore and delete actions; backup actions record entries in datastore
Read-only `TODO.md` panel rendered on dashboard
Extended `DataStore` to track `repos` and `backups` in addition to `hosts` and `activity`
Added CRUD helpers: `add_repo/delete_repo`, `add_backup/delete_backup`, `list_backups`
Updated `hosting-management-system/requirements.txt` to include `Flask`, `fabric`, `click`, `requests`, `pytest`
Added `hosting-management-system/tests/test_app_health.py` to validate the `/health` endpoint
`scripts/check_ruby_env.sh` verifies local Ruby (>= 3.3) and Rails (>= 7.2) versions
`hosting-management-system/README.md` now uses `pip install -r requirements.txt` and documents scripts and testing
Added Table of Contents, Local vs Remote sections, troubleshooting guide
JWT authentication configuration with refresh tokens and rate limiting
Link to `PRODUCTION_DEPLOYMENT.md` for production setup
`agents.md` adds Rule 12 (dependency hygiene) and near-term requirements that mirror `TODO.md`
Added `Runtime & Service Management` section to `agents.md` (FastAPI+uvicorn, systemd unit, local manager CLI, logs, maintenance flag)
Added module/function docstrings to `hosting-management-system/scripts/manage.py`, endpoint docstrings to `app_fastapi.py`, and function docstrings to `scripts/smoke_test_fresh_host.py`
New: `PRODUCTION_DEPLOYMENT.md` - Complete production deployment guide with JWT, HTTPS, monitoring, troubleshooting, and security checklist
Introduced FastAPI app alongside Flask:
`app_fastapi.py` with `GET /health` and read-only landing (`/`) rendering `api_landing.html`
Dev run: `uvicorn app_fastapi:app --host 0.0.0.0 --port 5051 --reload` or via `scripts/manage.py restart`
Systemd template: `templates/hms-api.service.tpl` (uvicorn service) with start/stop/status instructions in README
ExecStart now points to project venv: `$project_dir/.venv/bin/uvicorn ...` to avoid PATH issues
Requirements updated to include `fastapi==0.111.0`, `uvicorn[standard]==0.30.1`, `python-multipart`, `httpx`, `python-jose[cryptography]`, `passlib[bcrypt]`
Tests: `tests/test_fastapi_health.py`, `tests/test_fastapi_subsystems.py`, `tests/test_fastapi_dashboard.py`, `tests/test_fastapi_auth.py`
Phase 2 (complete): Added FastAPI dashboard with CRUD/action routes
Endpoints: `GET /dashboard`, `POST /hosts`, `POST /hosts/{slug}/update|delete`, `POST /repos`, `POST /repos/{name}/update|delete`, `POST /backups/{id}/restore|delete`, `POST /actions/run`
Templates: `web/templates/api_dashboard.html`, layout updated for both Flask/FastAPI flashes
Full parity with Flask dashboard
Phase 3 (complete): JWT authentication
`POST /auth/login` endpoint (form: username/password, returns JWT)
All POST endpoints (hosts, repos, backups, actions) protected with JWT via `Depends(get_current_user)`
Configuration via env: `HMS_JWT_SECRET`, `HMS_ADMIN_USER`, `HMS_ADMIN_PASSWORD`
Defaults: user=admin, password=admin, secret=dev-secret-change-in-production
24-hour token expiration
Test coverage: `tests/test_fastapi_auth.py`
Phase 4 (complete): Flask deprecation
Added deprecation notice to `app.py` module docstring
README updated to recommend FastAPI as the primary service
Flask remains available for backward compatibility but new features will only target FastAPI
Migration complete: FastAPI now provides full parity + authentication
JWT Enhancements (production-ready):
Refresh tokens: 15-minute access tokens + 7-day refresh tokens (configurable via env)
Rate limiting: login endpoint limited to 5 requests/minute via slowapi
Role-based auth: JWT payload includes `role` field (admin role for admin user)
Token type validation: access vs refresh tokens explicitly checked
New endpoint: `POST /auth/refresh` to exchange refresh token for new access token
Configuration: `HMS_JWT_ACCESS_EXPIRATION_MINUTES`, `HMS_JWT_REFRESH_EXPIRATION_DAYS`
Password handling: Support for pre-hashed passwords via `HMS_ADMIN_PASSWORD_HASH` or plain via `HMS_ADMIN_PASSWORD`
Lazy password hashing: Avoids import-time bcrypt issues, auto-truncates to 72 bytes
Dependencies added: `slowapi` for rate limiting
Updated tests: refresh token flow, rate limiting, token type validation
**Pytest Fixtures** (`tests/conftest.py`):
`qa_datastore`: Isolated temporary DataStore for testing
`qa_host_data`, `qa_repo_data`, `qa_backup_data`: Factory fixtures with qa- prefix
`qa_populated_store`: Pre-populated DataStore with 2 hosts, 2 repos, activity logs
`qa_config_file`: Temporary config.json with qa- values
`qa_temp_backup_dir`: Temporary backup directory
**CLI Action Tests** (`tests/test_cli_actions.py`):
Host management: add, update, delete, list (8 tests)
Repository management: add, update, delete, list (8 tests)
Backup management: add, list, delete (3 tests)
Activity logging: record, list, timestamps (3 tests)
Data isolation verification (2 tests)
Total: 24 comprehensive tests with qa- prefixed data
**QA Data Factories** (`tests/qa_factories.py`):
`QAFactory` class with methods: host(), repo(), backup(), activity(), config()
Batch generation: batch_hosts(), batch_repos(), batch_backups()
Sequential ID generation for unique qa- prefixed names
Convenience functions: qa_host(), qa_repo(), qa_backup(), qa_activity(), qa_config()
**QA Cleanup Script** (`scripts/qa_cleanup.py`):
Remove all qa- prefixed hosts, repos, backups
Clean qa_ activity logs (reports count)
Delete temporary qa-* files and directories
Dry-run mode for safe preview
Summary statistics with confirmation prompt
Usage: `python scripts/qa_cleanup.py [--dry-run] [--force]`
**qa-test-repo** (Rails deployment test app):
Hosting Management System: Implement Nginx config backup/restore functionality. Create timestamped backups before any config change in /opt/backups/nginx/. Add restore capability with backup listing UI. Test backup creation, listing, and restore procedures.
Hosting Management System: Create troubleshooting scripts in remote_cli_tools/ directory including parse_logs.sh, check_status.sh, check_disk_space.sh, and db_connection_test.sh. Install to /usr/local/bin/ during provisioning. Document each script's purpose and parameters.
Hosting Management System: Implement script runner service in web/services/script_runner.py. Add methods to list available scripts, validate script names, execute with parameters, and stream output. Include timeout handling and process cleanup.
Hosting Management System: Create scripts UI at /scripts route displaying all available troubleshooting scripts. Add parameter input forms, execute button, and real-time output display using WebSocket or SSE. Show script execution history and results.
Hosting Management System: Add API endpoint POST /api/scripts/{script}/run for executing scripts with parameters. Validate script names against allowlist, sanitize parameters to prevent command injection. Stream output and return exit code. Test with various scripts and parameters.
Hosting Management System: Write pytest tests for script execution covering script listing, validation, execution, output streaming, error handling, and security (command injection attempts). Achieve 100% coverage for script_runner.py.
Cigar Management System: Customize Devise views (login, registration, password reset) with Bootstrap 5 styling matching the application theme. Add logo and branding. Ensure responsive design. Verify views render correctly and forms submit properly.
Cigar Management System: Add tesseract-ocr package to system dependencies and tesseract-ffi gem to Gemfile. Configure Tesseract paths and language data. Create OCR service class in app/services/ocr_service.rb for processing cigar band images.
Cigar Management System: Implement cigar band image upload with ActiveStorage. Add image field to Cigar model, configure storage (local for dev, S3 for production). Add image preview in CRUD forms. Verify image upload, display, and deletion work correctly.
Cigar Management System: Write RSpec tests for OCR integration including image upload, text extraction, field population, error handling. Mock Tesseract calls. Achieve 100% coverage for OCR service.
Cigar Management System: Add inventory tracking with quantity, purchase_date, purchase_price fields. Implement inventory reports showing cigars by humidor, low stock alerts. Create dashboard with inventory statistics and charts.
Tobacco Management System: Customize Devise views (login, registration, password reset) with Bootstrap 5 styling matching the application theme. Add logo and branding. Ensure responsive design. Verify views render correctly and forms submit properly.
Tobacco Management System: Add inventory tracking with quantity, storage_location, purchase_date, expiry_date fields. Implement low stock alerts and expiry warnings. Create inventory reports and dashboard with statistics.
Infrastructure: Verify Let's Encrypt auto-renewal timer is enabled and working. Run certbot renew --dry-run to test. Confirm Nginx reload happens automatically after renewal. Document renewal process and troubleshooting in SSL_SETUP.md.
Infrastructure: Install troubleshooting CLI tools to /usr/local/bin/ during server provisioning. Include parse_logs.sh, check_status.sh, restart_service.sh, check_disk_space.sh. Document each tool's purpose and usage in ops guide.
Testing System: Create QA test fixtures with qa- prefix for all Rails apps. Add cleanup rake tasks to remove QA data after test runs. Document QA fixture usage in testing guide. Verify fixtures can be created and cleaned up successfully.
Testing System: Add git pre-push hooks to enforce testing requirements. Hook should run all tests before allowing push. Add bypass option for emergencies. Document pre-push hook setup in development guide.
Documentation: Create AUTHENTICATION_GUIDE.md consolidating auth patterns from HEADER_AND_AUTH_FIXES.md and agents.md. Include JWT implementation, cookie-based web auth, Bearer token API auth, and password hashing. Cross-reference from agents.md.
Documentation: Consolidate kanban_implementation_guide.md and kanban_ux_design.md into single comprehensive Kanban reference. Include overview, database schema, API endpoints, UI components, styling, drag-and-drop, and tag management sections.
Hosting Management System: Implement Nginx config backup/restore functionality. Create timestamped backups before any config change in /opt/backups/nginx/. Add restore capability with backup listing UI. Test backup creation, listing, and restore procedures.
Hosting Management System: Create troubleshooting scripts in remote_cli_tools/ directory including parse_logs.sh, check_status.sh, check_disk_space.sh, and db_connection_test.sh. Install to /usr/local/bin/ during provisioning. Document each script's purpose and parameters.
Hosting Management System: Implement script runner service in web/services/script_runner.py. Add methods to list available scripts, validate script names, execute with parameters, and stream output. Include timeout handling and process cleanup.
Hosting Management System: Create scripts UI at /scripts route displaying all available troubleshooting scripts. Add parameter input forms, execute button, and real-time output display using WebSocket or SSE. Show script execution history and results.
Hosting Management System: Add API endpoint POST /api/scripts/{script}/run for executing scripts with parameters. Validate script names against allowlist, sanitize parameters to prevent command injection. Stream output and return exit code. Test with various scripts and parameters.
Hosting Management System: Write pytest tests for script execution covering script listing, validation, execution, output streaming, error handling, and security (command injection attempts). Achieve 100% coverage for script_runner.py.
Cigar Management System: Customize Devise views (login, registration, password reset) with Bootstrap 5 styling matching the application theme. Add logo and branding. Ensure responsive design. Verify views render correctly and forms submit properly.
Cigar Management System: Add tesseract-ocr package to system dependencies and tesseract-ffi gem to Gemfile. Configure Tesseract paths and language data. Create OCR service class in app/services/ocr_service.rb for processing cigar band images.
Cigar Management System: Implement cigar band image upload with ActiveStorage. Add image field to Cigar model, configure storage (local for dev, S3 for production). Add image preview in CRUD forms. Verify image upload, display, and deletion work correctly.
Cigar Management System: Write RSpec tests for OCR integration including image upload, text extraction, field population, error handling. Mock Tesseract calls. Achieve 100% coverage for OCR service.
Cigar Management System: Add inventory tracking with quantity, purchase_date, purchase_price fields. Implement inventory reports showing cigars by humidor, low stock alerts. Create dashboard with inventory statistics and charts.
Tobacco Management System: Customize Devise views (login, registration, password reset) with Bootstrap 5 styling matching the application theme. Add logo and branding. Ensure responsive design. Verify views render correctly and forms submit properly.
Tobacco Management System: Add inventory tracking with quantity, storage_location, purchase_date, expiry_date fields. Implement low stock alerts and expiry warnings. Create inventory reports and dashboard with statistics.
Infrastructure: Verify Let's Encrypt auto-renewal timer is enabled and working. Run certbot renew --dry-run to test. Confirm Nginx reload happens automatically after renewal. Document renewal process and troubleshooting in SSL_SETUP.md.
Infrastructure: Install troubleshooting CLI tools to /usr/local/bin/ during server provisioning. Include parse_logs.sh, check_status.sh, restart_service.sh, check_disk_space.sh. Document each tool's purpose and usage in ops guide.
Testing System: Create QA test fixtures with qa- prefix for all Rails apps. Add cleanup rake tasks to remove QA data after test runs. Document QA fixture usage in testing guide. Verify fixtures can be created and cleaned up successfully.
Testing System: Add git pre-push hooks to enforce testing requirements. Hook should run all tests before allowing push. Add bypass option for emergencies. Document pre-push hook setup in development guide.
Documentation: Create AUTHENTICATION_GUIDE.md consolidating auth patterns from HEADER_AND_AUTH_FIXES.md and agents.md. Include JWT implementation, cookie-based web auth, Bearer token API auth, and password hashing. Cross-reference from agents.md.
Documentation: Consolidate kanban_implementation_guide.md and kanban_ux_design.md into single comprehensive Kanban reference. Include overview, database schema, API endpoints, UI components, styling, drag-and-drop, and tag management sections.
Create whiskey dashboard views (home page with summary cards)
Update local_rails_manager.py to include whiskey-management-system
Phase 4.5 (Optional): Add SSH tunnel support to db_config.py for remote execution mode
[ ] Add pre-push hooks (optional)
Hosting Management System: Implement self-update functionality allowing hosting system to update itself via web UI. Add git pull, pip install, and graceful restart with zero-downtime deployment. Test update process and rollback capability.
Hosting Management System: Create deployment UI at /deploy route showing deployment history, current version, and update button. Add rollback capability to previous version. Display deployment logs in real-time during update process.
Hosting Management System: Add API endpoint POST /api/hosting/deploy for triggering self-updates. Implement graceful restart that completes current requests before reloading. Test from both web UI and local CLI (manager.py update-hosting-api).
Hosting Management System: Document self-update procedures in HOSTING_DEPLOYMENT_GUIDE.md including web UI method, API method, and emergency SSH method. Add troubleshooting section for failed updates.
Hosting Management System: Write pytest tests for self-update functionality covering update process, rollback, version tracking, and error recovery. Test graceful restart behavior.
Cigar Management System: Integrate OCR service with cigar image uploads. Extract text from uploaded cigar band images, parse brand/name, and auto-populate form fields. Add manual override option. Test OCR accuracy with sample cigar band images.
Tobacco Management System: Implement product image gallery using ActiveStorage. Allow multiple images per product. Add image upload, preview, and deletion in CRUD forms. Configure storage (local for dev, S3 for production). Verify image operations work correctly.
Testing System: Write integration tests for full deployment workflows (provision → deploy → start → stop). Use qa-test-repo as canonical test target. Mock SSH operations where appropriate. Test rebuild from pristine Ubuntu host.
Documentation: Create HTML_STYLE_GUIDE.md with Bootstrap 5 conventions, header/navigation patterns, form styling, color schemes, and responsive design patterns. Extract relevant content from HEADER_AND_AUTH_FIXES.md and kanban_ux_design.md.
Documentation: Create /docs/need_review folder and move historical issue resolution documents (ADMIN_LOGIN_FIX_SUMMARY.md, FIXES_COMPLETE_SUMMARY.md, etc.) to keep docs/ folder organized. Update any broken links in agents.md.
Integration: Research and document OAuth/SSO integration strategy for unified authentication across Cigar, Tobacco, and Hosting systems. Evaluate OAuth providers and implementation approach. Create integration plan document.
Hosting Management System: Implement self-update functionality allowing hosting system to update itself via web UI. Add git pull, pip install, and graceful restart with zero-downtime deployment. Test update process and rollback capability.
Hosting Management System: Create deployment UI at /deploy route showing deployment history, current version, and update button. Add rollback capability to previous version. Display deployment logs in real-time during update process.
Hosting Management System: Add API endpoint POST /api/hosting/deploy for triggering self-updates. Implement graceful restart that completes current requests before reloading. Test from both web UI and local CLI (manager.py update-hosting-api).
Hosting Management System: Document self-update procedures in HOSTING_DEPLOYMENT_GUIDE.md including web UI method, API method, and emergency SSH method. Add troubleshooting section for failed updates.
Hosting Management System: Write pytest tests for self-update functionality covering update process, rollback, version tracking, and error recovery. Test graceful restart behavior.
Cigar Management System: Integrate OCR service with cigar image uploads. Extract text from uploaded cigar band images, parse brand/name, and auto-populate form fields. Add manual override option. Test OCR accuracy with sample cigar band images.
Tobacco Management System: Implement product image gallery using ActiveStorage. Allow multiple images per product. Add image upload, preview, and deletion in CRUD forms. Configure storage (local for dev, S3 for production). Verify image operations work correctly.
Testing System: Write integration tests for full deployment workflows (provision → deploy → start → stop). Use qa-test-repo as canonical test target. Mock SSH operations where appropriate. Test rebuild from pristine Ubuntu host.
Documentation: Create HTML_STYLE_GUIDE.md with Bootstrap 5 conventions, header/navigation patterns, form styling, color schemes, and responsive design patterns. Extract relevant content from HEADER_AND_AUTH_FIXES.md and kanban_ux_design.md.
Documentation: Create /docs/need_review folder and move historical issue resolution documents (ADMIN_LOGIN_FIX_SUMMARY.md, FIXES_COMPLETE_SUMMARY.md, etc.) to keep docs/ folder organized. Update any broken links in agents.md.
Integration: Research and document OAuth/SSO integration strategy for unified authentication across Cigar, Tobacco, and Hosting systems. Evaluate OAuth providers and implementation approach. Create integration plan document.
Add users table to hosting_production PostgreSQL database and migrate authentication (READY FOR SERVER EXECUTION - model & migration script complete, needs to be run on server)
Edit the kanban board so we have a page to add/edit/update/delete Epics. Right now Epics are assigned by doing: Epic Name: Text in the task. We should use the following epics: Testing System Documentation Architecture Tobacco Management System Cigar Management System Hosting Management System ---- Those are the ones that I can see, Lets start with those. We already do have an epic column in the kanban_tasks table. Lets use proper relational database practices to link the fields correctly. We need to do that with tags as well.
Cigar Management System: Write RSpec tests for OCR functionality including image processing and fuzzy matching
QA Test Repo: Write RSpec request specs covering routing and integration tests
QA Test Repo: Write RSpec controller tests for all CRUD operations with authentication
QA Test Repo: Write comprehensive RSpec tests for all models covering validations and associations
Tobacco Management System: Copy Bootstrap layouts from cigar app for consistent styling across apps
Cigar Management System: Create OCR UI for uploading cigar band images and selecting humidor for add/remove
Cigar Management System: Implement OCR scan controller with routes for /scan/add and /scan/remove operations
QA Test Repo: Add comprehensive models matching cigar app structure (Location, Storage, Items with relationships)
Set up PostgreSQL database for kanban system
Create database migration scripts
Remove To Do column from Kanban board templates - Keep only Backlog, In Progress, Completed columns. Then redeploy hosting app.
Location Maps Integration - Add embedded maps to location show pages using free service (OpenStreetMap/Mapbox). Both cigar and tobacco apps.
Fix card header h5 color to white in both cigar and tobacco apps (hard to read current color). Then redeploy both apps.
Tobacco Add/Remove Quantity Functionality - Implement add/remove quantity actions for storage_tobaccos, similar to humidor cigars add/remove in cigar app
Hosting Management System: update .secrets.json with hosting_management credentials and hosting SSL config.
Fix cigar app image upload issue - Install libvips library locally to resolve LoadError with ruby-vips gem for ActiveStorage image processing
Cigar Management System: Add Tesseract OCR integration with fuzzy string matching for cigar brand recognition
Hosting Management System: create DEPLOYMENT_LOG.md skeleton with sections and verification checklist.
Hosting Management System: create remote_cli_tools/ directory.
Hosting Management System: add remote_cli_tools/check_status.sh.
Tobacco Management System: Match navigation, headers, and forms to cigar app design patterns
Hosting Management System: add remote_cli_tools/parse_logs.sh.
Hosting Management System: add remote_cli_tools/restart_service.sh.
Hosting Management System: update manager.py to install remote_cli_tools during provision_server().
Hosting Management System: add CLI command check-status to invoke remote script.
Documentation sweep: ensure every folder in every repo includes README + Mermaid diagram per Rule 2.
Infrastructure: Add npm installation to provision_server() for one-click Rails 7.2 deployment.
Backup/restore workflows: cron-based pg_dump + rsync plus documented restore steps for all systems.
Infrastructure: Remove all hardcoded passwords from manager.py and load from .secrets.json.
Infrastructure: Create comprehensive SECURITY.md documentation.
Infrastructure: Fix Rails 7.2 deployment issues.
Cigar Management System: Update deployment script in manager.py to support Puma server instead of Unicorn.
Implement comprehensive TODO management system with proper data structure, timestamps, epics, and filtering capabilities.
Phase 2 – Let's Encrypt issuance/renewal for hosting/cigars/tobacco using certbot, auto-renew cron, Nginx reload, and integration of SSL paths.
Cigar Management System: setup Rails app with basic "Hello World" page at cigar.remoteds.us.
Cigar Management System: implement Location model with name, address, city, state, zip, country fields.
Tobacco Management System: implement TobaccoStorage model with name, location, image fields.
Cigar Management System: implement Brand model with name, website_url fields.
Cigar Management System: implement Cigar model with cigar_name, brand_id, rating, cigar_image fields.
Tobacco Management System: implement Tobacco model with tobacco_name, type, tobacco_storage_id, qty_weight, tobacco_image fields.
Tobacco Management System: create CRUD controllers for TobaccoStorage and Tobacco.
Cigar Management System: implement Humidor model with name, location_id, max_qty, image fields.
Cigar Management System: implement HumidorCigar join model for quantity tracking.
Tobacco Management System: implement weight-based quantity management logic.
Cigar Management System: create CRUD controllers for Locations, Brands, Cigars, Humidors.
Tobacco Management System: build Bootstrap UI with forms for all CRUD operations.
Cigar Management System: Test one-click deployment with new secrets management system.
Cigar Management System: implement quantity management logic.
Cigar Management System: implement capacity management and validation.
Cigar Management System: build Bootstrap UI with forms for all CRUD operations.
Cigar Management System: configure domain DNS and SSL for cigar.remoteds.us.
Tobacco Management System: setup Rails app with basic "Hello World" page at tobacco.remoteds.us.
Tobacco Management System: configure domain DNS and SSL for tobacco.remoteds.us.
Shared deployment automation: Unicorn + Nginx + HTTPS for both Rails apps.
Hosting Management System: implement secure database passwords with mixed case, numbers, and special characters using cryptographically generated passwords stored in secure files.
Hosting Management System: restore Rails 8.1 solid suite databases with proper naming and secure passwords.
FastAPI Migration: Phase 1 – Introduce FastAPI app alongside Flask.
FastAPI Migration: Phase 2 – Migrate dashboard forms/actions to FastAPI, wire DataStore/HostingManager, reach parity with Flask.
FastAPI Migration: Phase 3 – Add JWT auth, env-configured secret; add tests and docs.
JWT Production Enhancements – Add refresh tokens, rate limiting, roles, and production deployment guide.
Hosting Management System: implement Flask dashboard + JSON datastore CRUD for hosts/repos/backups.
Hosting Management System: build Bootstrap UI covering remote hosts, repos, domains, backups.
Hosting Management System: add Pytest coverage for every CLI action using isolated `qa-` fixtures.
Hosting Management System: implement QA data factories + cleanup script ensuring `qa-*` assets are purged after tests.
qa-test-repo: scaffold vanilla Rails app with single CRUD resource for deployment smoke tests.
qa-test-repo: add RSpec/system tests plus `qa:seed` and `qa:cleanup` rake tasks for prefixed demo data.
Local Dev: install/verify Ruby 3.3+ and Rails 7.2+ toolchain for all QA repos.
Hosting Management System: scaffold Flask app with base UI + JSON datastore.
Hosting Management System: implement ability to stop/start/restart Flask app, provide adequate logging, and implement health checks locally.
Hosting Management System: extend Fabric/Paramiko tasks to include start/stop/restart and backup/restore orchestration on the remote host.
Hosting Management System: automate "fresh host" smoke test that reprovisions Ubuntu 25.04 from scratch.
Hosting Management System: deliver initial CLI with multi-app provisioning/deployment and templated Nginx/Unicorn/systemd stack.
✅ All tests must pass before deployment
✅ Website MUST load locally
**Critical**: All provisioning must be scripted and repeatable
Tobacco Management System: Setup Devise gem for user authentication. Configure Devise with email/password authentication, confirmable, recoverable, and rememberable modules. Create User model with email, encrypted_password, and admin boolean. Verify Devise routes are properly installed.
Infrastructure: Implement automated PostgreSQL backup with pg_dump running via cron every 6 hours. Store backups in /opt/backups/postgresql/ with 7-day rotation. Create backup script in /usr/local/bin/backup_databases.sh. Verify backup files are created and rotated correctly.
Cigar Management System: Modify ApplicationController to require authentication for all routes using before_action :authenticate_user! Add public routes exception list if needed. Verify unauthenticated users are redirected to login. Test with RSpec request specs.
Cigar Management System: Create Humidor model with name, location, capacity, and temperature/humidity fields. Add CRUD views with Bootstrap 5 styling. Implement humidor listing, create, edit, and delete functionality. Verify all CRUD operations work correctly.
Tobacco Management System: Setup Devise gem for user authentication. Configure Devise with email/password authentication, confirmable, recoverable, and rememberable modules. Create User model with email, encrypted_password, and admin boolean. Verify Devise routes are properly installed.
Tobacco Management System: Modify ApplicationController to require authentication for all routes using before_action :authenticate_user! Add public routes exception list if needed. Verify unauthenticated users are redirected to login. Test with RSpec request specs.
HMS admin password location: documented in deployment guide, saved to local .secrets.json, redacted from docs
SSL certificates expired on all virtual hosts; renewed and added daily cron check + web UI
Fix Kanban API 500 error caused by SQLAlchemy 2.0 raw SQL in health check
Fix HMS config/database.py to read DB_USER from systemd environment
Documentation: Document local Rails development setup with start/stop procedures and troubleshooting
Tobacco Management System: Create seed data with Storage locations and sample Products
Cigar Management System: Create seed data with Locations, Humidors, Brands, and sample Cigars
[agent] Hosting Management System: run pytest and capture current failing tests for Phase 1 scope.
Cigar Management System: add user authentication and role-based permissions.
[agent] Hosting Management System: Wire Nginx SSL paths to read from .secrets.json ssl_config when present.
Cigar Management System: add OCR integration for cigar image processing.
[agent] Hosting Management System: Add CLI helpers certbot-install, certbot-issue, certbot-renew.
Cigar Management System: implement secure JSON API endpoint with token-based access.
Cigar Management System: implement admin panel for logo upload and site management.
Cigar Management System: add comprehensive RSpec test coverage.
Tobacco Management System: add user authentication and role-based permissions.
Tobacco Management System: implement secure JSON API endpoint with token-based access.
Tobacco Management System: implement admin panel for logo upload and site management.
Tobacco Management System: add comprehensive RSpec test coverage.
(critical) Infrastructure: Implement local secrets management system for disaster recovery readiness.
Google Sheets import rake task for cigar/tobacco inventories.
Home Assistant integration specs covering `/api/inventory` payloads.
Monitoring/alerting instrumentation.
Hosting Management System: Fix 404 error for /favicon.ico endpoint.
Hosting Management System: run pytest and capture current failing tests for Phase 1 scope.
test
Hosting Management System: design API to manipulate TODO.md cards.
FastAPI Migration: Phase 4 – Deprecate Flask, finalize docs and CHANGELOG.
Code docs: audit and add docstrings for `manager.py`, `app_fastapi.py`, `scripts/manage.py`, and `scripts/smoke_test_fresh_host.py`.
Agents.md: add `Runtime & Service Management` section documenting FastAPI+uvicorn, systemd unit, local manager CLI, logs, and maintenance flag.
Code documentation: add module/function docstrings to `scripts/manage.py` and endpoint docstrings to `app_fastapi.py`.
✅ Full RSpec unit tests MUST pass
Cigar Management System: add data visualization dashboards and analytics.
Tobacco Management System: add tobacco image gallery and management features.
Research New Relic/APM options post-stabilization.
Evaluate OCR accuracy enhancements.
Hosting Management System: document future drag-and-drop kanban UX and persistence model.