feat(#20): dashboard financeiro mensal — 4 widgets + endpoint de agregação

Adiciona GET /api/dashboard?month=YYYY-MM com resumo mensal (% poupado,
gastos por categoria, evolução 6 meses, últimas 10 transações, recorrências
pendentes). HomeView.vue reescrita com 4 widgets e gráficos CSS nativos.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-26 20:32:05 -03:00
co-authored by Claude Sonnet 4.6
parent 12e8500827
commit fbcb1d76aa
8 changed files with 651 additions and 4 deletions
+6
View File
@@ -64,6 +64,10 @@ func main() {
recurringSvc := service.NewRecurringService(recurringRepo, manualTxRepo)
recurringHandler := handler.NewRecurringHandler(recurringSvc)
dashboardRepo := repository.NewDashboardRepository(pool)
dashboardSvc := service.NewDashboardService(dashboardRepo, recurringSvc)
dashboardHandler := handler.NewDashboardHandler(dashboardSvc)
r.Get("/health", handler.Health)
r.Route("/api", func(r chi.Router) {
@@ -87,6 +91,8 @@ func main() {
r.Get("/recurring/status", recurringHandler.MonthlyStatus)
r.Post("/recurring/{id}/ignore", recurringHandler.Ignore)
r.Delete("/recurring/{id}/ignore", recurringHandler.Unignore)
r.Get("/dashboard", dashboardHandler.Get)
})
// Serve Vue SPA — non-API routes fall through to index.html