The fields of a classical gauge theory form a smooth groupoid (aka stack) with morphisms given by gauge transformations. From this perspective, the concept of "equality" of two gauge fields A and A' is not a property but rather additional data given by the choice of a gauge transformation A ---> A' which witnesses that A and A' are "the same". In this talk, I will explain how this higher-categorical point of view is useful to study gauge theories on manifolds with boundaries and defects. In particular, I will show that the additional data witnessing boundary conditions are precisely the famous edge modes from physics. As examples, I will discuss 3d Abelian Chern-Simons theory on manifolds with boundary, which is physically describing the quantum Hall system, and also the 4d holomorphic Chern-Simons theory of Costello and Yamazaki where the edge modes on surface defects... more