Manifolds with boundary, with corners, b-manifolds and foliations model configuration spaces for particles moving under constraints and can be described as E-manifolds. E-manifolds were introduced in Nest and Tsygan (2001 Asian J. Math. 5 599–635) and investigated in depth in Miranda and Scott (2021 Rev. Mat. Iberoam. 37 1207–24). In this article we explore their physical facets by extending gauge theories to the E-category. Singularities in the configuration space of a classical particle can be described in several new scenarios unveiling their Hamiltonian aspects on an E-symplectic manifold. Following the scheme inaugurated in Weinstein (1978 Lett. Math. Phys. 2 417–20), we show the existence of a universal model for a particle interacting with an E-gauge field. In addition, we generalise the description of phase spaces in Yang–Mills theory as Poisson manifolds and their minimal coupling procedure, as shown in Montgomery (1986 PhD Thesis University of California, Berkeley), for base manifolds endowed with an E-structure. In particular, the reduction at coadjoint orbits and the shifting trick are extended to this framework. We show that Wong’s equations, which describe the interaction of a particle with a Yang–Mills field, become Hamiltonian in the E-setting. We formulate the electromagnetic gauge in a Minkowski space relating it to the proper time foliation and we see that our main theorem describes the minimal coupling in physical models such as the compactified black hole.