## 1 Introduction  
Environmental care, particularly in water preservation, has driven the development of advanced wastewater treatment methods, especially for effluents from industries such as textiles. Colorants, a subset of approximately seventy thousand widely used and five million known contaminating substances globally, pose a significant challenge due to their high molecular weight, complex structures, and high solubility [1, 2]. When discharged into water bodies, these substances severely impact aquatic and terrestrial ecosystems, including human health [3]. The rising complexity of dye degradation is attributed to the increasing number of colorant components and their concentrations in wastewater [4]. To address this issue, environmentally friendly methods have been developed, including the application ofphotocatalytic reactors and advanced oxidation technologies (AOTs) [5; 6]. AOTs have proven effective in reducing the environmental impact of colorants by leveraging solar energy to lower operational costs [7; 8]. Among these, heterogeneous photocatalysis using titanium dioxide (TiO\({}_{2}\)) has demonstrated exceptional efficiency in degrading dye-contaminated effluents [9; 10; 11; 12; 13]. Successful implementation of these methods requires consideration of the water's physicochemical properties [14]. To enhance the understanding of advanced oxidation technologies (AOTs), it is important to differentiate between homogeneous and heterogeneous types. Homogeneous AOTs, such as UV/H\({}_{2}\)O\({}_{2}\), Fenton, photo-Fenton, electro-Fenton, UV/S\({}_{2}\)O\({}_{8}\)\({}^{2-}\), and UV/HSO\({}_{5}\)\({}^{-}\), rely on soluble catalysts or reagents to generate reactive species like hydroxyl radicals for pollutant degradation. These processes are widely used in wastewater treatment and have been shown to be effective in removing pollutants [15; 16; 17]. However, one limitation of homogeneous AOTs is the potential for secondary pollution caused by using soluble catalysts, and the need for precise control over reagent concentrations. On the other hand, heterogeneous AOTs, such as TiO\({}_{2}\) photocatalysis [8], heterogeneous Fenton reagent photocatalysis [9], and plasma degradation processes [18], utilize solid catalysts, which present several advantages. These processes are eco-friendly, as the catalysts are recyclable and have a longer lifespan compared to soluble reagents. Additionally, since no soluble catalysts are used, the risk of secondary pollution is minimized. The main challenge with heterogeneous AOTs, however, lies in the difficulty of separating the solid catalyst from the treated solution after the reaction, which can complicate the recovery and reuse of the catalyst. By explaining these key differences, this introduction sets the stage for understanding the electrochemical approach used in this study, which offers operational simplicity and adaptability, making it a promising complementary technology to traditional AOTs in wastewater treatment. TiO\({}_{2}\) is the most widely used photocatalyst due to its high photoactivity, chemical and biological inertness, stability under UV light, low cost, and negligible toxicity [19; 20]. Its anatase phase, known for high stability and efficient oxidation reactions, is extensively utilized in environmental applications [21; 22]. Efforts to improve TiO\({}_{2}\)'s performance have focused on extending its efficacy under longer wavelengths, optimizing its reactivity at various pH levels, and enhancing its photocatalytic activity through structural modifications [23; 24]. This study proposes a novel approach to the degradation of colorants in industrial wastewater, utilizing a batch-type photoelectrochemical reactor for the in situ generation of TiO\({}_{2}\). Unlike traditional methods, which rely on either photocatalytic or electrochemical processes alone, our reactor integrates both electrochemical processes and homogeneous photocatalysis.