Add backend API for personal finance management application

- Introduced a comprehensive backend API using TypeScript, Fastify, and PostgreSQL.
- Added essential files including architecture documentation, environment configuration, and Docker setup.
- Implemented RESTful routes for managing assets, liabilities, clients, invoices, and cashflow.
- Established a robust database schema with Prisma for data management.
- Integrated middleware for authentication and error handling.
- Created service and repository layers to adhere to SOLID principles and clean architecture.
- Included example environment variables for development, staging, and production setups.
This commit is contained in:
2025-12-07 12:59:09 -05:00
parent 9d493ba82f
commit cd93dcbfd2
70 changed files with 8649 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
import {FastifyRequest, FastifyReply} from 'fastify';
import {DashboardService} from '../services/DashboardService';
import {getUserId} from '../middleware/auth';
/**
* Controller for Dashboard endpoints
*/
export class DashboardController {
constructor(private dashboardService: DashboardService) {}
async getSummary(request: FastifyRequest, reply: FastifyReply) {
const userId = getUserId(request);
const summary = await this.dashboardService.getSummary(userId);
return reply.send(summary);
}
}