  We systematically develop the formalism necessary for ensuring that boundary
conditions of flavon fields in extra dimensions are consistent with heterotic
string theory. Having developed a set of consistency conditions on the boundary
conditions, we explore a series of examples of orbifolds in various dimensions
to see which ones can satisfy them. In addition we impose the further
phenomenological requirements of having non-trivial flavon vacuum alignments
and also of having quarks and leptons located appropriately in extra
dimensions. The minimal successful case seems to be a 10d theory with a
$SU(3)_{fl}$ gauged flavour symmetry, where the six-dimensional torus is
compactified on a $\mathbb{T}^6/\Delta(54)$ orbifold. We construct a realistic
$SU(5)$ grand unified theory along these lines, leading to tribimaximal-reactor
lepton mixing, which we show to be consistent with current neutrino data.
