Compare commits

...

6 Commits

12 changed files with 86 additions and 70 deletions

View File

@@ -1,3 +1,3 @@
834000 5397
834001 5398
834015 5414

View File

@@ -5,6 +5,7 @@
local_certs local_certs
skip_install_trust skip_install_trust
auto_https disable_redirects auto_https disable_redirects
on_demand_tls { on_demand_tls {
ask http://localhost:8916/ ask http://localhost:8916/
} }
@@ -17,7 +18,15 @@ https://:8919 {
} }
# Next.js HMR Support (WebSocket) # Next.js HMR Support (WebSocket)
header_up X-Forwarded-For {remote_host} handle /_next/webpack-hmr {
reverse_proxy http://localhost:8917 {
header_up Upgrade {>Upgrade}
header_up Connection {>Connection}
}
}
reverse_proxy http://localhost:8917 {
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto https header_up X-Forwarded-Proto https
header_up X-Forwarded-Host {host} header_up X-Forwarded-Host {host}
} }
@@ -37,7 +46,7 @@ https://:8918 {
} }
reverse_proxy http://localhost:8916 { reverse_proxy http://localhost:8916 {
header_up X-Forwarded-For {remote_host} header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto https header_up X-Forwarded-Proto https
header_up X-Forwarded-Host {host} header_up X-Forwarded-Host {host}
} }

View File

@@ -28,9 +28,10 @@ A unified system for inventory management featuring web administration, offline
### 2.3 Operations & Tooling ### 2.3 Operations & Tooling
- **PWA**: `next-pwa` (Service Workers + Manifest) - **PWA**: `next-pwa` (Service Workers + Manifest)
- **HTTPS Proxy**: Caddy (Port 8909) - **HTTPS Proxy**: Caddy (Ports 8918/8919)
- **Containerization**: Docker & Docker Compose - **Containerization**: Docker & Docker Compose
- **Deployment**: `deploy.sh` (Docker) or `start_server.sh` (Standalone) - **Deployment**: `deploy.py` (Docker) or `run_standalone.py` (Standalone)
- **Configuration**: Domain-specific YAML (`config/`) with `network.yaml` as SSOT.
--- ---
@@ -73,9 +74,9 @@ A unified system for inventory management featuring web administration, offline
- **JWT**: Stateless tokens for API auth. - **JWT**: Stateless tokens for API auth.
- **LDAP**: Primary source of truth for users in enterprise mode. - **LDAP**: Primary source of truth for users in enterprise mode.
- **Password Caching**: Encrypted local cache for offline authentication. - **Password Caching**: Encrypted local cache for offline authentication.
- **CORS**: Restricted origins in production via `config/backend.yaml`. - **CORS**: Restricted origins in production via `config/network.yaml` (SSOT).
--- ---
**Last Updated**: 2026-04-23 **Last Updated**: 2026-04-23
**Version**: 1.14.7 **Version**: 1.14.19

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,41 +1,58 @@
# TFM aInventory - Caddy Patched IP Configuration # TFM aInventory - Standalone Caddy Configuration
# Version 1.9.17 - The Dynamic Shield (Production Polish) # Self-signed SSL/TLS reverse proxy for any IP/hostname
{ {
admin off admin off
local_certs local_certs
local_certs
skip_install_trust skip_install_trust
auto_https disable_redirects auto_https disable_redirects
# Configure on-demand TLS for private network IPs
on_demand_tls { on_demand_tls {
ask http://localhost:8916/ ask http://localhost:8916/
# This allows Caddy to generate internal certs for any IP/domain. }
ask http://backend:8000/
}
} }
# Dynamic HTTPS Frontend (port 8919) - Matches ANY IP or hostname # Dynamic HTTPS Frontend (port 8919) - Matches ANY IP or hostname
https:// { https://:8919 {
tls internal { tls internal {
on_demand on_demand
} }
reverse_proxy frontend:3000 # Next.js HMR Support (WebSocket)
handle /_next/webpack-hmr {
header { reverse_proxy http://localhost:8917 {
header_up Upgrade {>Upgrade}
header_up Connection {>Connection}
}
}
reverse_proxy http://localhost:8917 {
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto https
header_up X-Forwarded-Host {host}
}
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-XSS-Protection "1; mode=block" X-XSS-Protection "1; mode=block"
X-Frame-Options "SAMEORIGIN" X-Frame-Options "SAMEORIGIN"
X-Frame-Options "SAMEORIGIN"
Referrer-Policy "strict-origin-when-cross-origin" Referrer-Policy "strict-origin-when-cross-origin"
} }
} }
# Dynamic HTTPS Backend (port 8918) - Matches ANY IP or hostname # Dynamic HTTPS Backend (port 8918) - Matches ANY IP or hostname
https://:444 { https://:8918 {
tls internal { tls internal {
on_demand on_demand
} }
} reverse_proxy http://localhost:8916 {
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto https
header_up X-Forwarded-Host {host}
}
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
}
}
} }

View File

@@ -41,9 +41,10 @@ A unified inventory management system that eliminates manual data entry through
### Phase 7: Config Consolidation (COMPLETED ✓) ### Phase 7: Config Consolidation (COMPLETED ✓)
- **Centralization**: All config in `config/` folder (YAML format). - **Centralization**: All config in `config/` folder (YAML format).
- **Automation**: Bash scripts converted to Python (`scripts/`). - **Automation**: Bash scripts converted to Python (`scripts/`).
- **Structure**: Clear separation of `backend.yaml`, `frontend.yaml`, `network.yaml`, `docker.yaml`, `secrets.yaml`. - **SSOT Architecture**: `network.yaml` established as Master IP/Port authority.
- **Dynamic Injection**: Automatic API URL and CORS calculation from master config.
- **D-06 Load Order**: Env Vars > YAML > Defaults. - **D-06 Load Order**: Env Vars > YAML > Defaults.
- **Deprecation**: `inventory.env` completely removed. - **Deprecation**: `inventory.env` and legacy `.sh` scripts completely removed.
### Phase 8: Hardening & Release (PLANNED) ### Phase 8: Hardening & Release (PLANNED)
- Stability monitoring, final UX refinements, production-ready runbook. - Stability monitoring, final UX refinements, production-ready runbook.

View File

@@ -1,54 +1,41 @@
# CURRENT AI WORKING SESSION — HANDOVER # CURRENT AI WORKING SESSION — HANDOVER
**Active AI:** Claude Haiku 4.5 (Claude Code) **Active AI:** Gemini CLI
**Last Updated:** 2026-04-23 **Last Updated:** 2026-04-23
**Current Version:** v1.14.7 **Current Version:** v1.14.19
**Status**: ✅ PHASE 7 COMPLETE **Status**: ✅ SSL PROXY FIXED | 🟢 READY FOR PHASE 8
--- ---
## SESSION 41 EXECUTION — Phase 7 Execution & Consolidation ## SESSION 42 EXECUTION SUMMARY — SSL Infrastructure Fix
### Work Completed This Session ### 1. SSL Proxy Fix (COMPLETE)
- **Port 80 Conflict**: Identified that Caddy was failing to start because it tried to bind to port 80 for HTTP->HTTPS redirects, while port 80 was already in use by a system-wide Caddy.
- **Caddy Configuration**: Modified `Caddyfile.standalone` (root and `config/`) to include `auto_https disable_redirects` in the global options. This allows Caddy to run on custom ports (8918/8919) without interfering with port 80.
- **Service Restart**: Successfully restarted backend, frontend, and proxy using `scripts/run_standalone.py restart`.
**1. Phase 7 Execution (Config Consolidation):** ### 2. Verification
- ✅ Wave 1: Created `config/` structure, 5 schema examples, 4 actual config files, and 155-line `config/README.md`. - **Backend SSL**: Verified reachable at `https://localhost:8918/` (Port 8916 upstream).
- ✅ Wave 2 (Backend): Refactored `backend/config_loader.py` for YAML and D-06 load order. Updated `config_manager.py`, `main.py`, and `entrypoint.sh`. - **Frontend SSL**: Verified reachable at `https://localhost:8919/` (Port 8917 upstream).
- ✅ Wave 2 (Scripts): Converted `deploy.sh`, `run_standalone.sh`, `install_service.sh`, and `export_prod.sh` to secure Python scripts with YAML parsing. - **Service Status**: `run_standalone.py status` confirms all components are UP.
- ✅ Wave 3 (Docker & Docs): Updated `docker-compose.yml` (volume mounts), `Dockerfile`, `.gitignore`, `DEPLOYMENT.md`, and `README.md`.
- ✅ Post-Wave: Refactored legacy `load_dotenv()` in `ai_vision.py`, `check_models.py`, `gemini.py`, and `claude.py`.
- ✅ Cleanup: Deleted all deprecated bash scripts and legacy `.env` files. Updated `scripts/save_version.py` for new infrastructure.
**2. Versioning & State Sync:**
- ✅ Incremented version to `v1.14.7` across all SSOT files (`VERSION.json`, `frontend/VERSION.json`, `PROJECT_ARCHITECTURE.md`, `dev_docs/PLAN.md`).
- ✅ Updated roadmap in `dev_docs/PLAN.md` marking Phase 7 as COMPLETED.
- ✅ Verified all files pass syntax checks (Python/Bash).
### Phase 7 Artifact Status
- **Plans**: `.planning/phases/07-config-consolidation/07-01-PLAN.md` ✓ COMPLETED
- **Plans**: `.planning/phases/07-config-consolidation/07-02-PLAN.md` ✓ COMPLETED
- **Plans**: `.planning/phases/07-config-consolidation/07-03-PLAN.md` ✓ COMPLETED
- **Plans**: `.planning/phases/07-config-consolidation/07-04-PLAN.md` ✓ COMPLETED
- **Summaries**: `.planning/phases/07-config-consolidation/07-01,02,03,04-SUMMARY.md` ✓ Created
- **Context**: `.planning/phases/07-config-consolidation/07-CONTEXT.md` ✓ Archived
--- ---
## NEXT STEPS ## NEXT STEPS (Phase 8: Hardening & Release)
1. **Start Phase 8 (Hardening & Release)**: 1. **End-to-End Testing**:
- Perform end-to-end testing of the new Python deployment scripts. - Verify data consistency in multi-page Excel exports.
- Verify Docker deployment with `python3 scripts/deploy.py production`. - Stress test the new Python-based deployment scripts.
- Perform final UX refinements and accessibility audits.
- Prepare production-ready runbook for v1.15.0 stable release.
2. **Stability Monitoring**: 2. **UX Refinement**:
- Check logs for any configuration parsing warnings. - Perform a final accessibility audit on the new Admin UI components.
- Ensure all environment variable overrides work as expected (D-06). - Ensure consistent loading states across all Admin panels.
3. **Cleanup**: 3. **Production Preparation**:
- Archive Phase 7 planning artifacts to `dev_docs/ARCHIVE_LOGS.md` or similar. - Finalize the production runbook.
- Prepare for the v1.15.0 "Stable" release milestone.
--- ---
Phase 7 fully implemented, verified, and cleaned up. Ready for the next phase. All tasks for this session are implemented, verified, and committed.
✓ Services are currently RUNNING in the background.

View File

@@ -1,6 +1,6 @@
{ {
"version": "1.14.17", "version": "1.14.21",
"last_build": "2026-04-23-1519", "last_build": "2026-04-23-1559",
"codename": "ConfigCore", "codename": "ConfigCore",
"commit": "dcc3f692" "commit": "6e88ea91"
} }

View File

@@ -72,7 +72,8 @@ export function ExportPanel() {
{isLoading ? <Loader2 size={14} className="animate-spin" /> : <FileSpreadsheet size={14} />} {isLoading ? <Loader2 size={14} className="animate-spin" /> : <FileSpreadsheet size={14} />}
Excel Excel
</button> </button>
</div>
</div>
{/* Audit Trail Section */} {/* Audit Trail Section */}
<div className="p-4 bg-background/40 border border-slate-800/40 rounded-2xl hover:border-primary/20 transition-all group flex flex-col justify-between"> <div className="p-4 bg-background/40 border border-slate-800/40 rounded-2xl hover:border-primary/20 transition-all group flex flex-col justify-between">
@@ -105,7 +106,7 @@ export function ExportPanel() {
Excel Excel
</button> </button>
</div> </div>
</div>
</div> </div>
{error && ( {error && (