How cfqueiroz/b3-invest works
Main components
• Front-End Client: The Angular application in “calc-b3” (including its app module, components such as “calculadora-cdb.component”, services like “calculadora-cdb.service”, and configuration files found in package.json and angular.json).
• Back-End API: The ASP.NET application in “b3-invest” which contains:
• Controllers (e.g., CdbController, HomeController) that expose HTTP endpoints.
• Services (e.g., CdbService) and interfaces (e.g., ICdbService) encapsulating business logic.
• Configuration and startup classes (e.g., from App_Start such as UnityConfig, RouteConfig, WebApiConfig) that set up dependency injection (using Unity) and routing.
• The “Areas/HelpPage” which documents the API.
• Testing Suite: The “b3-invest.Tests” project that contains tests for controllers and services.
• External Entities: End user’s browser accessing the front-end and making HTTP calls to the API.
System relationships and interactions
• Within the back-end API, illustrate the separation of concerns by showing:
• Controllers handling incoming requests.
• Services implementing business logic (using dependency injection configured via Unity).
• Models (e.g., CdbRequest and CdbResponse) used to transfer data between layers.
Architectural patterns and principles
• Use the Model-View-Controller (MVC) pattern on the back-end:
• Controllers for handling HTTP requests.
• Services and interfaces for business logic abstraction.
• Models for data representation.
• Use of dependency injection (via “UnityConfig”) in the ASP.NET project.
• On the front-end, note that Angular’s component-based and service-driven architecture is used.
• The separation between the API and the front-end (client-server architecture) is a key principle here.
Relevant technologies and frameworks
• ASP.NET Web API (including routing, configuration, and DI via Unity).
• Angular framework for the front-end, along with its TypeScript-based components and services.
• Visual Studio 2022 as the development environment and test execution tool.
• Standard testing frameworks utilized in the “b3-invest.Tests” project.