Commit Graph
11 Commits
Author SHA1 Message Date
rzuastiandClaude Opus 4.7 ca83009944 Add passive mDNS/Bonjour discovery scanner
Introduce a second discovery module that passively listens for mDNS
multicast announcements (224.0.0.251:5353) and feeds discovered devices
into the existing devices/events/notifications pipeline, running in its
own task alongside the ARP scanner.

Since mDNS carries an IP and hostname but no MAC (the device key), the
module resolves IP->MAC via the OS ARP cache with a targeted ARP-probe
fallback. The advertised hostname is stored in a new optional `name`
column on devices (blank for ARP-only devices); the single `update`
writes `name` only when set so ARP rescans never clobber it. Device
names are included in event/notification messages.

Adds a GET /api/mdns_scanner/status endpoint (is_listening, devices_seen,
last_device_seen_seconds_ago) wired into OpenAPI, an optional
[mdns_scanner] config section, and the corresponding Nix module option.
Also aligns the Nix module's stale `timings` section with the current
`arp_scanner` schema.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 09:37:33 -04:00
rzuastiandClaude Sonnet 4.6 44d593fccc Add OpenAPI documentation via Utoipa
Annotates all API handlers and model structs with Utoipa macros to generate
an OpenAPI 3.0 spec at runtime. Serves an interactive Swagger UI at /api/docs
and the raw JSON spec at /api/docs/openapi.json, both publicly accessible
outside the auth middleware.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 13:36:05 -04:00
rzuasti 2d64efa44b Frontend events are being returned from the API (yey!) 2026-02-27 12:28:16 -05:00
rzuasti 9ff6c9ec7e List devices API working 2026-02-25 15:54:19 -05:00
rzuasti 54e6dba496 Testing setup working, settings moved to a singleton and initialized on
main.
2026-02-18 11:23:20 -05:00
rzuasti 08465fb847 Migrated db connections to pool 2026-02-17 15:20:47 -05:00
rzuasti f1093078bd Before moving to connection pooling for the DB 2026-02-17 14:10:39 -05:00
Ricardo Zuasti 7c96939b2d Moved Devices to a models module 2026-02-14 12:30:12 -05:00
rzuasti ec951f9a89 Added frontend static assets and web server to rust backend 2026-02-12 21:46:50 -05:00
rzuasti f3cf3ebec1 Added web server basics to main, it works! 2026-02-12 16:45:04 -05:00
rzuasti 39a58983d6 Moved backend code into its own subfolder 2026-02-10 14:03:33 -05:00