This study introduces a clustering-driven adaptive User Experience (UX) architecture for e-learning systems, aligning machine learning segmentation with the 21st-century 4C educational framework (critical thinking, communication, collaboration, creativity). The objective is to dynamically personalize digital learning interactions through a microservices architecture responsive to users' UX profiles. A quantitative survey was conducted involving 50 active users of Shopee and Tokopedia, whose interaction feedback was mapped using the User Experience Questionnaire (UEQ). Three unsupervised clustering techniques—KMeans, Agglomerative, and DBSCAN—were compared. KMeans outperformed the others with a silhouette score of 0.157, compared to 0.146 for Agglomerative and −0.017 for DBSCAN, identifying three meaningful clusters representing high, medium, and low UX proficiency. A one-way ANOVA test confirmed statistically significant differences (p 0.01) among the clusters in dimensions such as error clarity, support responsiveness, and user confidence. These UX profiles were then mapped to individualized microservices: Cluster 0 received autonomous content with minimal support, Cluster 1 was offered guided prompts, and Cluster 2 was provided with simplified interfaces and proactive assistance. Each cluster was aligned with specific 4C competencies to ensure pedagogical relevance. The proposed architecture, built with gRPC-based microservices, enabled asynchronous, low-latency personalization based on user cluster membership. The novelty of this research lies in its dual alignment—technological (microservices + machine learning) and educational (4C competency mapping)—to construct a scalable and responsive e-learning environment. The system design, although validated through simulation, demonstrates a practical foundation for future deployment in platforms like Moodle or OpenEdX. By linking behavioral UX clustering to pedagogical intervention strategies, this study offers a model for adaptive, data-informed instructional systems that are both scalable and learner-centered.