  Flat bands (FB) are strictly dispersionless bands in the Bloch spectrum of a
periodic lattice Hamiltonian, recently observed in a variety of photonic and
dissipative condensate networks. FB Hamiltonians are finetuned networks, still
lacking a comprehensive generating principle. We introduce a FB generator based
on local network properties. We classify FB networks through the properties of
compact localized states (CLS) which are exact FB eigenstates and occupy $U$
unit cells. We obtain the complete two-parameter FB family of two-band $d=1$
networks with nearest unit cell interaction and $U=2$. We discover a novel high
symmetry sawtooth chain with identical hoppings in a transverse dc field,
easily accessible in experiments. Our results pave the way towards a complete
description of FBs in networks with more bands and in higher dimensions.
