How nanfengovo/overallauth-webapi works
Main Components
• Frontend: Represent the overallauth2.0-vue project as a Vue-based client that handles the presentation and user interactions for login, menu display, and panel/dashboard.
• API Gateway / Controllers: In the OverallAuth-WebApi project, the Controllers directory houses the REST endpoints (for example, the controllers under Sys for menus and users).
• Plug-in System: The “PlugIn” folder in OverallAuth-WebApi shows that the system uses cross-cutting plugins (for AOP, exception handling, JWT, Swagger, etc.). This is a key architectural element to capture.
• Business & Domain Layer:
– CoreDomain contains core business logic (e.g., MenuCore in BusinessCore).
– DomainService encapsulates business services and defines interfaces (like ISysMenuService and ISysUserService) along with service implementations.
• Data Access Layer (Infrastructure):
– The Infrastructure folder shows repository implementations (e.g., SysMenuRepository, SysUserRepository) and database connectivity (with accompanying SQL files).
• Model: The Model folder contains business and domain models that represent the data structure used across the solution.
• Utility: Contains common utilities (like enumerations, exception handling helpers) that are used by other components.
• External Services & Settings: This includes configuration files (appsettings.json, JwtSettingModel.cs) which indicate use of JWT for authentication and potentially other external services.
– A “Controllers” component for handling incoming HTTP requests.
– “CoreDomain” (holding business logic and core functionalities)
– “DomainService” (providing services such as SysMenuService and SysUserService)
Controllers to the DomainService, and from there to CoreDomain.
• “Model” and “Utility” components side by side. Explain that:
– “Utility” provides common enumerations, helper functions, and error/exception handling.
• Optionally, indicate external configuration (JWT settings, database connection strings) that influence several layers.
Architectural Patterns/Principles
• Layered Architecture: Clearly separate presentation (controllers and frontend), business/domain logic, and data access.
• Dependency Inversion: Interfaces in DomainService and IRepository indicate a decoupled design where higher-level modules depend on abstractions.
• Plug-In/Extensibility: The PlugIn folder shows a design that supports cross-cutting concerns.
• Separation of Concerns: Distinct projects handle business rules (CoreDomain, DomainService), data models (Model), and infrastructure (Infrastructure).