How cristianorc/fluxo-de-caixa works
• End Users accessing the Web App.
• External services for PDF rendering (Gotenberg), caching (Redis), and messaging (RabbitMQ).
• Third-party or cloud-based infrastructure (if any are used, e.g., Azure cloud components).
• Use clear labels to note that the system supports user wallet creation, transactions, and end-of-day reporting.
• Web Application (App): A React-based front-end that serves the user interface.
• API (FluxoDeCaixa.Api): A .NET backend service handling transactions, wallet management, and exposing RESTful endpoints. It is structured according to Domain-Driven Design (with layers like Domain, Application, and Infrastructure), as evidenced by directories such as Domain, Application, Infra, and UnitTest.
• API Report (FluxoDeCaixa.Api.Report): An Azure Functions-based service that generates daily reports by consuming data and orchestrating PDF generation.
• Databases: PostgreSQL is used for transactional and wallet data. MongoDB is also listed in the README for local setups, so include it where appropriate.
• Infrastructure Dependencies:
• RabbitMQ (as configured in the Infra/MessageBus folder) for event-driven messaging.
• Redis for distributed locks and caching (as noted in the local setup instructions).
• Gotenberg for PDF processing (port 3000), used by the API Report service.
• The Web App communicates with both the API and API Report via HTTP.
• The API interacts with the databases for transaction persistence.
• The API and possibly the API Report publish or subscribe to events via RabbitMQ.
• The API Report calls the PDF rendering service, which in turn may send back generated PDFs.
• Within the API container:
• Controllers (e.g., BalanceController, BookEntryController) handling HTTP requests.
• Application Services (under Api/FluxoDeCaixa.Application/Services) orchestrating business use cases such as processing transactions and handling distributed locks.
• Domain Layer (entities, value objects, domain services) and how it interacts with Infrastructure (repositories and EF configurations in Api/FluxoDeCaixa.Infra).
• For the API Report container:
• HTTPTrigger and QueueTrigger functions that serve as entry points.
• How these functions delegate work to Report Services (like IReportService/ReportService) and how they use external HTTP calls (for example, to the PDFRenderService in the Infra folder).
Technologies and Frameworks
• Container/component with the underlying technology:
• Frontend: React, npm (with Vite).
• Backend API: .NET 7, ASP.NET Core, Entity Framework.
• API Report: .NET 7, Azure Functions.
• Infrastructure: PostgreSQL, MongoDB, RabbitMQ, Redis, Gotenberg.
• CI/CD: Docker, GitHub Actions.
• Mention that Docker containers are used (evidenced by Dockerfiles and docker-compose.yaml), which helps in visualizing the deployment architecture.