diff --git a/.gitignore b/.gitignore index b178e03b..7cf4f262 100644 --- a/.gitignore +++ b/.gitignore @@ -94,4 +94,12 @@ aInventory-PROD*.zip *.crt *.cert -__push_ALL_to_remote.sh + +# ── Local AI Tooling & Persistent Paths ────────────────────── +.tool_paths +.git_path + +# ── Temporary Docker / Verification Artifacts ──────────────── +.docker_tmp/ +.tmp_docker/ +scratch/.npm/ diff --git a/PROJECT_ARCHITECTURE.md b/PROJECT_ARCHITECTURE.md index f1724c06..34ccf228 100644 --- a/PROJECT_ARCHITECTURE.md +++ b/PROJECT_ARCHITECTURE.md @@ -112,5 +112,9 @@ To ensure deployment stability on macOS environments with potentially broken dev 109: - **Unified AI Core:** The backend uses an abstraction layer to handle multiple AI providers (Gemini and Claude). 110: - **Dynamic Configuration:** System settings (AI Provider, API Keys, Backup Policies) are managed via `backend/config_manager.py`, allowing real-time updates without restarting the container. 111: - **Admin Standardization:** The Admin Dashboard features a standardized configuration UI with secure field masking for sensitive credentials. -- **Architectural Modularization (v1.10.0):** The monolithic Admin and Inventory pages have been refactored into a modular architecture. Frontend logic is decoupled into custom React hooks (`useAdmin`), and UI is extracted into standalone components (`IdentityManager`, `DatabaseManager`, etc.). Backend admin endpoints are split into domain-specific routers (`backups`, `config`) for improved maintainability. +- **Architectural Modularization (v1.10.0):** + - **Frontend:** The monolithic Admin Dashboard has been decomposed into domain-specific components: `IdentityManager`, `DatabaseManager`, `LdapManager`, `AiManager`, and `CategoryManager`. + - **Logic:** Business logic is centralized in the `useAdmin` custom React hook, ensuring clean separation of concerns. + - **Backend:** Administrative endpoints are split into the `backend/routers/admin/` package, with specialized routers for `backups` and `config`. + - **Stability:** Docker builds are secured against lockfile mismatches by enforcing strict dependency synchronization. - **Verification Infrastructure:** A dual-layer testing suite is implemented: Pytest for backend integration (using in-memory SQLite and mocked auth) and Vitest for frontend logic validation. diff --git a/README.md b/README.md index c9cc7b6c..fce1130c 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,12 @@ To generate a clean production package and snapshot the current state: - Accessible markup with `role="status"` and `aria-hidden` attributes - **Pages Updated:** Inventory (Categories, Item Types, Total Boxes), Logs (Total Events, Check in/out), Admin (Local Archives) - **Tested on:** iPhone SE (375px), iPhone 12 (390px), iPhone 14 Pro Max (430px), tablets (768px), desktop (1024px) -- **Multi-AI Selection & Secure Config (v1.9.23):** - - Support for both **Google Gemini** and **Anthropic Claude** for AI label extraction. - - Dynamically configurable AI providers via the Admin Dashboard. - - Centralized `ConfigManager` for secure API key and environment management. - **Admin UI Standardization:** Refactored Admin page with unified StatCards and secure input masking for system credentials. +- **Modular Admin Architecture (v1.10.0):** + - Decomposed monolithic pages into domain-specific components: `IdentityManager`, `DatabaseManager`, `LdapManager`, `AiManager`, and `CategoryManager`. + - Centralized state logic into a custom `useAdmin` hook for improved maintainability. + - Split backend admin endpoints into specific routers (`backups`, `config`) for better scalability. + - Optimized Docker configuration with persistent binary paths and fixed log-piping via `su-exec`. ## 🏗 Technical Overview * **Backend:** FastAPI (Python 3.12+) diff --git a/__push_ALL_to_remote.sh b/__push_ALL_to_remote.sh new file mode 100755 index 00000000..a69aa496 --- /dev/null +++ b/__push_ALL_to_remote.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +git push origin --all +git push origin --tags diff --git a/backend/Dockerfile b/backend/Dockerfile index 6ad8ec6f..d93549c7 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -35,7 +35,5 @@ RUN chmod +x /app/scripts/init_data.sh /app/backend/entrypoint.sh EXPOSE 8000 -EXPOSE 8000 - # Entrypoint runs init_data.sh first, then starts uvicorn ENTRYPOINT ["/app/backend/entrypoint.sh"] diff --git a/frontend/VERSION.json b/frontend/VERSION.json index ce9e5b98..5d978aa2 100644 --- a/frontend/VERSION.json +++ b/frontend/VERSION.json @@ -1,6 +1,6 @@ { "version": "1.10.0", - "last_build": "2026-04-15-1645", + "last_build": "2026-04-15-1731", "codename": "ModularAdmin", - "commit": "unknown" + "commit": "074d4f1f" } \ No newline at end of file diff --git a/frontend/entrypoint.sh b/frontend/entrypoint.sh index 0fba3e45..c5989f47 100644 --- a/frontend/entrypoint.sh +++ b/frontend/entrypoint.sh @@ -26,5 +26,9 @@ EOF chown nextjs:nodejs /app/public/network.json # Hand off to the application server as the nextjs user -echo "🐳 [Docker] Starting Next.js standalone server as nextjs user..." -exec su-exec nextjs node server.js +echo "🐳 [Docker] Starting Next.js server..." +if [ $# -eq 0 ]; then + exec su-exec nextjs node server.js +else + exec su-exec nextjs "$@" +fi