feat: spending trend heatmap visualization#575
Open
mendarb wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: spending trend heatmap visualization#575mendarb wants to merge 1 commit intorohitdash08:mainfrom
mendarb wants to merge 1 commit intorohitdash08:mainfrom
Conversation
Add a calendar-style heatmap (like GitHub contributions) that visualizes daily spending intensity over the past year. Backend: - GET /api/expenses/heatmap?months=12 endpoint with JWT auth - Aggregates daily spending totals from Expense model Frontend: - SpendingHeatmap component with 52x7 grid, color scale, and tooltips - Integrated into the Analytics page - Pure CSS/Tailwind, no charting library needed Tests: - Backend: test_heatmap.py (auth, aggregation, validation) - Frontend: SpendingHeatmap.test.tsx (loading, grid, tooltip, error, legend) Closes rohitdash08#116 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
GET /api/expenses/heatmap?months=12endpoint (JWT-protected) that returns daily spending totals aggregated from the Expense modelSpendingHeatmapcomponent -- a calendar-style heatmap grid (52 weeks x 7 days, like GitHub contributions) with color scale from gray (no spending) through green/yellow/orange/red, and hover tooltips showing date + amountTest plan
pytest tests/test_heatmap.py-- verifies empty state, daily aggregation of multiple expenses, auth requirement, and invalid param handlingjest SpendingHeatmap.test.tsx-- verifies loading state, 364-cell grid rendering, tooltip show/hide on hover, error display, and legend presenceCloses #116
🤖 Generated with Claude Code