Skip to content

Feat/cost attribution 868 - #1104

Open
Robinsonchiziterem wants to merge 5 commits into
Nanle-code:masterfrom
Robinsonchiziterem:feat/cost-attribution-868
Open

Robinsonchiziterem wants to merge 5 commits into
Nanle-code:masterfrom
Robinsonchiziterem:feat/cost-attribution-868

Conversation

@Robinsonchiziterem

Copy link
Copy Markdown

Summary

Implements cost attribution by application tag or memo prefix for project budgeting (#868). Attributes transaction fees (in Stroops and XLM) and payment transfer volumes to developer-defined project tags (e.g. billing, auth, nft-drop, defi-swap) via literal memo prefixes (e.g., [APP:billing], BILL:) or custom regex patterns.

  • Domain Library (src/lib/costThresholdManager.ts): CostThresholdManager implementation for tag management, memo prefix and regex pattern matching, Stroops/XLM fee calculation, volume tracking, threshold alerts (ok, warning >= 80%, exceeded >= 100%, unbudgeted), auto-discovery of embedded tags ([APP:tag]), JSON/CSV report exports, and graceful SSR/storage error handling.
  • Domain Library (src/lib/costThresholdManager.ts): CostThresholdManager implementation for tag definition, memo prefix and regex pattern matching, budget limits, volume tracking, threshold alerts (ok, warning >= 80%, exceeded >= 100%, unbudgeted), auto-discovery of embedded tags ([APP:tag]), JSON/CSV report exports, and graceful SSR/storage error handling.
  • Analytics Integration (src/lib/analytics.ts): Embedded cost attribution calculations into buildAnalyticsSnapshot() and re-exported CostThresholdManager.
  • Documentation: User-facing & developer guide in docs/features/COST_ATTRIBUTION_ANALYTICS.md and changelog entry in CHANGELOG.md.
  • Tests were added or updated for the change (primary flow, a boundary case, and a failure case).
  • Docs were updated where behaviour, configuration, or security posture changed.

Closes #868

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@Robinsonchiziterem is attempting to deploy a commit to the nanle-code's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@Robinsonchiziterem Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Manuelshub

Copy link
Copy Markdown
Collaborator

@Robinsonchiziterem Please resolve conflicts.

This branch has not been deployed

No deployments
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.

[2026 Analytics] Implement cost attribution by application tag or memo prefix

2 participants