How rishan99/hbmvp works
Main Components
A. API Layer (Presentation)
• Controllers Package
• AuthController
• PropertyController
• PropertyTypeController
• RoleController
B. Business Layer
• Services Package
• AuthService
• PropertyService
• PropertyTypeService
• RoleService
• DTOs Package
• LoginDto
• PropertyDto
• PropertyTypeDto
• RegisterDto
• etc.
• Mappers Package
C. Core Layer
• Entities
• ApplicationUser
• Property
• PropertyImage
• PropertyType
• Interfaces/Repositories
• IAuthRepository
• IPropertyRepository
• IPropertyTypeRepository
• Context
• AppDbContext
D. Infrastructure Layer
• Repository Implementations
• AuthRepository
• PropertyRepository
• PropertyTypeRepository
┌─────────────────────────────────────────────────────────┐
• Client Applications │
• ┘
• ↓ HTTP
┌─────────────────────────────────────────────────────────┐
• API Layer │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• Auth │ │ Property │ │PropertyType │ │
• Controller │ │ Controller │ │ Controller │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────┐
• Business Layer │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• Services │ │ DTOs │ │ Mappers │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────┐
• Core Layer │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• Entities │ │ Repositories │ │ Context │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────┐
• Infrastructure Layer │
• ┌─────────────────────┐ ┌──────────────────────┐ │
• Repository Impl │ │ External Services │ │
• ┘ └──────────────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────┐
• Database │
• ┘
Additional Elements
A. Cross-Cutting Concerns:
• Authentication/Authorization
• Logging
• Exception Handling
B. External Services:
• File Storage for Property Images
• JWT Token Service
Important Notes
• Dependency direction (always pointing inward)
• Clean architecture boundaries
• Notes about the authentication flow
• Database relationships between entities
Technical Details to Highlight
• .NET 7.0 Framework
• Entity Framework Core
• JWT Authentication
• RESTful API endpoints
• CRUD operations for Properties and PropertyTypes
• Image handling capabilities