120 Commits

Author SHA1 Message Date
MayaTheShy
78e7c92893 Change turtle dashboard default URL to turtles.spatulaa.com 2026-03-22 22:52:57 -04:00
MayaTheShy
e59b6c1832 feat: upgrade Node.js version to 20-alpine in Dockerfiles and improve healthcheck command 2026-03-22 22:44:26 -04:00
MayaTheShy
96afe8dcb7 Fix silent Docker crash: recursive chown, db error handling
- Entrypoint: chown -R /data (not just the directory) so existing
  volume files owned by root become writable by node user
- Entrypoint: add echo logging so startup progress is visible
- db.js: verify /data is writable before opening SQLite
- db.js: wrap Database() constructor in try-catch with clear error
  message instead of crashing silently at ESM import time
2026-03-22 21:22:30 -04:00
MayaTheShy
1b0b1c570d Fix health check: use wget -qO instead of --spider, increase start_period to 30s 2026-03-22 21:15:43 -04:00
MayaTheShy
73e157cc13 fix: remove healthcheck configuration from server service 2026-03-22 21:08:46 -04:00
MayaTheShy
173a0a9f95 Persist config files across Opus package updates
The Opus package manager deletes the entire package directory on
update (fs.delete(packageDir)) before re-downloading files. This
wiped all config files (.manager_config, .client_config, etc.) that
were stored inside packages/inventory-manager/.

Fix: add _configPath() helper to every program that resolves config
file paths to usr/config/inventory-manager/ when running under Opus,
which lives outside the package directory and survives updates.
Falls back to the local _path() for standalone (non-Opus) use.

Updated files:
- inventoryManager.lua, manager/config.lua, inventoryClient.lua,
  inventoryWebBridge.lua, dropperController.lua, craftingTurtle.lua
- .package install script: saves configs to usr/config/inventory-manager/
- autorun/startup.lua: checks both persistent and package dirs
- startup/client.lua: uses persistent dir for .client_setup/.dropper_config
- web/server/Dockerfile: switch health check to wget (from prior fix)
2026-03-22 20:51:31 -04:00
MayaTheShy
01eef4eead fix: correct typo in HEALTHCHECK start-period option 2026-03-22 20:44:57 -04:00
MayaTheShy
a499446366 fix: use wget for Docker health check instead of node
Spawning a full Node process for health checks is slow on Alpine and
can exceed the 3s timeout, causing the container to be marked unhealthy.
Use wget (built into Alpine) instead, and increase start_period to 15s.
2026-03-22 20:42:37 -04:00
MayaTheShy
b49574f39b fix: SQLite readonly error in Docker container
- Add entrypoint script that ensures /data is owned by node user
  before dropping privileges with su-exec
- Remove USER node from Dockerfile (entrypoint handles it)
- Change client depends_on to service_healthy so nginx waits for
  the server to pass its healthcheck before starting
2026-03-22 19:15:04 -04:00
MayaTheShy
40df13e756 Refactor database test setup to use DB_PATH from vitest.config.js 2026-03-22 11:54:57 -04:00
MayaTheShy
f2634328ec Add Vitest configuration for testing environment setup 2026-03-22 11:54:51 -04:00
MayaTheShy
53863657d7 Refactor code structure for improved readability and maintainability 2026-03-22 11:54:07 -04:00
MayaTheShy
ba0cbfbbb6 Add unit tests for server logic including rate limiter, normalization helpers, and input validation 2026-03-22 11:52:33 -04:00
MayaTheShy
a8513b339c Add comprehensive tests for the database layer in db.test.js 2026-03-22 11:51:47 -04:00
MayaTheShy
21f12501ca Add testing scripts and update devDependencies in package.json 2026-03-22 11:46:57 -04:00
MayaTheShy
026d0c8d6b Add Cross-Project Integration API for RemoteTurtle system 2026-03-22 04:10:11 -04:00
MayaTheShy
33845c70d7 Add cross-link to Turtle Dashboard in App component 2026-03-22 04:10:06 -04:00
MayaTheShy
fa18c72cf7 Add styles for cross-link button in App.css 2026-03-22 04:10:02 -04:00
MayaTheShy
c5aa4b5332 Add TURTLE_SERVER_URL environment variable to server configuration 2026-03-22 04:09:56 -04:00
MayaTheShy
6adbd88b22 Add remote reboot functionality to SettingsPanel 2026-03-22 03:16:24 -04:00
MayaTheShy
c65fd67b8e Add styles for remote reboot section in SettingsPanel 2026-03-22 03:16:20 -04:00
MayaTheShy
01ca8ca127 Add rebootComputers function to initiate remote reboot via API 2026-03-22 03:15:42 -04:00
MayaTheShy
2ac11350e6 Add API endpoint for remote reboot of CC:Tweaked computers 2026-03-22 03:15:36 -04:00
MayaTheShy
479e1918f5 Implement rate limiting and enhance input validation for API endpoints 2026-03-22 02:57:21 -04:00
MayaTheShy
9d5fceee5c Enhance Dockerfile to create SQLite data directory with proper ownership 2026-03-22 02:57:18 -04:00
MayaTheShy
efc3a88052 Add security headers to nginx configuration for enhanced protection 2026-03-22 02:57:13 -04:00
MayaTheShy
48d34a5eeb Refactor nginx configuration to remove duplicate texture proxy cache zone definition 2026-03-22 02:42:12 -04:00
MayaTheShy
78674714b1 Enhance WebSocket keep-alive mechanism to include bridge connections and handle stale connections 2026-03-22 02:41:52 -04:00
MayaTheShy
1a6d32c16b Add texture proxy cache configuration to nginx 2026-03-22 02:41:45 -04:00
MayaTheShy
8c02dc15c0 Fix lastUpdate assignment to handle null values in _applyStateData function 2026-03-22 02:38:40 -04:00
MayaTheShy
4045def0a7 Add reconnectDelay variable for WebSocket reconnection logic 2026-03-22 02:38:35 -04:00
MayaTheShy
460cf34252 Enhance WebSocket error handling and implement command idempotency for dropper nickname and recipe management endpoints 2026-03-22 02:38:30 -04:00
MayaTheShy
ea75c1eabc Implement exponential backoff for WebSocket reconnection and enhance error handling in recipe management functions 2026-03-22 02:38:21 -04:00
MayaTheShy
0fb57d7c94 Ensure database is only closed if it is open in closeDb function 2026-03-22 02:38:17 -04:00
MayaTheShy
edcc19e5a4 Add command ID to dropper nickname request for idempotency 2026-03-22 02:38:12 -04:00
MayaTheShy
5162a71be4 Add support for API key at build time in Dockerfile for Vite 2026-03-22 02:15:13 -04:00
MayaTheShy
0d3de9dc48 Refactor docker-compose to include API key in environment variables for server and client 2026-03-22 02:15:08 -04:00
MayaTheShy
10dc27a2c4 Enhance API request handling with authentication headers and API key support 2026-03-22 02:14:15 -04:00
MayaTheShy
465efbeb0e Implement API key authentication for secure access to mutating endpoints and WebSocket connections 2026-03-22 02:13:24 -04:00
MayaTheShy
bbae2740a7 Implement idempotent command tracking with cleanup and caching for improved request handling 2026-03-22 02:12:18 -04:00
MayaTheShy
224738f2e7 Add commandId generation for idempotent requests in API calls 2026-03-22 02:12:13 -04:00
MayaTheShy
a5e6be7f4b Enhance command handling: implement monotonic ID for deduplication and improve acknowledgment process 2026-03-22 01:29:16 -04:00
MayaTheShy
bee1019fd6 Add dropper nickname management: implement get and set endpoints 2026-03-21 20:55:01 -04:00
MayaTheShy
12c17d3bfd Add functionality to manage dropper nicknames: implement set and fetch methods 2026-03-21 20:54:57 -04:00
MayaTheShy
846f3e8b80 Add SettingsPanel component for managing dropper nicknames 2026-03-21 20:54:55 -04:00
MayaTheShy
6e2c17de29 Add settings panel CSS styles for overlay modal and dropper nickname list 2026-03-21 20:54:52 -04:00
MayaTheShy
580b53ed6b Update dropper selection display: include nicknames for better identification 2026-03-21 20:54:49 -04:00
MayaTheShy
862002c0cf Add settings panel functionality: include toggle button and overlay for settings 2026-03-21 20:54:45 -04:00
MayaTheShy
b454fd5516 Update dropper selection display: include client ID in dropdown options for better identification 2026-03-21 20:37:20 -04:00
MayaTheShy
98f415d7d4 Refactor InventoryGrid styles: update category tab and item grid appearance for improved layout and visual consistency 2026-03-21 20:17:13 -04:00