{
  "name": "angular-workspace-mcp",
  "version": "1.0.0",
  "description": "Model Context Protocol configuration for Angular Workspace - PraFrota System",
  "projects": {
    "idt_app": {
      "name": "PraFrota",
      "type": "angular-application",
      "path": "projects/idt_app",
      "domains": [
        "vehicles",
        "drivers",
        "routes",
        "finances",
        "session",
        "vehicle-fine",
        "fines"
      ],
      "apis": [
        "prafrota-backend",
        "viacep",
        "mercado-live"
      ]
    },
    "escala": {
      "name": "Sistema de Escala",
      "type": "angular-application",
      "path": "projects/escala"
    },
    "cliente": {
      "name": "Aplicação Cliente",
      "type": "angular-application",
      "path": "projects/cliente"
    },
    "libs": {
      "name": "Bibliotecas Compartilhadas",
      "type": "angular-library",
      "path": "projects/libs"
    }
  },
  "contexts": {
    "architecture": {
      "description": "Arquitetura e estrutura do projeto",
      "files": [
        "MCP.md",
        "projects/idt_app/CURSOR.md",
        "angular.json",
        "tsconfig.json"
      ]
    },
    "domain-vehicles": {
      "description": "Domínio de gerenciamento de veículos",
      "files": [
        "projects/idt_app/src/app/domain/vehicles/**/*.ts",
        "projects/idt_app/src/app/domain/vehicles/**/*.html",
        "projects/idt_app/src/app/domain/vehicles/**/*.scss"
      ]
    },
    "domain-routes": {
      "description": "Domínio de gerenciamento de rotas",
      "files": [
        "projects/idt_app/src/app/domain/routes/**/*.ts",
        "mercado-live-routes-data.json"
      ]
    },
    "shared-services": {
      "description": "Serviços compartilhados",
      "files": [
        "projects/idt_app/src/app/shared/services/**/*.ts",
        "projects/idt_app/src/app/shared/interfaces/**/*.ts"
      ]
    },
    "apis": {
      "description": "Configurações de API e integrações",
      "files": [
        "proxy.conf.json",
        "projects/idt_app/src/app/http.config.ts",
        "config.ts"
      ]
    },
    "registry-pattern": {
      "description": "Registry Pattern para configurações descentralizadas",
      "files": [
        "projects/idt_app/src/app/domain/drivers/FORM_CONFIG_REFACTORING.md",
        "projects/idt_app/src/app/shared/components/tab-system/services/tab-form-config.service.ts",
        "projects/idt_app/src/app/domain/drivers/drivers.component.ts"
      ],
      "pattern": "component auto-registration with FormConfigFactory",
      "benefits": [
        "infinite scalability",
        "zero service modifications",
        "auto-registration",
        "decentralized responsibility"
      ]
    },
    "framework-protection": {
      "description": "Framework protection rules and guidelines",
      "principle": "Domain solutions first, framework changes only with authorization",
      "files": [
        ".mcp/config.json",
        "MCP.md"
      ],
      "protected-areas": [
        "shared/components",
        "shared/services",
        "shared/interfaces"
      ],
      "required-process": [
        "explain issue",
        "request authorization",
        "document breach if approved"
      ]
    },
    "remote-select": {
      "description": "Universal autocomplete component for dynamic entity selection",
      "files": [
        "projects/idt_app/src/app/shared/components/remote-select/remote-select.component.ts",
        "projects/idt_app/src/app/shared/components/remote-select/remote-select.component.html",
        "projects/idt_app/src/app/shared/components/remote-select/remote-select.component.scss",
        "projects/idt_app/src/app/shared/components/remote-select/interfaces/remote-select.interface.ts",
        "projects/idt_app/docs/components/REMOTE_SELECT_COMPONENT.md"
      ],
      "features": [
        "Autocomplete with debounce",
        "F2 modal support",
        "Reactive Forms integration",
        "Keyboard navigation",
        "Cache system",
        "Responsive design"
      ],
      "usage": "Search and select records from any domain via getEntities()",
      "integration": "Generic field type for TabFormConfig"
    },
    "color-input": {
      "description": "Specialized color selection component with visual interface",
      "files": [
        "projects/idt_app/src/app/shared/components/inputs/color-input/color-input.component.ts",
        "projects/idt_app/src/app/shared/components/inputs/color-input/color-input.component.scss"
      ],
      "features": [
        "Visual dropdown with color circles",
        "Selected color preview",
        "Clear selection button",
        "Smart overlay (closes on outside click)",
        "Responsive design",
        "Dark theme support",
        "ControlValueAccessor integration",
        "Smooth animations"
      ],
      "usage": "Color selection with object return {name: string, code: string}",
      "integration": "Field type 'color-input' in TabFormConfig"
    },
    "currency-input": {
      "description": "Specialized currency input component with automatic formatting",
      "files": [
        "projects/idt_app/src/app/shared/components/inputs/currency-input/currency-input.component.ts",
        "projects/idt_app/src/app/shared/components/inputs/currency-input/currency-input.component.html",
        "projects/idt_app/src/app/shared/components/inputs/currency-input/currency-input.component.scss",
        "projects/idt_app/src/app/shared/components/inputs/currency-input/currency-input.example.ts"
      ],
      "features": [
        "Automatic currency formatting (R$, USD, EUR, GBP)",
        "Smart input behavior (numeric only during editing)",
        "Multi-currency support with locale formatting",
        "Min/max value validation",
        "Visual currency icon",
        "Required field indicators",
        "Responsive design",
        "ControlValueAccessor integration",
        "Precision handling with centavos storage"
      ],
      "usage": "Currency value input with automatic R$ formatting and number return",
      "integration": "Field type 'currency-input' in TabFormConfig"
    },
    "textarea-input": {
      "description": "Advanced textarea component with auto-resize, character counter and validation",
      "files": [
        "projects/idt_app/src/app/shared/components/inputs/textarea-input/textarea-input.component.ts",
        "projects/idt_app/src/app/shared/components/inputs/textarea-input/textarea-input.component.html",
        "projects/idt_app/src/app/shared/components/inputs/textarea-input/textarea-input.component.scss"
      ],
      "features": [
        "Auto-resize based on content",
        "Character counter with progress bar",
        "Min/max length validation",
        "Clear content button",
        "Customizable rows and resize behavior",
        "Required field indicators",
        "Readonly state support",
        "Focus hints and tooltips",
        "ControlValueAccessor integration",
        "Responsive design with mobile optimization"
      ],
      "usage": "Multi-line text input for notes, observations and long text content",
      "integration": "Field type 'textarea-input' in TabFormConfig"
    },
    "required-fields-indicators": {
      "description": "Unified visual indicators for required form fields",
      "components": [
        "custom-input",
        "color-input",
        "kilometer-input",
        "currency-input",
        "textarea-input",
        "generic-tab-form selects",
        "remote-select",
        "multi-select"
      ],
      "features": [
        "Red asterisk (*) indicators",
        "Unified CSS styling",
        "Consistent visual pattern",
        "Improved UX",
        "Error prevention"
      ],
      "css-class": "required-indicator",
      "color": "var(--idt-danger, #dc3545)",
      "benefits": [
        "Users know which fields are required",
        "Reduces form submission errors",
        "Consistent visual feedback",
        "Accessibility improvement"
      ]
    },
    "data-table-html-rendering": {
      "description": "Safe HTML rendering in data table cells",
      "files": [
        "projects/idt_app/src/app/shared/components/data-table/data-table.component.ts",
        "projects/idt_app/src/app/shared/components/data-table/data-table.component.html"
      ],
      "features": [
        "DomSanitizer integration",
        "bypassSecurityTrustHtml for safe HTML",
        "allowHtml column configuration",
        "Color circles in vehicle table",
        "Fallback color mapping",
        "Conditional HTML rendering"
      ],
      "security": "Angular DomSanitizer ensures HTML safety",
      "usage": "Set allowHtml: true in column config + HTML in label function"
    },
    "domains": {
      "user": {
        "description": "Domain usuários - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/user/user.component.ts",
          "projects/idt_app/src/app/domain/user/user.service.ts",
          "projects/idt_app/src/app/domain/user/user.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination",
          "Photo upload sub-tab",
          "Side card panel",
          "Status badges"
        ],
        "apis": [],
        "generated": "2025-06-27T16:39:24.341Z",
        "menuPosition": "settings"
      },
      "tollparking": {
        "description": "Domain Pedágio & Estacionamento - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/tollparking/tollparking.component.ts",
          "projects/idt_app/src/app/domain/tollparking/tollparking.service.ts",
          "projects/idt_app/src/app/domain/tollparking/tollparking.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination"
        ],
        "apis": [
          {
            "field": "driverId",
            "service": "drivers",
            "type": "drivers"
          }
        ],
        "generated": "2025-07-11T14:25:48.447Z",
        "menuPosition": "vehicles"
      },
      "devicetracker": {
        "description": "Domain Rastreadores - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/devicetracker/devicetracker.component.ts",
          "projects/idt_app/src/app/domain/devicetracker/devicetracker.service.ts",
          "projects/idt_app/src/app/domain/devicetracker/devicetracker.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination",
          "Photo upload sub-tab",
          "Side card panel",
          "Kilometer input component",
          "Status badges"
        ],
        "apis": [],
        "generated": "2025-07-17T14:10:03.475Z",
        "menuPosition": "vehicles"
      },
      "fuelcontroll": {
        "description": "Domain Controle de Combustível - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/fuelcontroll/fuelcontroll.component.ts",
          "projects/idt_app/src/app/domain/fuelcontroll/fuelcontroll.service.ts",
          "projects/idt_app/src/app/domain/fuelcontroll/fuelcontroll.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination"
        ],
        "apis": [],
        "generated": "2025-08-18T13:13:20.570Z",
        "menuPosition": "vehicles"
      },
      "product": {
        "description": "Domain Produtos - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/product/product.component.ts",
          "projects/idt_app/src/app/domain/product/product.service.ts",
          "projects/idt_app/src/app/domain/product/product.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination"
        ],
        "apis": [],
        "generated": "2025-08-18T20:04:07.318Z",
        "menuPosition": "settings"
      },
      "customer": {
        "description": "Domain Clientes - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/customer/customer.component.ts",
          "projects/idt_app/src/app/domain/customer/customer.service.ts",
          "projects/idt_app/src/app/domain/customer/customer.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination",
          "Photo upload sub-tab",
          "Side card panel",
          "Status badges"
        ],
        "apis": [],
        "generated": "2025-08-22T16:40:15.300Z",
        "menuPosition": "finances"
      },
      "contract": {
        "description": "Domain Contratos - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/contract/contract.component.ts",
          "projects/idt_app/src/app/domain/contract/contract.service.ts",
          "projects/idt_app/src/app/domain/contract/contract.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination",
          "Photo upload sub-tab",
          "Side card panel",
          "Status badges"
        ],
        "apis": [],
        "generated": "2025-09-12T18:58:23.580Z",
        "menuPosition": "finances"
      },
      "person": {
        "description": "Domain Pessoas - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/person/person.component.ts",
          "projects/idt_app/src/app/domain/person/person.service.ts",
          "projects/idt_app/src/app/domain/person/person.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination",
          "Status badges"
        ],
        "apis": [],
        "generated": "2025-09-23T17:42:28.871Z",
        "menuPosition": "settings"
      },
      "driverperformance": {
        "description": "Domain Performance - Generated automatically",
        "files": [
          "projects/idt_app/src/app/domain/driverperformance/driverperformance.component.ts",
          "projects/idt_app/src/app/domain/driverperformance/driverperformance.service.ts",
          "projects/idt_app/src/app/domain/driverperformance/driverperformance.interface.ts"
        ],
        "features": [
          "BaseDomainComponent integration",
          "Registry Pattern auto-registration",
          "CRUD operations",
          "Data table with filters and pagination",
          "Status badges"
        ],
        "apis": [],
        "generated": "2025-09-30T20:32:41.371Z",
        "menuPosition": "drivers"
      }
    },
    "domain-vehicle-fine": {
      "description": "Domínio de Multas - V2.0",
      "files": [
        "projects/idt_app/src/app/domain/vehicle-fine/vehicle-fine.component.ts",
        "projects/idt_app/src/app/domain/vehicle-fine/vehicle-fine.service.ts",
        "projects/idt_app/src/app/domain/vehicle-fine/vehicle-fine.interface.ts"
      ],
      "features": {
        "baseDomainComponent": true,
        "registryPattern": true,
        "apiClientService": true,
        "footerConfig": true,
        "checkboxGrouped": false,
        "bulkActions": true,
        "dateRangeUtils": true,
        "advancedSideCard": false,
        "extendedSearchOptions": true
      }
    },
    "domain-fines": {
      "description": "Domínio de Multas - V2.0",
      "files": [
        "projects/idt_app/src/app/domain/fines/fines.component.ts",
        "projects/idt_app/src/app/domain/fines/fines.service.ts",
        "projects/idt_app/src/app/domain/fines/fines.interface.ts"
      ],
      "features": {
        "baseDomainComponent": true,
        "registryPattern": true,
        "apiClientService": true,
        "footerConfig": true,
        "checkboxGrouped": false,
        "bulkActions": true,
        "dateRangeUtils": true,
        "advancedSideCard": false,
        "extendedSearchOptions": true
      }
    }
  },
  "tools": {
    "angular-cli": {
      "description": "Angular CLI commands for development",
      "allowed-commands": [
        "ng build - Execute freely for any configuration (production, development)",
        "ng test - Execute freely for running tests",
        "ng generate - Execute freely for creating components, services, etc.",
        "npm install - Execute freely for dependencies",
        "npm run - Execute freely (except server commands)"
      ],
      "prohibited-commands": [
        "ng serve - NEVER USE! Server already running via launch.json debug mode",
        "npm start - NEVER USE! Server already running",
        "npm run serve - NEVER USE! Server already running"
      ]
    },
    "development-configuration": {
      "description": "Development server configuration - CRITICAL INFO",
      "status": "ALWAYS RUNNING via launch.json debug mode",
      "port": "4200 (localhost:4200)",
      "hot-reload": "Configured automatically",
      "debug-mode": "Active by default",
      "warning": "NEVER execute ng serve, npm start, or similar server commands!",
      "reason": "Server runs via VS Code debug configuration to avoid port conflicts"
    },
    "build-commands": {
      "description": "Build commands for production",
      "commands": {
        "prafrota": "ng build idt_app --configuration production",
        "cliente": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --configuration=production"
      }
    }
  },
  "apis": {
    "prafrota-backend": {
      "name": "PraFrota Backend API",
      "baseUrl": "https://prafrota-be-bff-tenant-api.grupopra.tech",
      "version": "v1",
      "authentication": "Bearer JWT",
      "endpoints": {
        "vehicles": "/api/v1/vehicles",
        "drivers": "/api/v1/drivers",
        "finances": "/api/v1/finances",
        "routes": "/api/v1/routes"
      }
    },
    "viacep": {
      "name": "ViaCEP API",
      "baseUrl": "https://viacep.com.br",
      "proxy": "/api/ws/*",
      "endpoint": "/ws/{cep}/json/"
    },
    "mercado-live": {
      "name": "Mercado Live Routes API",
      "description": "Multiple consolidated APIs for route management",
      "types": [
        "first_mile",
        "line_haul",
        "last_mile"
      ],
      "pagination": "client-side"
    }
  },
  "patterns": {
    "components": {
      "type": "standalone",
      "naming": "kebab-case",
      "structure": [
        "component.ts",
        "component.html",
        "component.scss",
        "component.spec.ts"
      ],
      "domain-pattern": "BaseDomainComponent with Registry Pattern",
      "auto-registration": "TabFormConfigService.registerFormConfig() in constructor"
    },
    "services": {
      "injection": "providedIn: 'root'",
      "naming": "PascalCase + Service suffix",
      "patterns": [
        "Observable",
        "HttpClient",
        "Injectable"
      ],
      "registry-pattern": "Map<string, FormConfigFactory> for decentralized configs"
    },
    "interfaces": {
      "naming": "PascalCase",
      "location": "shared/interfaces/",
      "suffix": ".interface.ts"
    },
    "forms": {
      "type": "reactive",
      "builder": "FormBuilder",
      "validation": "Validators",
      "configuration": "component-specific with auto-registration",
      "advanced-features": {
        "conditional-validation": "Validation applied only when field.required = true",
        "object-serialization": "Proper handling of complex objects with ngValue",
        "required-indicators": "Visual asterisk (*) for required fields",
        "color-input": "Specialized component for color selection",
        "html-rendering": "Safe HTML in data table cells with DomSanitizer"
      },
      "validation-patterns": {
        "conditional": "createOptionValidator checks field.required before applying rules",
        "object-support": "returnObjectSelected fields preserve object structure",
        "primitive-support": "Standard validation for string/number fields"
      },
      "ui-improvements": {
        "required-indicators": {
          "css-class": "required-indicator",
          "color": "var(--idt-danger, #dc3545)",
          "components": [
            "custom-input",
            "color-input",
            "kilometer-input",
            "currency-input",
            "textarea-input",
            "generic-tab-form",
            "remote-select",
            "multi-select"
          ]
        },
        "color-selection": {
          "component": "color-input",
          "features": [
            "visual-dropdown",
            "color-preview",
            "clear-button",
            "responsive-design"
          ]
        },
        "currency-formatting": {
          "component": "currency-input",
          "features": [
            "automatic-formatting",
            "multi-currency-support",
            "precision-handling",
            "visual-currency-icon"
          ]
        }
      }
    },
    "architecture": {
      "domain-responsibility": "each component manages its own form configuration",
      "service-responsibility": "registry and generic utilities only",
      "scalability": "infinite domains without service modifications",
      "priority": "Registry > Service generic > Default"
    },
    "framework-protection": {
      "principle": "Framework components should NEVER be modified for simple domain-specific issues",
      "workflow": [
        "1. Try solving in domain component first",
        "2. If framework change seems needed, explain the issue to developer",
        "3. Request explicit authorization before modifying shared/framework components",
        "4. Create breach documentation explaining why framework modification was necessary",
        "5. Consider if the change benefits multiple domains or is domain-specific"
      ],
      "protected-paths": [
        "projects/idt_app/src/app/shared/components/**",
        "projects/idt_app/src/app/shared/services/**",
        "projects/idt_app/src/app/shared/interfaces/**"
      ],
      "examples": {
        "correct": "Adding statusField configuration in vehicles.component.ts sideCard config",
        "incorrect": "Modifying generic-tab-form.component.ts to handle vehicle-specific status logic"
      },
      "reasoning": "Framework integrity must be maintained for scalability and maintainability across all domains"
    }
  },
  "data-mapping": {
    "mercado-live-routes": {
      "source-types": [
        "FirstMileRoute",
        "LineHaulRoute",
        "LastMileRoute"
      ],
      "target-type": "MercadoLiveRoute",
      "mappers": {
        "first_mile": "mapFirstMileRoute",
        "line_haul": "mapLineHaulRoute",
        "last_mile": "mapLastMileRoute"
      },
      "field-mappings": {
        "vehicleType": {
          "FirstMileRoute": "vehicleType",
          "LineHaulRoute": "vehicle_type",
          "LastMileRoute": "vehicle.description"
        },
        "locationName": {
          "FirstMileRoute": "facilityName",
          "LineHaulRoute": "site_id",
          "LastMileRoute": "facilityId"
        },
        "driverName": {
          "FirstMileRoute": "driverName",
          "LineHaulRoute": "drivers[0].name",
          "LastMileRoute": "driver.driverName"
        }
      }
    }
  },
  "conventions": {
    "files": "kebab-case",
    "classes": "PascalCase",
    "properties": "camelCase",
    "constants": "SCREAMING_SNAKE_CASE",
    "directories": "kebab-case"
  },
  "development": {
    "node-version": "20.x",
    "angular-version": "19.2.x",
    "typescript-version": "5.5.x",
    "package-manager": "npm"
  },
  "onboarding": {
    "new-developer-guide": {
      "description": "Complete onboarding system for new developers",
      "files": [
        "projects/idt_app/docs/ONBOARDING_NEW_DOMAIN.md",
        "scripts/create-domain.js"
      ],
      "prerequisites": [
        "Branch main updated locally",
        "Git configured with @grupopralog.com.br email",
        "Node.js installed"
      ],
      "interactive-questions": [
        "Domain name (singular, lowercase)",
        "Sidebar menu position",
        "Photo sub-tab inclusion",
        "Side card requirement",
        "Specialized components (kilometer, color, status)",
        "Remote-select fields for API integration"
      ],
      "auto-generation": [
        "Branch creation with pattern feature/domain-[name]",
        "Component with BaseDomainComponent inheritance",
        "Service with API integration",
        "TypeScript interfaces",
        "HTML templates",
        "SCSS styles",
        "Registry pattern auto-registration",
        "Documentation"
      ],
      "branch-management": {
        "pattern": "feature/domain-[domain-name]",
        "auto-checkout": true,
        "conflict-handling": "Ask user for existing branches",
        "description": "Automatic branch creation with functionality summary"
      },
      "framework-explanation": "Automatic screen generation framework providing listing, registration and editing capabilities",
      "usage": "node scripts/create-domain.js",
      "full-automation": [
        "System routing integration (app.routes.ts)",
        "Sidebar menu integration (sidebar.component.ts)",
        "MCP configuration updates (.mcp/config.json)",
        "Automatic compilation and validation",
        "Automatic commit with structured messages",
        "Branch creation and management"
      ],
      "express-mode": {
        "description": "Ultra-fast domain creation via command line arguments",
        "script": "scripts/create-domain-express.js",
        "usage": "npm run create:domain:express -- <name> <display> <position> [flags]",
        "flags": [
          "--photos (Sub-tab de fotos)",
          "--sidecard (Side card lateral)",
          "--kilometer (Campo quilometragem)",
          "--color (Campo cor)",
          "--status (Campo status)",
          "--commit (Commit automático)"
        ],
        "examples": [
          "npm run create:domain:express -- products Produtos 2",
          "npm run create:domain:express -- contracts Contratos 3 --photos --sidecard --color --status --commit"
        ],
        "time": "30 seconds for complete domain creation"
      }
    },
    "generation-fixes": {
      "description": "Documented fixes for automatic domain generation issues",
      "files": [
        "scripts/FIXES_DOMAIN_GENERATION.md",
        "DOMAIN_GENERATION_FIXES_SUMMARY.md"
      ],
      "identified-issues": [
        "HTML template diverging from drivers.component.html pattern",
        "SideCard configuration missing or incomplete",
        "Multiple sub-tabs created when not requested",
        "Fields structure outside sub-tabs (legacy pattern)",
        "Fields created without Swagger API documentation validation",
        "Service using HttpClient directly instead of ApiClientService",
        "Possibility of using inline templates/styles (inadequate for ERP SaaS)"
      ],
      "corrections": [
        "Enforce drivers.component.html template pattern",
        "Complete sideCard configuration with statusConfig and displayFields",
        "Control sub-tab creation based on user input",
        "Modern fields structure within sub-tabs",
        "Mandatory Swagger consultation for field validation",
        "Service using ApiClientService and implementing DomainService interface",
        "Always use separate files for HTML and SCSS (ERP SaaS standard)"
      ],
      "template-pattern": {
        "html": "Standard drivers.component.html with tab-system events",
        "sideCard": "Complete configuration with status, image, and display fields",
        "fields": "Modern structure with sub-tab organization",
        "validation": "Swagger API documentation required for all fields"
      },
      "erp-saas-standards": {
        "file-structure": "Always separate files for HTML, SCSS, TypeScript",
        "html-file": "Structured template with domain-container and main-content",
        "scss-file": "Advanced SCSS with variables, responsive design, print styles",
        "reasoning": "ERP SaaS requires maintainability, scalability, team collaboration",
        "features": [
          "CSS Variables for themes",
          "Responsive design for tablets/mobile",
          "Print styles for reports",
          "SCSS mixins and functions",
          "Component-specific styles isolation"
        ]
      },
      "quality-assurance": [
        "Compare generated HTML with drivers.component.html",
        "Verify sideCard completeness",
        "Validate field existence in Swagger documentation",
        "Test sub-tab functionality",
        "Confirm event binding in template",
        "Verify service uses ApiClientService and implements DomainService",
        "Test CRUD operations compatibility with BaseDomainComponent"
      ]
    }
  },
  "recent-improvements": {
    "version": "2024.12.13",
    "features": [
      {
        "name": "Color Input Component",
        "description": "Visual color selection with dropdown interface",
        "type": "component",
        "files": [
          "projects/idt_app/src/app/shared/components/inputs/color-input/"
        ],
        "benefits": [
          "Improved UX",
          "Visual feedback",
          "Object-based selection"
        ]
      },
      {
        "name": "Required Fields Indicators",
        "description": "Unified visual indicators for required form fields",
        "type": "ui-improvement",
        "components": [
          "custom-input",
          "color-input",
          "kilometer-input",
          "generic-tab-form",
          "remote-select",
          "multi-select"
        ],
        "benefits": [
          "Better UX",
          "Error prevention",
          "Consistent design",
          "Accessibility"
        ]
      },
      {
        "name": "Data Table HTML Rendering",
        "description": "Safe HTML rendering in table cells with color circles",
        "type": "enhancement",
        "files": [
          "projects/idt_app/src/app/shared/components/data-table/"
        ],
        "benefits": [
          "Visual data representation",
          "Color circles in vehicle table",
          "Security with DomSanitizer"
        ]
      },
      {
        "name": "Conditional Validation",
        "description": "Smart validation that only applies to required fields",
        "type": "logic-improvement",
        "benefits": [
          "Better performance",
          "Flexible forms",
          "Reduced false errors"
        ]
      },
      {
        "name": "Object Serialization Fix",
        "description": "Proper handling of complex objects in form fields",
        "type": "bug-fix",
        "benefits": [
          "Correct data submission",
          "Object preservation",
          "API compatibility"
        ]
      }
    ],
    "impact": {
      "ux": "Significantly improved user experience with visual indicators and color selection",
      "performance": "Optimized validation and rendering processes",
      "maintainability": "Unified patterns across all form components",
      "security": "Safe HTML rendering with Angular DomSanitizer"
    }
  },
  "documentation": {
    "main": "MCP.md",
    "project-specific": "projects/*/CURSOR.md",
    "api-docs": "Internal documentation in services",
    "readme": "README.md"
  }
}