The transition of the web from centralized to decentralized or distributed architectures offers numerous advantages but also introduces significant challenges. One of the key challenges is user profiling to provide personalization, particularly personalized content recommendations. Traditional centralized recommendation systems rely on aggregated user data and central servers, making them incompatible with the principles of decentralization in Web 3.0. To bridge this gap, we propose D-RecSys, a decentralized recommendation framework specifically designed for Web 3.0-based content-sharing dApps. D-RecSys combines federated learning and clustering algorithms to deliver personalized recommendations while preserving user privacy and anonymity. The framework leverages blockchain technology for trustless coordination, enabling the generation of a global model through a modified block structure and mining algorithm. This structure facilitates the aggregation of local models into intermediate block models and subsequently produces the global model. To validate the effectiveness of D-RecSys, we conducted a number of experiments in a simulated Web 3.0 environment. The results demonstrate that D-RecSys achieves performance levels comparable to centralized recommendation systems while adhering to the core principles of decentralization, user anonymity, and data privacy.