Weight loss reduces the risk of type 2 diabetes mellitus (T2D) in overweight and obese individuals. Although the physiological response to food varies among individuals, standard dietary interventions use a "one-size-fits-all" approach. The Personal Diet Study aims to evaluate two dietary interventions targeting weight loss in people with prediabetes and T2D: (1) a low-fat diet, and (2) a personalized diet using a machine-learning algorithm that predicts glycemic response to meals. Changes in body weight, body composition, and resting energy expenditure will be compared over a 6-month intervention period and a subsequent 6-month observation period intended to assess maintenance effects. The behavioral intervention is delivered via mobile health technology using the Social Cognitive Theory. Here, we describe the design, interventions, and methods used.