A biogas generation apparatus comprising: a feeding unit; a digesting unit to effect hydrolysis and anaerobic digestion of an organic slurry, wherein the digesting unit is arranged to receive the organic slurry from said feeding unit; a gas pressurization unit; a flexible dome located at top of the digesting unit, said flexible dome provided with a plurality of pipelines to convey the biogas from within the digesting unit to the gas pressurization unit to maintain pressure of the biogas stored in a pressurized vessel; an agitator assembly positioned within the digesting unit, said agitator assembly comprising a shaft coupled with a plurality of arms such that rotation of the agitator assembly about a central axis of the shaft creates plug flow of the organic slurry in the digesting unit; wherein the digesting unit is separated into a plurality of chambers, at least a hydrolysis chamber of which is adapted for hydrolysis of an organic slurry and at least a digesting chamber of which is adapted for anaerobic digestion of the organic slurry, and wherein rotation of the agitator assembly about the central axis of the shaft separates each of the plurality of chambers from one another; a manure separation unit connected to the digesting unit to separate solid particles from digested slurry that has passed through the digesting unit to obtain a basic fluid that is free of solid particles; a plurality of sensors comprising pH sensors provided to the digesting unit to detect pH value of the slurry passing through different sections of the digesting unit; a spraying unit comprising a plurality of nozzles; and a control unit configured to actuate the spraying unit and enable spraying of the basic fluid into the digesting unit to compensate for the change in the pH level of the organic slurry, in case there is a change in pH level of the organic matter in any one of the plurality of chambers. a feeding unit; a digesting unit to effect hydrolysis and anaerobic digestion of an organic slurry, wherein the digesting unit is arranged to receive the organic slurry from said feeding unit; a gas pressurization unit; a flexible dome located at top of the digesting unit, said flexible dome provided with a plurality of pipelines to convey the biogas from within the digesting unit to the gas pressurization unit to maintain pressure of the biogas stored in a pressurized vessel; an agitator assembly positioned within the digesting unit, said agitator assembly comprising a shaft coupled with a plurality of arms such that rotation of the agitator assembly about a central axis of the shaft creates plug flow of the organic slurry in the digesting unit; wherein the digesting unit is separated into a plurality of chambers, at least a hydrolysis chamber of which is adapted for hydrolysis of an organic slurry and at least a digesting chamber of which is adapted for anaerobic digestion of the organic slurry, and wherein rotation of the agitator assembly about the central axis of the shaft separates each of the plurality of chambers from one another; a manure separation unit connected to the digesting unit to separate solid particles from digested slurry that has passed through the digesting unit to obtain a basic fluid that is free of solid particles; a plurality of sensors comprising pH sensors provided to the digesting unit to detect pH value of the slurry passing through different sections of the digesting unit; a spraying unit comprising a plurality of nozzles; and a control unit configured to actuate the spraying unit and enable spraying of the basic fluid into the digesting unit to compensate for the change in the pH level of the organic slurry, in case there is a change in pH level of the organic matter in any one of the plurality of chambers.