Designing a Real-Time TOXMAP Backend Based on FastAPI and Firebase for B3 Waste - Gading Aurelia Nabila Lubis; Rita Purnamasari; Khaerudin Saleh (bit-Tech, 2025)
Household waste classified as Hazardous and Toxic Waste (Bahan Berbahaya dan Beracun—B3) poses serious risks to health and the environment if not managed properly. Mismanagement can result in groundwater contamination, soil degradation, and long-term exposure to carcinogens. To address this issue, TOXMAP was developed as a mobile-based system that integrates real-time image classification with location-based disposal guidance. This paper discusses the development of the TOXMAP backend using a FastAPI server to process image input and classify waste using a pre-trained Support Vector Machine (SVM) model. Firebase supports user authentication, image storage, and retrieval of nearby dropbox locations. The Flutter-based frontend enables cross-platform access and supports real-time camera input. Load and integration tests show that the system responds in under one second with good classification accuracy and high user responsiveness. The system architecture effectively combines machine learning inference, cloud-based data handling, and mobile accessibility. FastAPI, Firebase, and SVM were selected to ensure lightweight, responsive, and accurate performance. Testing confirmed strong system stability and efficient computation during iterative use. The SVM model offers a balance between prediction accuracy and resource efficiency. By providing accurate classification and practical location guidance, the TOXMAP system enhances environmental awareness and promotes responsible disposal behavior. This architecture presents a scalable, lightweight, and accessible solution to support better household hazardous waste management and sustainable behavioral change.