Initial commit: HOA Financial Intelligence Platform MVP
Multi-tenant financial management platform for homeowner associations featuring: - NestJS backend with 16 modules (auth, accounts, transactions, budgets, units, invoices, payments, vendors, reserves, investments, capital projects, reports) - React + Mantine frontend with dashboard, CRUD pages, and financial reports - Schema-per-tenant PostgreSQL isolation with JWT-based tenant resolution - Docker Compose infrastructure (nginx, backend, frontend, postgres, redis) - Comprehensive seed data for Sunrise Valley HOA demo - 39 API endpoints with Swagger documentation - Double-entry bookkeeping with journal entries - Budget vs actual reporting and Sankey cash flow visualization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
37
backend/src/modules/budgets/budgets.controller.ts
Normal file
37
backend/src/modules/budgets/budgets.controller.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Controller, Get, Put, Body, Param, Query, UseGuards, ParseIntPipe } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
|
||||
import { BudgetsService } from './budgets.service';
|
||||
import { UpsertBudgetDto } from './dto/upsert-budget.dto';
|
||||
|
||||
@ApiTags('budgets')
|
||||
@Controller('budgets')
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
export class BudgetsController {
|
||||
constructor(private budgetsService: BudgetsService) {}
|
||||
|
||||
@Get(':year')
|
||||
@ApiOperation({ summary: 'Get budgets for a fiscal year' })
|
||||
findByYear(@Param('year', ParseIntPipe) year: number) {
|
||||
return this.budgetsService.findByYear(year);
|
||||
}
|
||||
|
||||
@Put(':year')
|
||||
@ApiOperation({ summary: 'Upsert budgets for a fiscal year' })
|
||||
upsert(
|
||||
@Param('year', ParseIntPipe) year: number,
|
||||
@Body() budgets: UpsertBudgetDto[],
|
||||
) {
|
||||
return this.budgetsService.upsert(year, budgets);
|
||||
}
|
||||
|
||||
@Get(':year/vs-actual')
|
||||
@ApiOperation({ summary: 'Budget vs actual comparison' })
|
||||
budgetVsActual(
|
||||
@Param('year', ParseIntPipe) year: number,
|
||||
@Query('month') month?: string,
|
||||
) {
|
||||
return this.budgetsService.getBudgetVsActual(year, month ? parseInt(month) : undefined);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user