brewlog/src/infrastructure
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
..
client feat(cups): add HTTP client for cups API 2026-02-03 16:36:14 +00:00
repositories feat(cups): add SQL repository with timeline event integration 2026-02-03 16:36:10 +00:00
ai.rs feat(ai): add AI-powered extraction for roaster and roast forms 2026-02-03 18:00:19 +00:00
auth.rs chore(lint): enable clippy pedantic and restriction lints 2026-02-02 17:55:16 +00:00
backup.rs feat(cafes): add SQL repository, HTTP client, and backup support 2026-02-03 14:52:44 +00:00
database.rs feat(search): add SearchFilter and DatabaseDriver to pagination infrastructure 2026-02-03 12:51:08 +00:00
mod.rs feat(ai): add AI-powered extraction for roaster and roast forms 2026-02-03 18:00:19 +00:00
osm.rs test(cafes): add integration tests for nearby cafe search API 2026-02-03 16:03:54 +00:00