The global energy consumption of commercial and residential buildings, driven by economic and demographic growth, has become a critical concern. This surge in demand has resulted in elevated electricity prices, strain on the primary grid, and increased carbon emissions due to inefficient energy utilization. This paper introduces an innovative energy management system (EMS) integrating both supply-side (SSM) and demand-side management (DSM) strategies. The demand side management involves optimizing load scheduling based on predicted electricity pricing. In contrast, the supply side management determines the next 24 hours optimal power setpoints, incorporating a Photovoltaic System (PV), an Energy Storage System (ESS), and the Electrical Power Grid (EPG). The primary objectives of this proposed EMS are to concurrently decrease electricity costs and the peak-to-average ratio (PAR), all while ensuring user comfort in terms of appliance operating waiting times. The proposed multi-objective optimization problem is solved using Particle Swarm Optimization algorithm (PSO). Based on residential building energy demand and time-of-use pricing (TOU), simulations were conducted using MATLAB. The results demonstrate the effectiveness of the proposed approach, achieving a 28% reduction in both electricity costs and the PAR, while maintaining user comfort.