  In this work we present an algebraic approach to the dynamics and
perturbation theory at tree-level for gauge theories coupled to matter. The
field theories we will consider are: Chern-Simons-Matter, Quantum
Chromodynamics, and scalar Quantum Chromodynamics. Starting with the
construction of the master action in the classical Batalin-Vilkovisky
formalism, we will extract the $L_{\infty}$-algebra that allow us to
recursively calculate the perturbiner expansion from its minimal model. The
Maurer-Cartan action obtained in this procedure will then motivate a generating
function for all the tree-level scattering amplitudes. There are two
interesting outcomes of this construction: a generator for fully-flavoured
amplitudes via a localisation on Dyck words; and closed expressions for fermion
and scalar lines attached to $n$-gluons with arbitrary polarisations.
