Diabetic Retinopathy (DR) is an eye condition triggered by Diabetes Mellitus (DM). It could be detrimental to diabetic patients since it may lead to permanent blindness if they do not receive early treatment. However, the risk of getting DR among DM patients can be preliminarily identified using patients' risk factors, including age, gender, body mass index (BMI), systemic comorbidities and DM-related complications. This paper presents the prediction of diabetic retinopathy using machine learning algorithms based on risk factors. Data collection was obtained from the Department of Ophthalmology, Faculty of Medicine, UiTM. The data is then processed and trained using machine learning algorithms such as logistic regression, support vector machine, and k-nearest neighbour. These machine-learning algorithms are executed with different parameters and yield different sensitivity, specificity, and accuracy values based on the training and testing data. The logistic regression model with a random state value of 11 and training and testing sizes in the ratio of 90:10 has achieved 83.78% accuracy, the highest accuracy of other models. Then, we develop a web-based application that will later assist healthcare organisations in predicting DR among patients and enhancing the DR screening workflow without executing the eye screening procedure. This system implementation aims to assist medical staff, doctors, physicians, and at-risk patients.