Commit Graph

510 Commits

Author SHA1 Message Date
5f9c6aee5a docs: add standalone deployment guide
- Quick start instructions for start_servers.py
- Configuration options and port mapping
- Troubleshooting guide for common issues
- Comparison with Docker deployment
2026-04-22 18:42:06 +03:00
ad6d14b9e5 config: add data/logs directories to shared inventory.env
- DATA_DIR for persistent data storage
- LOGS_DIR for application logs
- LOG_LEVEL for log verbosity (used by standalone launcher)
2026-04-22 18:41:53 +03:00
ec4e11c2e0 feat(6): create python standalone server launcher
- Replaces bash script with robust Python implementation
- Simpler process management using subprocess module
- Better error handling and logging
- Manages venv, dependencies, and both services
- Handles graceful shutdown on Ctrl+C
2026-04-22 18:38:24 +03:00
aef38e871f fix(6): ensure background processes run from correct directories
- Wrap backend uvicorn with proper working directory subshell
- Wrap frontend Next.js server with proper working directory subshell
- Use subshell syntax (cd && run) to ensure processes inherit correct context
- Fixes processes starting but immediately crashing
2026-04-22 18:35:53 +03:00
66464cb148 fix(6): fix process monitoring - keep servers running indefinitely
- Replace wait with infinite monitoring loop
- Detect and warn if processes die instead of killing them
- Allows independent process failures without terminating script
- Trap still catches Ctrl-C to graceful shutdown
2026-04-22 18:34:18 +03:00
7041a6dc88 fix(6): correct venv path in start_server.sh - create in project root
- Virtual environment should be .venv in project root, not parent folder
- Fix venv creation and activation path logic
- Ensures venv is created and found in correct location
2026-04-22 18:30:58 +03:00
a2fd9b1ce6 fix(6): update standalone start_server.sh to use Python virtual environment
- Create .venv automatically if missing
- Activate virtual environment before pip install
- Fixes PEP 668 externally-managed-environment error on Python 3.12
- Virtual environment isolated from system Python packages
2026-04-22 18:29:15 +03:00
fc149184e9 feat(6): phase 6 plan 02 - operational runbook and documentation
- Created OPERATIONAL_RUNBOOK.md: comprehensive step-by-step procedures for both Docker and Standalone deployment modes covering deployment, daily ops, troubleshooting, backup/restore, disaster recovery, scaling, and updates
- Created HEALTH_MONITORING_CHECKLIST.md: daily/weekly/monthly health check procedures with alert thresholds and quick troubleshooting reference
- Created DISASTER_RECOVERY_PLAN.md: detailed procedures for 6 failure scenarios (database corruption, hardware failure, data center failure, app crash, disk full, network isolation) with RTO/RPO targets
- Created CONFIGURATION_REFERENCE.md: complete documentation of all inventory.env parameters for both deployment modes with common scenarios and troubleshooting
- Created EMERGENCY_PROCEDURES.md: quick-reference incident response playbook with 7 critical scenarios, decision tree, escalation path, and printable cheat sheet
- Created scripts/backup.sh: automated backup script supporting both Docker and Standalone with integrity verification and retention management
- Created scripts/restore.sh: restore script with triple confirmation, safety backups, and validation tests for both deployment modes
- Created config/backup-cron.sh: installer for daily/weekly automated backup cron jobs (2 AM daily, 3 AM Sunday)

All documentation covers dual-deployment modes with shared configuration files.
Documentation is operator-ready with copy-paste commands and clear expected outputs.
2026-04-22 18:25:32 +03:00
be3555d7cd docs(phase-6): add dual-deployment requirement - docker and standalone modes
- Both Docker and start_server.sh standalone modes required
- Shared config files between both modes (no duplication)
- Single config source of truth (inventory.env)
- Both modes available for development and production use
2026-04-22 18:21:12 +03:00
4e6f940b75 refactor(phase-6): remove scale testing plan, simplify to docker + runbook
- Delete PLAN-02-SCALE-TESTING.md (scale testing deferred to v3)
- Rename PLAN-03-BACKUP-RUNBOOK to PLAN-02-OPERATIONAL-RUNBOOK
- Phase 6 now has 2 executable plans instead of 3
2026-04-22 18:18:00 +03:00
4ea9625928 docs(phase-6): revise context - single-instance deployment, Docker only, no scale testing
- Lock decision: Single-instance Docker deployment (not multi-site)
- Remove scale testing from Phase 6 scope (defer to v3)
- Simplify to 2 plans: Docker deployment + operational runbook
- Update success criteria to focus on reliability, not performance testing
2026-04-22 18:17:45 +03:00
4b7621fcd1 feat(6): phase 6 planning complete - deployment, scale testing, backup/restore
Phase 6 comprehensive plans ready for execution:

Plan 1: Docker Containerization & Deployment Automation (6 tasks)
- Enhance backend/frontend Dockerfiles with health checks
- Create deploy.sh for single-command deployment
- Environment automation and validation
- Quick start guide and troubleshooting docs

Plan 2: Scale Testing & Performance Optimization (6 tasks)
- Locust-based load testing framework (5 concurrent users)
- Database seeding (10K items with realistic data)
- Metrics collection (CPU, memory, response times)
- Performance baseline establishment and SLO documentation
- Health check monitoring automation
- Load test execution guide

Plan 3: Backup/Restore & Operational Runbook (7 tasks)
- Automated backup script (daily/weekly with retention)
- Restore validation and disaster recovery procedures
- Cron job configuration for scheduled backups
- Comprehensive operational runbook (deployment, scaling, troubleshooting)
- Health monitoring checklist (daily/weekly/monthly)
- Disaster recovery plan (3+ scenarios, <10min RTO)
- Operations documentation index and integration guide

Context document summarizes:
- Phase goal: Production-ready multi-site deployment
- Key decisions: Docker strategy, automation scope, scale limits
- Upstream dependencies: Phase 5 complete
- Success criteria: Single-command deploy, 10K items + 5 users <2s latency
- Backup strategy: Daily incremental, weekly full (30/90 day retention)

All plans include:
- Detailed task breakdowns (5-7 per plan)
- Acceptance criteria and testing procedures
- Dependencies and blockers
- Effort estimates and risk assessment
- Success metrics and monitoring guidance

Ready for execution phase (estimated 4-5 weeks total).
2026-04-22 18:13:35 +03:00
d0c0f8a84c docs(phase-5): verification review - all blocking issues resolved, ready to merge 2026-04-22 18:09:18 +03:00
43094c42d1 docs(phase-5): code review fixes complete - auth headers and validation 2026-04-22 18:05:24 +03:00
4ead83cfad fix(5): validate part_number is non-empty before transformation 2026-04-22 18:04:54 +03:00
0c0c519274 fix(5): add authorization headers to search API calls 2026-04-22 18:04:47 +03:00
7bb92d3bd9 fix(5): add authorization headers to export API calls 2026-04-22 18:04:36 +03:00
62475ae0af docs(phase-5): code review complete 2026-04-22 18:02:33 +03:00
61382d3f13 docs(phase-5): update tracking after wave 1 execution complete
- Mark Phase 5 complete in ROADMAP
- Update scope: Quick Quantity Adjustment replaces Batch Operations
- All 3 plans delivered: 18 tasks, 23+ test cases
- Update STATE.md with execution summary and next steps
2026-04-22 17:49:37 +03:00
a68d1bd23d docs(5-plan-02): add summary - all 6 tasks completed, full test coverage 2026-04-22 17:44:55 +03:00
96befa3571 test(5-plan-02-t6): add comprehensive frontend tests for search functionality and hooks 2026-04-22 17:44:13 +03:00
b28eb49fe7 feat(5-plan-02-t3,t4): create useItemSearch hook and integrate search button into inventory page 2026-04-22 17:44:11 +03:00
0138f04f6e feat(5-plan-02-t2,t5): create SearchModal and QuantityAdjustmentModal components for inventory search 2026-04-22 17:44:03 +03:00
42fb8a1d63 feat(5-plan-02-t1,t6): add backend search endpoint with comprehensive test coverage 2026-04-22 17:44:00 +03:00
fd13f63c28 test(5-03-07): add comprehensive export tests for CSV/Excel generation and endpoint authorization 2026-04-22 17:43:23 +03:00
798cf4bfd5 feat(5-03-06): add openpyxl to backend dependencies for Excel export support 2026-04-22 17:43:21 +03:00
a9a64b8d0c feat(5-03-05): integrate ExportPanel into admin dashboard 2026-04-22 17:43:18 +03:00
767a7657b1 feat(5-03-04): create useExport hook for managing export API calls and file downloads 2026-04-22 17:43:16 +03:00
274e6f58e5 feat(5-03-03): create admin ExportPanel UI component with CSV and Excel buttons for both reports 2026-04-22 17:43:12 +03:00
b6eb284568 feat(5-03-02): create admin export endpoints for inventory snapshot and audit trail with authorization 2026-04-22 17:43:09 +03:00
9fc3de4798 feat(5-03-01): create export service with CSV and Excel generation for inventory and audit trails 2026-04-22 17:43:05 +03:00
7f3ed6c666 docs(5.1): complete Phase 5 Plan 01 execution summary and session handover
- Created 5-PLAN-01-SUMMARY.md with full implementation report
- Updated SESSION_STATE.md with Session 38 completion details
- Phase 5 Plan 01 status: COMPLETED (5/5 tasks, all tests written)
- Ready for inventory page integration and Phase 5 Plan 02 execution
2026-04-22 17:43:02 +03:00
a7746a14ea test(5.1): add integration and unit tests for quick quantity adjustment
- Vitest hook tests for useQuantityAdjustment (optimistic updates, debouncing)
- Pytest backend tests for PATCH /items/{itemId} endpoint
- Tests cover success, failure, validation, and audit logging scenarios
2026-04-22 17:42:08 +03:00
9fd20fff7c feat(5.1): implement quantity display component and adjustment hook
- Create QuantityDisplay component with tap-to-edit UI + +/- buttons
- Implement useQuantityAdjustment hook with optimistic updates, debouncing
- Add PATCH /items/{itemId} backend endpoint with audit logging
- Components support inline quantity adjustment without modal friction
2026-04-22 17:42:04 +03:00
d7dcd051fe docs(session): Phase 5 planning complete - 3 plans ready for execution 2026-04-22 17:36:48 +03:00
ae3ca2cbee feat(5): phase 5 planning complete - 3 plans, 18 tasks covering quick adjust, search, exports 2026-04-22 17:36:36 +03:00
bc890faa5d docs(session): Phase 4.1 verification complete, Phase 5 discussion/context complete 2026-04-22 17:33:51 +03:00
6471f6c86f docs(5): phase 5 context finalized - quick quantity adjust, search, exports locked 2026-04-22 17:33:44 +03:00
68d2ab9abd docs(session): Phase 4.1 complete - all 3 waves executed, verification pass, ready for Phase 5 2026-04-22 17:03:01 +03:00
965c7631b2 docs(4.1): phase 4.1 UAT complete - all 14 tests pass, ready for next phase 2026-04-22 17:02:36 +03:00
b0d93e8be8 docs(4.1): wave 3 execution complete - frontend components for search integration 2026-04-22 16:47:24 +03:00
2647f0428c feat(4.1-05-07): create frontend components for spare-parts search integration - useItemSearch hook, LoadingModal, ErrorModal with tests 2026-04-22 16:46:50 +03:00
54813067e2 docs(session): record phase 4.1 execution progress - waves 1-2 complete, wave 3 ready 2026-04-22 16:45:34 +03:00
42efe54265 docs(4.1): wave 2 execution complete - web scraping and spec extraction backend services 2026-04-22 16:38:21 +03:00
8dca073c50 feat(4.1-03,4.1-04): implement search orchestrator and integration tests 2026-04-22 16:37:38 +03:00
6e5642ff06 feat(4.1-02): implement web scraper and spec extractor services for spare-parts search 2026-04-22 16:37:01 +03:00
5ba488ea5e docs(4.1): wave 1 execution complete - spare-parts classification foundation 2026-04-22 16:36:11 +03:00
f20c60169a test(4.1-04): create comprehensive unit tests for spare-parts classification module 2026-04-22 16:35:41 +03:00
5fa1244004 feat(4.1-02,4.1-03): add spare-parts classification guide to AI extraction prompt for Gemini and Claude 2026-04-22 16:34:48 +03:00
2ecaa6b2e8 feat(4.1-01): create spare-parts classification whitelist module with fuzzy matching 2026-04-22 16:34:10 +03:00