feat: add transaction analytics dashboard with charts and API integra…#518
Merged
Conversation
|
@chuks68 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. |
|
@chuks68 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this pr closes #345 This PR adds a brand‑new Transaction Analytics Dashboard to the Stellar Dev Dashboard, providing visual insights into transaction activity.
Key Features
New Dashboard Tab: txAnalytics lazy‑loaded under the main navigation.
Analytics Component (TransactionAnalyticsDashboard.tsx)
Fetches transaction data via a new API wrapper.
Renders:
Transaction Frequency line chart (daily counts).
Amount Distribution bar chart (binned transaction amounts).
Responsive design with Recharts, glassmorphic cards, and modern styling (Inter font, gradient accents, hover micro‑animations).
API Wrapper (src/api/transactions.ts) for fetching /api/transactions data with proper error handling.
Routing Update: Dashboard layout now includes the txAnalytics entry, ensuring seamless navigation.
Styling & UI: Utilizes existing design system tokens for a premium look and feels, consistent with the app’s dark‑mode support.
Technical Details
Added lazy import for TransactionAnalyticsDashboard in DashboardLayout.tsx.
Updated the TABS map to expose the new txAnalytics route.
Created the dashboard component with Recharts (already a dependency) and responsive containers.
Implemented simple data aggregation helpers for frequency and amount distribution.
Added fetchTransactions helper in src/api/transactions.ts.
All new files are lint‑compliant and follow project coding standards.
Verification
Automated tests: Existing test suite runs without failures (npm test).
Manual testing: Run npm run dev and navigate to /analytics/transactions (or the new tab). Charts render with mock data, and UI interactions are smooth.
Performance: Charts load in under 2 seconds on typical hardware.