Skip to content

feat(alerts): notify users when an opportunity crosses a profit threshold #37

Description

@Flickwire-Agent

User Story

As an arbitrage trader, I want alerts when an item crosses my profit threshold so that I can act quickly without repeatedly refreshing the app.

Why This Matters

Arbitrage opportunities are time-sensitive. The current app surfaces opportunities on demand, but users still need to poll manually. Threshold alerts turn the app from a dashboard into an active trading assistant.

Acceptance Criteria

  • Users can create an alert rule for an item, world/data center target, minimum net spread, and optional minimum recent-sales count.
  • Alert rules can be listed, enabled/disabled, edited, and deleted.
  • The backend evaluates alert rules whenever opportunity caches refresh.
  • Triggered alerts include item name, buy world, sell world/data center, current net spread, recent volume, and generated-at time.
  • The first delivery channel can be browser-visible in-app notifications or webhook delivery; the implementation should document the chosen channel.
  • Duplicate notifications are suppressed for the same rule while the opportunity remains above threshold.
  • Alert evaluation failure does not break opportunity cache refresh.

Useful Context

  • The arbitrage cache refresh cadence is currently around 15 minutes.
  • There is no user-auth system yet, so scope the first version to locally managed rules plus a backend-compatible data model, or document why server persistence is needed first.
  • Future delivery channels may include email, ntfy, Discord, or PWA push.

Suggested Verification

  • Add unit or integration coverage for threshold evaluation and duplicate suppression.
  • Build API and web packages.
  • Manually test creating a rule and seeing a triggered notification in a controlled scenario.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions