The invention relates to a method, a device and a system for producing particularly a hydrogel (200) and for controlling an enzymatically catalysed formation of a covalent bond in a solution, wherein said covalent bond is formed between a first compound (20) comprising a first moiety (21) and a second compound (22) comprising a second moiety (23), wherein the first and the second moiety (21, 23) are a substrate of an enzyme wherein said enzyme catalyzes the formation of a covalent bond between the first and the second moiety (21, 23), and wherein a voltage is applied to the solution for spatially controlling said formation, wherein said voltage is adjusted such that it induces electrolysis of said solution.