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:
46
backend/src/modules/accounts/accounts.controller.ts
Normal file
46
backend/src/modules/accounts/accounts.controller.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import {
|
||||
Controller, Get, Post, Put, Body, Param, Query, UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
|
||||
import { AccountsService } from './accounts.service';
|
||||
import { CreateAccountDto } from './dto/create-account.dto';
|
||||
import { UpdateAccountDto } from './dto/update-account.dto';
|
||||
|
||||
@ApiTags('accounts')
|
||||
@Controller('accounts')
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
export class AccountsController {
|
||||
constructor(private accountsService: AccountsService) {}
|
||||
|
||||
@Get()
|
||||
@ApiOperation({ summary: 'List all accounts' })
|
||||
findAll(@Query('fundType') fundType?: string) {
|
||||
return this.accountsService.findAll(fundType);
|
||||
}
|
||||
|
||||
@Get('trial-balance')
|
||||
@ApiOperation({ summary: 'Get trial balance' })
|
||||
getTrialBalance(@Query('asOfDate') asOfDate?: string) {
|
||||
return this.accountsService.getTrialBalance(asOfDate);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
@ApiOperation({ summary: 'Get account by ID' })
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.accountsService.findOne(id);
|
||||
}
|
||||
|
||||
@Post()
|
||||
@ApiOperation({ summary: 'Create a new account' })
|
||||
create(@Body() dto: CreateAccountDto) {
|
||||
return this.accountsService.create(dto);
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
@ApiOperation({ summary: 'Update an account' })
|
||||
update(@Param('id') id: string, @Body() dto: UpdateAccountDto) {
|
||||
return this.accountsService.update(id, dto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user