  The dynamics of quantum field theories on bounded domains requires the
introduction of boundary conditions on the quantum fields. We address the
problem from a very general perspective by using charge conservation as a
fundamental principle for scalar and fermionic quantum field theories.
Unitarity arises as a consequence of the choice of charge preserving boundary
conditions. This provides a powerful framework for the analysis of global
geometrical and topological properties of the space of physical boundary
conditions. Boundary conditions which allow the existence of edge states can
only arise in theories with a mass gap which is also a physical requirement for
topological insulators.
