Knowledge Domain Database - Real Estate
How does the domain work before writing a line of code? Choose a document from the left tree: each page explains part of the model.
Business Rules - Real Estate Domain (EN)
Core business rules of the Italian real estate domain. Code BR-NNN, priority High/Medium/Low.
> Fiscal disclaimer: Rules citing tax rates or fiscal amounts (IMU, cedolare secca, plusvalenza) are for informational purposes only. For tax decisions, consult a qualified professional. Source: Agenzia delle Entrate (2024).
---
BR-001: Unique immovable property identification via cadastral code
Code: BR-001
Name: Unique cadastral identification
Description: Every property must be identified in the system via the full cadastral code (Municipality + section + sheet + parcel + sub-unit). The postal address is not a reliable unique identifier.
Rationale: The land registry (catasto) is the official register of Italian properties; the cadastral code is the only unambiguous, legally binding identifier.
Priority: High
Traceability: schema.sql particelle_catastali (UNIQUE comune_id, sezione, foglio, particella, subalterno), Agenzia delle Entrate
BR-002: Monetary values as integer cents
Code: BR-002
Name: Integer cent monetary representation
Description: All monetary values in the domain (sale prices, rental fees, deposits, taxes, commissions, security deposits) must be represented as integer cents (EUR).
Rationale: IEEE 754 floating-point types introduce rounding errors over millions of transactions. €350,000 = 35,000,000 cents; always exact.
Priority: High
Traceability: schema.sql prezzo_cents BIGINT, schema.prisma *Cents: bigint
BR-003: Property status via explicit state machine
Code: BR-003
Name: Property state machine
Description: Property status follows an explicit state machine with validated transitions. Valid states: AVAILABLE → UNDER_OFFER → UNDER_CONTRACT → COMPLETION_IN_PROGRESS → SOLD / WITHDRAWN. Multiple boolean flags (isForSale, isSold, isRented) are forbidden.
Rationale: Multiple boolean flags create incoherent combinations (e.g., isForSale = true and isSold = true simultaneously). The state machine ensures domain consistency.
Priority: High
Traceability: schema.sql property_status ENUM, state-machines/property-lifecycle.md
BR-004: Security deposit maximum 3 months' rent
Code: BR-004
Name: Security deposit limit
Description: The security deposit in a residential rental agreement must not exceed 3 months of the agreed rent.
Rationale: Mandatory statutory limit (art. 11 L. 392/1978). Violation makes the excess clause void (not the entire contract).
Priority: High
Traceability: schema.sql CHECK (deposito_cauzionale_cents <= canone_mensile_cents * 3), L. 392/1978 art. 11
BR-005: EPC certificate required for sale and rental
Code: BR-005 Name: Mandatory EPC (Energy Performance Certificate) Description: Every property marketed for sale or rental must have a valid EPC (Attestato di Prestazione Energetica - APE) that has not expired (max 10 years). Missing or expired EPC prevents listing publication and invalidates the contract. Rationale: Legal obligation (D.Lgs. 192/2005). The EPC must be attached to the sale or rental contract, otherwise the contract is void. Priority: High Traceability: use-cases.md UC-08, D.Lgs. 192/2005
BR-006: Rental contract registration within 30 days
Code: BR-006 Name: Rental registration deadline Description: The landlord (or authorized representative) must register the rental contract with the Agenzia delle Entrate within 30 days of the signing date. Rationale: Statutory obligation. Failure to register results in: administrative penalties, loss of fiscal benefits (cedolare secca), limited enforceability against third parties. Priority: High Traceability: business-processes.md BP-PROC-05, Agenzia delle Entrate 2024
BR-007: Cadastral and urban planning conformity declared at completion
Code: BR-007 Name: Dual conformity at completion (rogito) Description: Before completion (rogito), the seller must declare cadastral conformity (the deposited floor plan matches the as-built state) and urban planning conformity (property built in conformity with construction permits). Non-conformities must be regularized before completion. Rationale: Legal obligation (D.L. 78/2010 for cadastral conformity; art. 46 DPR 380/2001 for urban planning conformity). False declaration is a criminal offence. Priority: High Traceability: business-processes.md BP-PROC-01 Phase 6, D.L. 78/2010, DPR 380/2001
BR-008: Mandatory fiscal disclaimer on fiscal-lexicon content
Code: BR-008 Name: Fiscal disclaimer Description: Any published fiscal data (IMU rates, cedolare secca, capital gains tax, registration tax, TARI, cadastral income) must be accompanied by: (1) disclaimer "This information is for informational purposes only - for tax decisions consult a qualified professional", (2) institutional source, (3) reference year. Rationale: Compliance with EU Directive 2019/770 (digital content). Prevention of liability for unauthorized tax advice. Priority: High Traceability: plan 39-09 threat model T-39-09-FISCAL, EU Directive 2019/770
BR-009: Maximum 80% LTV for standard mortgages
Code: BR-009 Name: Maximum mortgage LTV Description: The Loan-to-Value (LTV) ratio between the mortgage amount and the appraised property value must not exceed 80% for standard mortgage loans. Rationale: Bank of Italy and EBA Guidelines on Loan Origination. LTV > 80% requires additional guarantees (Consap Fund) or more restrictive conditions. Priority: Medium Traceability: data.jsonl re-en-data-007/008, Banca d'Italia 2024
BR-010: OMI data with reference semester
Code: BR-010 Name: OMI data traceability Description: Every OMI price quotation (EUR/sqm value) must be associated with its reference semester (e.g., "2024-S1") and OMI zone (e.g., "B1-Milan"). OMI data is updated every 6 months; the cache TTL must be 180 days. Rationale: OMI data changes every semester. Publishing outdated data without indicating the semester misleads users. Priority: Medium Traceability: corpus.jsonl re-en-corp-021, Agenzia delle Entrate OMI 2024