Skip to content

feat(prices): add price alerts with target price and history trend - #4

Merged
JoaoBoscoDuarte merged 2 commits into
mainfrom
ideia/alerta-preco
Nov 18, 2026
Merged

JoaoBoscoDuarte merged 2 commits into
mainfrom
ideia/alerta-preco

Conversation

@romhenri

Copy link
Copy Markdown
Member

Summary

Price alerts: the user sets a target price per part, and the status combines the current price search with the stored history.

  • POST /alertas creates an alert (part + target price) for a user.
  • GET /alertas lists each alert with the cheapest current offer and its source, the historical low and the trend.
  • Logic lives in backend/app/alertas.py, built on precos.pesquisar and precos.historico, so it works with both the seed and the Serper provider.

Related to #1.

Notes

  • Backend and tests only; no UI yet.
  • Alerts are kept in memory like builds (lost on restart).

Test plan

  • cd backend && uv run pytest (85 passed, including tests/test_alertas.py)

romhenri and others added 2 commits November 11, 2026 08:36
Conflito só em backend/app/main.py (import e rotas novas no fim do arquivo): mantidas as duas partes.
@JoaoBoscoDuarte
JoaoBoscoDuarte merged commit 6bbed49 into main Nov 18, 2026
4 checks passed
@JoaoBoscoDuarte

JoaoBoscoDuarte commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Mesclado. Follow-ups: #19 (alertas), #24 (interface).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants