Skip to content

Feat/metrics#101

Merged
felipemelozx merged 10 commits intodevelopfrom
feat/metrics
Jan 20, 2026
Merged

Feat/metrics#101
felipemelozx merged 10 commits intodevelopfrom
feat/metrics

Conversation

@felipemelozx
Copy link
Owner

Add the metrics endpoint

Introduces a new MetricsController to provide financial analytics for the dashboard. This update includes performance optimizations via database indexes and a seed data generator for development environments.

New Endpoints (MetricsController):

  • GET /metrics/monthly-summary: Income vs Expense grouped by month.
  • GET /metrics/by-category: Expense breakdown by category and percentage.
  • GET /metrics/budgets/performance: Budget vs Actual spending history.
  • GET /metrics/overview: High-level dashboard summary (totals, top category, budget status)

Backend & Performance

  • Added MetricsService with optimized aggregation logic.
  • Created specific database indexes in V20__add_metrics_indexes.sql to speed up metric queries.
  • Updated repositories with native queries for performance (using CASE expressions and Projections).

Development

  • Implemented SeedDataService to automatically generate realistic test data on startup in dev profile.
  • Generators included for Transactions, Budgets, Pots, and Recurring entries.

Testing

  • Added unit tests for MetricsService and MetricsController.
  • Fixed test dependencies in TransactionSimpleMapperTest.

@felipemelozx felipemelozx self-assigned this Jan 20, 2026
@sonarqubecloud
Copy link

@felipemelozx felipemelozx merged commit e12a9a5 into develop Jan 20, 2026
5 checks passed
@felipemelozx felipemelozx deleted the feat/metrics branch January 21, 2026 00:41
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.

1 participant