Commit Graph

35 Commits

Author SHA1 Message Date
darroyo ee5372c9fd Bump version to 1.0.29 2026-07-09 20:33:19 -04:00
darroyo 5d708e1d7b fix: RunRemote SSH-to-source with pre-installed dest key, eliminating base64 round-trip
- Regenerate qnap.key and baby-nas.key to OpenSSH native format (387 bytes vs 119 PKCS8)
- Pre-install qnap.key on Baby NAS at /var/lib/syncserver/ssh/keys/
- Pre-populate Baby NAS known_hosts with Qnap host keys
- Simplify RunRemote: LXC SSH to Baby NAS, Baby NAS runs rsync with local qnap.key
- Remove wrapper script approach (rsync rejects remote-to-remote)
2026-07-09 20:03:00 -04:00
darroyo 727d8676a6 Bump version to 1.0.27 2026-07-09 18:41:13 -04:00
darroyo f76cdaf140 Bump version to 1.0.26 2026-07-09 18:40:30 -04:00
darroyo 83cc48e70f Bump version to 1.0.25 2026-07-09 18:30:24 -04:00
darroyo 63e82c502c Bump version to 1.0.24 2026-07-09 18:28:03 -04:00
darroyo 88cc7e88e6 Bump version to 1.0.23 2026-07-09 17:33:04 -04:00
darroyo be7d47c0e1 Bump version to 1.0.22 2026-07-09 16:54:38 -04:00
darroyo 6c48031dd7 Bump version to 1.0.21 2026-07-09 15:18:05 -04:00
darroyo acd50ec9c0 Bump version to 1.0.20 2026-07-09 15:13:35 -04:00
darroyo 7a70355b6d Bump version to 1.0.19 2026-07-09 15:00:40 -04:00
darroyo 73cad44769 Bump version to 1.0.18 2026-07-09 12:43:13 -04:00
darroyo f92b03c0ce Bump version to 1.0.17 2026-07-09 10:40:23 -04:00
darroyo ba4c6aa732 Bump version to 1.0.16 2026-07-09 00:04:56 -04:00
darroyo 48d8fff5df Bump version to 1.0.15 2026-07-08 23:56:05 -04:00
darroyo d0fd0e994f Bump version to 1.0.13 2026-07-08 23:36:24 -04:00
darroyo c015a47440 Bump version to 1.0.12 2026-07-08 22:39:08 -04:00
darroyo 1798fc6804 Bump version to 1.0.11
Machine status probe on page load:
- POST /api/machines/refresh probes all machines in parallel (max 20 concurrent, 1.5s timeout)
- Updates DB status and broadcasts via SSE to all connected browser tabs
- Server-side throttle: ignores refresh requests within 10s
- Machines.tsx and Dashboard.tsx fire probe on mount
- Visual "Checking machine status..." indicator in Machines table
- MachineHandler now accepts *Engine for ProbeAllMachines access
2026-07-08 21:44:50 -04:00
darroyo a77f84ad34 Bump version to 1.0.10
Smart WoL: TCP pre-check before sending magic packet (3s timeout).
Machine status updates via SSE: online/offline tracked in DB and
broadcast to all connected browser tabs in real-time.
- Pre-check: if machine already reachable, skip WoL and mark online
- WoL path: send 3 magic packets, wait for SSH, mark online/offline
- Backend: setMachineStatus() helper + machine_status SSE event
- Frontend: subscribeMachineStatus() SSE helper for Machines + Dashboard
- IsReachable() helper in wol package for TCP reachability checks
2026-07-08 19:56:08 -04:00
darroyo 5d5b6c99a7 Bump version to 1.0.9
Fix Wake-on-LAN: set SO_BROADCAST on UDP socket, send 3 magic packets,
expose broadcast_addr and wake timeout fields in UI, add Test Wake endpoint,
surface send errors in job status, bump default wake timeout to 180s.
2026-07-08 19:19:50 -04:00
darroyo 69c4898a56 Add cancellation reason tracking with user/system codes and UI 2026-07-08 17:31:22 -04:00
darroyo e322299dc3 Add deploy script with dry-run, retry, rollback and health checks 2026-07-08 00:21:17 -04:00
darroyo b185686d2b Bump version to 1.0.7 2026-07-08 00:05:37 -04:00
darroyo f5f3b2263e fix(postinst): robust service restart on upgrade
- Always enable service (not conditional on is-enabled)
- try-restart: reinicia si ya estaba corriendo
- start fallback: arranca si quedó inactive después del try-restart
- Covers: fresh install, running disabled, stopped manual, failed
- Like baby-nas but handles the "running-but-not-enabled" edge case
2026-07-07 23:54:08 -04:00
darroyo 1e516cb746 simplify postinst: use try-restart like baby-nas
- Replace if/restart/else/enable with is-enabled && enable; try-restart
- Consistent with baby-nas approach
- Handles failed services gracefully (no auto-recover)
2026-07-07 23:49:52 -04:00
darroyo a79bb29699 fix: service restart on upgrade and no-cache headers for SPA assets
- postinst: restart instead of start if service already enabled (upgrade case)
- embed.go: no-cache/no-store on index.html, immutable cache on hashed assets
- Fixes web not refreshing after dpkg upgrade
2026-07-07 23:41:16 -04:00
darroyo 9cef7173cb Visual redesign: design system, refined ops console aesthetic
- Full component library (Button, Input, Label, Select, Modal, Table, Badge, Card, etc.)
- Tailwind design tokens: IBM Plex Sans + JetBrains Mono, teal accent, semantic status colors
- NavBar with logo, responsive hamburger menu, real logout
- All pages redesigned: Login, Dashboard (KPI cards), Machines, SyncPairs, JobHistory, JobDetail, SSHKeys, Settings
- Fixed: hover:bg-gray-750 dead class, window.location.href navigation bug
- Replaced alert()/confirm() with sonner toasts and accessible modals
- Added ErrorBoundary, skip link, accessible modal dialogs (Radix)
- Icons: lucide-react throughout, copy/download buttons
- 1.0.5 → 1.0.6
2026-07-07 23:12:34 -04:00
darroyo bfa006f4ab Add SSH key management, job history persistence, and live streaming
- SSH key management: generate ed25519 keypairs or import public keys
  from UI (/ssh-keys), per-machine key selection in Machines form,
  one-time private key download with hash verification
- Fix engine to use machine-specific SSH key (was hardcoded to server key)
- Job log persistence: write to job_logs table (DB) with batched inserts,
  buffer of 50 lines; GetAllFiltered with status/pair/date range filters
- EventBus refactor: per-job subscriber channels, global channel, non-blocking
- SSE endpoints: /jobs/stream (all), /jobs/:id/log/stream (per-job live)
- JobDetail page: live log streaming, auto-scroll, cancel, duration
- JobHistory: filters (pair, status, date range), pagination, link to detail
- Cleanup scheduler: daily purge of job_logs and finished jobs older than
  SYNCSERVER_RETENTION_DAYS (default 30)
- Migration 0002: indexes on job_logs(job_id), jobs(status,created_at),
  jobs(sync_pair_id)
2026-07-07 20:36:11 -04:00
darroyo 5374ab81cc auth: default admin/admin credentials on first install + bump 1.0.4
SeedAdmin now uses 'admin'/'admin' as defaults when environment
variables are not set, so the service works out-of-the-box after
first install.
2026-07-07 20:00:42 -04:00
darroyo 596981b63b Bump version to 1.0.3
webui: use fs.Sub to fix embed FS root so static assets are found

Previously http.FileServer searched for assets/foo.css in the embed FS
rooted at dist/, but only paths starting with dist/ resolve. fs.Sub
strips the dist/ prefix so FileServer finds the actual files.
2026-07-07 19:46:03 -04:00
darroyo 79b6c958fd Bump version to 1.0.2
- Add scripts/bump-version.sh for semver patch increments
- Update AGENTS.md Dev Commands section and add Version Bumping docs
- Makefile default VERSION bumped to 1.0.2
2026-07-07 19:18:52 -04:00
darroyo 68592bd119 Fix version in DEBIAN/control and Makefile default to 1.0.1 2026-07-07 15:52:33 -04:00
darroyo 9038e3a000 fix(make): copy web/dist into internal/webui/dist before build-all 2026-07-07 15:24:55 -04:00
darroyo 221aea8b4c refactor: adopt baby-nas Makefile style with inline packaging targets
- Simplify build targets: frontend, build, build-go, build-all, run, package
- Remove scripts/ for packaging (inline in Makefile)
- Add etc/syncserver/config.yaml and lib/systemd/system/ at project root
- build-all produces both amd64 and arm64 binaries
- package target builds .deb inline without external scripts
- VERSION from git tags, commit hash injected via ldflags
2026-07-07 15:18:01 -04:00
darroyo 8e08c73f60 feat: complete SyncServer implementation
Full-stack Go monolith with embedded React frontend for orchestrating
rsync-over-SSH file synchronization with Wake-on-LAN support.

Features:
- JWT auth (HS256) with bcrypt password hashing
- CRUD for machines (with WoL config) and sync_pairs
- Ed25519 SSH key generation and known_hosts management
- WoL magic packet sender + TCP-connect waiter with backoff
- Sync engine: rsync subprocess, per-pair job queue, progress parsing
- Homebrew cron parser for scheduled syncs
- SSE stream for live job status (queued/waking_up/running/success/failed)
- React+TS+Vite+Tailwind SPA embedded via embed.FS
- Debian packaging with systemd unit, postinst/prerm/postrm

Tech stack:
- Go 1.22+ (CGO_ENABLED=0, pure SQLite via modernc.org/sqlite)
- chi router for HTTP API
- TypeScript + React 18 + Tailwind CSS frontend
- Cross-compiled to Linux amd64 for Proxmox LXC deployment

Tests: wol (MAC parsing, magic packet), syncengine/queue, scheduler/cron
2026-07-07 15:03:22 -04:00