Commit Graph
9 Commits
Author SHA1 Message Date
rzuastiandClaude Opus 4.8 15bbb3bda9 Improve backend DB concurrency and async safety
Tune SQLite and remove blocking calls from async/scan paths:

- Enable WAL + synchronous=NORMAL + busy_timeout + foreign_keys on each
  pooled connection, so the five scanners, web server, and retention no
  longer contend on the default rollback journal / FULL fsync.
- Run DB work in axum handlers via spawn_blocking (db::run_blocking) so
  synchronous rusqlite calls no longer block tokio worker threads.
- Deliver notifications on a dedicated task fed by a bounded channel; the
  blocking Pushover HTTP call runs in spawn_blocking, so a slow or
  unreachable Pushover can never stall device discovery.
- Make get_db_connection() return Result instead of panicking, so pool
  exhaustion surfaces as a 500 rather than crashing the process.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 09:30:15 -04:00
rzuastiandClaude Opus 4.8 863e37d06e Ignore the local .claude tooling directory
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 19:30:24 -04:00
rzuastiandClaude Opus 4.8 20c51faaea Build front-end via Nix and harden Docker/Nix image generation
- Build the Flutter web app at release time (nix/frontend.nix) and bundle
  it next to the binary at $out/share/oott/web; resolve it at runtime
  relative to the executable. Remove the prebuilt backend/web from git.
- Add web_server.{ip_address,port,api_key} options to the NixOS module so
  the generated config deserializes (was missing, causing a startup panic).
- Docker image: set SSL_CERT_FILE for outbound TLS, drop the heavy
  nixos/nix base image, trim contents to [oott cacert], and ensure /tmp
  exists.
- Remove the unused "nix" flake input and commit flake.lock.
- Provide Swagger UI to utoipa-swagger-ui offline via a pinned fetchurl so
  the package builds in the Nix sandbox; skip the redundant check phase
  (tests run via backend/run_tests.sh).
- sample_oott.toml: set database.path to /db/oott.db for the Docker image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 21:43:08 -04:00
rzuasti 39a58983d6 Moved backend code into its own subfolder 2026-02-10 14:03:33 -05:00
rzuasti b8f1f8c516 Working on flake support 2026-01-24 14:43:46 -05:00
rzuasti 3651ae53e3 Working on flake support 2026-01-24 12:28:22 -05:00
rzuasti 8e8460afbc Created config sample (get real config out of git). Changed
mac_vendor_finder to use lazy_static instead of LazyLock
2026-01-23 08:28:56 -05:00
Ricardo Zuasti 9d5e3eaaf1 Added database support and initial structure creation 2026-01-19 19:03:08 -05:00
Ricardo Zuasti c4984c4ed2 First commit 2026-01-13 07:57:47 -05:00