How 1tahaahmed/propertymanagement works
PropertyManagement is a multi-tenant real-estate management API. The principal workflow is an authenticated organization member managing properties and units, maintaining resident records and emergency contacts, and creating or progressing leases. The API uses CQRS application handlers over domain entities, with infrastructure providing EF Core persistence, identity, JWTs and SMTP; tenant filters and permission policies enforce isolation and access. Edges are limited to controller dispatches, sampled handler-to-repository calls, and tenant-context behavior shown in the excerpts or README; other feature wiring is not inferred.
Main entry points: ApplicationDbContext.cs SQL Server data · Program.cs REST API · AuthController.cs Authentication endpoints · Authentication Authentication workflows
Components 26
API and access
- REST API
src/PropertyManagement.Api/Program.cs - Permission policies
src/PropertyManagement.Api/Authorization/PermissionAuthorizationHandler.cs - Authentication endpoints
src/PropertyManagement.Api/Controllers/AuthController.cs - Email confirmation API
src/PropertyManagement.Api/Controllers/EmailConfirmationController.cs - Property endpoints
src/PropertyManagement.Api/Controllers/PropertiesController.cs - Unit endpoints
src/PropertyManagement.Api/Controllers/UnitController.cs - Resident endpoints
src/PropertyManagement.Api/Controllers/ResidentsController.cs - Lease endpoints
src/PropertyManagement.Api/Controllers/LeasesController.cs
Identity and onboarding
- Authentication workflows
src/PropertyManagement.Application/Features/Authentication - Email verification
src/PropertyManagement.Application/Features/Authentication/EmailConfirmation - Identity service
src/PropertyManagement.Infrastructure/Identity/IdentityService.cs - JWT generation
src/PropertyManagement.Infrastructure/Common/Security/JwtTokenGenerator.cs
Property portfolio
- Property management
src/PropertyManagement.Application/Features/Properties - Unit management
src/PropertyManagement.Application/Features/Units - Property and unit rules
src/PropertyManagement.Domain/Entities/Properties/Property.cs - Property and unit repositories
src/PropertyManagement.Infrastructure/Persistence/Repositories/PropertyRepository.cs
Residents and leases
- Resident management
src/PropertyManagement.Application/Features/Residents - Resident rules
src/PropertyManagement.Domain/Entities/Residents/Resident.cs - Resident repository
src/PropertyManagement.Infrastructure/Persistence/Repositories/ResidentRepository.cs - Lease lifecycle
src/PropertyManagement.Application/Features/Leases - Lease rules
src/PropertyManagement.Domain/Entities/Leases/Lease.cs
Application and infrastructure
- CQRS and validation
src/PropertyManagement.Application/Common/Behaviors/ValidationBehavior.cs - Tenant context
src/PropertyManagement.Infrastructure/Common/Security/CurrentUser.cs - SQL Server data
src/PropertyManagement.Infrastructure/Persistence/ApplicationDbContext.cs - SMTP email
src/PropertyManagement.Infrastructure/Email/SmtpEmailSender.cs
Other components
- Organization member
Connections 19
- Organization member → REST API: sends requests
README.md - REST API → Permission policies: authorizes
README.md - Organization member → Authentication endpoints: logs in or registers
README.md - Authentication endpoints → Authentication workflows: dispatches
src/PropertyManagement.Api/Controllers/AuthController.cs - Email confirmation API → Email verification: dispatches
- Authentication workflows → Identity service: uses identity
- Identity service → JWT generation: generates tokens
- Property endpoints → Property management: dispatches
- Unit endpoints → Unit management: dispatches
src/PropertyManagement.Api/Controllers/UnitController.cs - Resident endpoints → Resident management: dispatches
src/PropertyManagement.Api/Controllers/ResidentsController.cs - Lease endpoints → Lease lifecycle: dispatches
src/PropertyManagement.Api/Controllers/LeasesController.cs - Property management → Property and unit repositories: reads properties
src/PropertyManagement.Application/Features/Properties/GetProperties/GetPropertiesQueryHandler.cs - Unit management → Property and unit repositories: reads units
src/PropertyManagement.Application/Features/Units/GetById/GetUnitByIdQueryHandler.cs - Resident management → Resident repository: reads resident contacts
src/PropertyManagement.Application/Features/Residents/EmergencyContacts/GetEmergencyContactsQueryHandler.cs - Tenant context → SQL Server data: scopes tenant data
src/PropertyManagement.Infrastructure/Persistence/ApplicationDbContext.cs - Property and unit rules → SQL Server data: persists entities
src/PropertyManagement.Infrastructure/Persistence/ApplicationDbContext.cs - Resident rules → SQL Server data: persists entities
src/PropertyManagement.Infrastructure/Persistence/ApplicationDbContext.cs - Lease rules → SQL Server data: persists entities
src/PropertyManagement.Infrastructure/Persistence/ApplicationDbContext.cs - Email verification → SMTP email: sends confirmation