Feat: Add web interface for case listing and audio playback

Introduces a new web interface to list cases and play back audio
recordings. This includes:

- A new `web` module in `routes` to handle web requests.
- `handle_case_list` to scan and display available cases and their
  recordings.
- `handle_audio` to serve audio files, with validation to prevent path
  traversal and ensure correct file types.
- `AppError::NotFound` variant to handle missing resources gracefully.
- Updates to `projektplan.md` to document the change in STT container
  and m4a preprocessing.
- New tests in `server/tests/web_test.rs` to ensure the web interface
  functions correctly.
This commit is contained in:
2026-04-13 16:24:26 +02:00
parent ef6efec9f0
commit fbf8681df0
6 changed files with 443 additions and 0 deletions
+6
View File
@@ -1,6 +1,7 @@
mod debug;
mod health;
mod upload;
mod web;
use std::sync::Arc;
@@ -14,4 +15,9 @@ pub fn api_router() -> Router<Arc<Config>> {
.route("/api/health", get(health::handle_health))
.route("/api/debug/whoami", get(debug::handle_whoami))
.route("/api/upload", post(upload::handle_upload))
.route("/web/", get(web::handle_case_list))
.route(
"/web/audio/{user}/{case_id}/{filename}",
get(web::handle_audio),
)
}