Type 1 diabetes (T1D1) has a genetic and environmental component. Having first-degree relatives with T1D or other autoimmune diseases such as thyroiditis, celiac disease or Addison's disease increases the risk, especially if the HLA-DR3 and HLA-DR4 genes are present. Environmental factors such as viral infections, alterations in the gut microbiota and certain elements in the early diet can trigger the autoimmune response.