How kopilkaiser/bankapplicationku works
Main components
• Presentation Layer:
• Client/browser: Users interact with web pages.
• Views: Razor (.cshtml) files in the Views folder (organized by Account, Customer, Home, Shared layouts etc.).
• Controllers: Under the Controllers folder (AccountController.cs, CustomerController.cs, HomeController.cs) that receive HTTP requests and orchestrate responses.
• Business / Application Layer:
• Base classes and Extensions: “Base” folder objects (BaseController.cs, BaseRepository.cs) and extension methods to configure services.
• Services: Contain business logic and cross-cutting concerns like session management and password encryption (SessionManager, PasswordEncrypter, AutoMapperProfile, etc.).
• ViewModels: Responsible for shaping data for the views.
• Data Access Layer:
• Database context and repositories: “Database” folder contains BankAppDbContext.cs and Repository subfolder with classes (AccountRepository, CustomerRepository, TransactionRepository) that encapsulate data access logic using Entity Framework Core.
• Migrations: All Migration files detailing database changes and schema snapshots.
• Interfaces: Abstraction (IBaseRepository) to enforce repository contracts.
• Domain / Model Layer:
• Models: In the Models folder (Bank, Account, Customer, DebitAccount, SavingAccount, Transaction, etc.) representing the domain entities.
• Configuration and Settings:
• appsettings.json (and environment-specific JSON files) for configuration.
• Settings: Specific application settings (CustomerDetailsSetting, GoogleApiSettings).
• Infrastructure and Third-Party Components:
• External libraries: Includes Bootstrap, JQuery, Font Awesome, PopperJS, etc., provided under wwwroot.
• Logging: NLog configuration file (nlog.config).
• External API: References to the Google Map JavaScript API.
• From the web server, show a flow to Controllers which process requests.
• Repositories interact with the EF Core DbContext (BankAppDbContext) which then communicates with the SQL Server database.
• External integrations (e.g., Google Maps API, NLog) should be depicted as separate components that interface with the application (e.g., NLog attached to various layers for logging; Google Maps invoked by views or specific controllers).
Architectural Patterns and Key Design Principles
• MVC Pattern: Emphasize the separation between Models, Views, and Controllers.
• Dependency Injection: Note the use of Microsoft’s built-in DI framework (with extension methods from the Extensions folder) that injects dependencies (e.g., services, repositories) into controllers.
• Code-First Entity Framework Approach: Include the migrations and the DbContext to show how the domain models drive the database schema.
• Modularity and Configuration: The use of extension methods for configuring services, seeding data, and utility functions.