By defining natural gluing operations, we combine the classical approach to Teichmüller theory via foliations with the operadic approach to field theory. The result is a universal structure, which governs surprisingly many algebraic and geometric constructions in and around moduli spaces of curves, string (field) theory and string topology. Applications include solutions to Deligne’s conjecture, its cyclic version and the definition of string topology operations. For the algebraic operations, such as the Gerstenhaber bracket and the BV operator, we use a discretized version of the foliations. Interpreted as chain level operations, these give natural definitions of up to homotopy algebras, which have the benefit of being concrete and small enough to be handleable, but large enough to contain all the necessary homotopies, such as those giving rise to brace operations. There are other natural modifications, which we discuss, that lead to moduli space actions, actions of certain compactifications, an open/closed generalization, and the possibility of stabilization in the case of semi-simple algebras.