This paper aims to develop a rural energy system design framework and analyzes the techno-economic feasibility of potential hybrid energy systems (HES) for rural electrification of a village in district Dera Ismail Khan, Pakistan. At first, a comprehensive resource assessment is carried out. Subsequently, system size optimization and techno-economic viability is conducted using a standard software tool HOMER PRO to fulfil the peak-load demand. Due to the deficiency of wind power and biomass resources at the targeted site, the results indicate that a community power system based on solar PV as a primary energy source, batteries as a storage, diesel generator as a backup, and a time-constrained availability of national grid is the most feasible solution. Sensitivity analysis using macro-economic variables and derating factor of PV has been opted to ensure robustness and commercial applicability of the proposed HES. The study finds that levelized cost of electricity (LCOE) in grid-integrated systems (0.072$/kWh and 0.078$/kWh) is economical than the off-grid systems (0.145$/kWh and 0.167$/kWh). The obtained results indicate commercial efficacy of the grid-integrated configurations, where LCOE is lower than the existing government tariff. Most importantly, this hybrid energy system is capable of providing a 24/7 continuous electricity to the site under consideration.