brewlog/tests/server
Jon Seager b668d368e7
feat(ai): add AI-powered extraction for roaster and roast forms
Users can upload a photo of a coffee bag or type a text prompt to
auto-fill roaster/roast form fields via OpenRouter's chat completions
API. The feature is opt-in: hidden when BREWLOG_OPENROUTER_API_KEY is
not set.

- Add src/infrastructure/ai.rs with OpenRouter client, prompt
  templates, JSON extraction from model responses, and unit tests
- Add extract-roaster and extract-roast API endpoints behind auth
- Add extraction UI (photo button + text input) to both form templates
- Add openrouter_api_key and openrouter_model to CLI args and AppState
- Enable reqwest gzip feature for compressed API responses
- Default model set to openrouter/free (auto-selects available models)
- Prompts instruct model to use web search for missing details
2026-02-03 18:00:19 +00:00
..
auth_api.rs feat!: use numeric, database-generated IDs throughout 2025-11-25 18:21:04 +00:00
backup.rs test(cafes): add API, CLI, Datastar, timeline, and backup tests 2026-02-03 14:53:08 +00:00
bags_api.rs fix: ensure bags are closed properly and closures are on the timeline 2025-11-27 14:42:38 +00:00
brews_api.rs test(brews): add filter paper coverage to brew API tests 2026-02-03 12:50:33 +00:00
cafes_api.rs test(cafes): add API, CLI, Datastar, timeline, and backup tests 2026-02-03 14:53:08 +00:00
cups_api.rs test(cups): add integration tests for cups API 2026-02-03 16:36:40 +00:00
datastar.rs test(cafes): add API, CLI, Datastar, timeline, and backup tests 2026-02-03 14:53:08 +00:00
gear_api.rs refactor(gear): remove notes field from Gear entity 2026-02-02 16:16:54 +00:00
helpers.rs feat(ai): add AI-powered extraction for roaster and roast forms 2026-02-03 18:00:19 +00:00
main.rs test(cups): add integration tests for cups API 2026-02-03 16:36:40 +00:00
nearby_api.rs test(cafes): add integration tests for nearby cafe search API 2026-02-03 16:03:54 +00:00
roasters_api.rs feat!: use numeric, database-generated IDs throughout 2025-11-25 18:21:04 +00:00
roasts_api.rs feat!: use numeric, database-generated IDs throughout 2025-11-25 18:21:04 +00:00
timeline.rs test(cafes): add API, CLI, Datastar, timeline, and backup tests 2026-02-03 14:53:08 +00:00