---
name: frontend_doctor
kind: function
lang: bash
domain: infra
version: "1.0.0"
purity: impure
signature: "frontend_doctor(project_dir: string) -> diagnostics_stdout"
description: "Diagnostica la salud de un proyecto frontend Mantine. Verifica Node, React, Mantine, PostCSS, TypeScript, vite.config y detecta residuos de shadcn/@base-ui. Imprime tabla de checks con exit code 0/1."
tags: [frontend, mantine, doctor, diagnostics, health, validation, pendiente-usar]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: []
params:
  - name: project_dir
    desc: "directorio del proyecto frontend con package.json"
output: "tabla de checks con ✓/✗ por cada validación y resumen final"
tested: false
tests: []
test_file_path: ""
file_path: "bash/functions/infra/frontend_doctor.sh"
---

## Ejemplo

```bash
# Diagnosticar un proyecto
bash frontend_doctor.sh ./apps/rapid_dashboards/frontend

# Output:
# === Frontend Doctor: ./apps/rapid_dashboards/frontend ===
#
#   ✓  Node >= 18                          22.12.0
#   ✓  Package manager detected            pnpm
#   ✓  node_modules present
#   ✓  @mantine/core                       7.17.0
#   ✓  @mantine/hooks
#   ✓  @mantine/charts
#   ✓  React >= 18                         19.2.4
#   ✓  postcss.config present
#   ✓  TypeScript >= 5                     6.0.2
#   ✓  vite.config present
#   ✓  No shadcn residual
#   ✓  No @base-ui residual
#
#   Resultado: todo OK
```

## Notas

Checks informativos, no modifica nada. Util para validar que un proyecto esta correctamente configurado despues de instalar Mantine o migrar desde shadcn. Exit code 0 si todo OK, 1 si hay problemas.
