Riddy21 / Riddy21/Friday_Budgeting_Pro

feat(budgeting): budget alerts — notify when category hits 80% or 100% of monthly budget

Open
#231 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Summary

After each sync, check if any spending category has hit 80% or 100% of its monthly budget and surface a notification via the agent.

Behaviour

  • Run budget check automatically after every sync()
  • Approaching (80%): "⚠️ Groceries: $340 spent of $400 budget (85%) — $60 remaining"
  • Over budget (100%+): "🔴 Entertainment: $245 spent vs $200 budget — $45 over"
  • Only alert once per category per month (track last-alerted timestamp)
  • Suppress if no targets set

Implementation notes

  • Add budget_alert_log table to track sent alerts: (user_id, line_item_id, month, threshold, alerted_at)
  • Alerts surface as part of the sync summary returned to the agent
  • Agent decides whether to message Ridvan based on urgency

Acceptance criteria

  • Alerts included in sync response under budget_alerts key
  • Deduplication: same category + month + threshold only alerts once
  • Unit tests for threshold logic (79% = no alert, 80% = approaching, 100% = over)

Part of

Epic #226

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the sync() entry point and trace how the sync summary is assembled and where database schema changes are defined. Implement the budget_alert_log tracking and include budget_alerts in the sync response, then run or add unit tests covering 79%, 80%, and 100% thresholds plus monthly deduplication.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.