  We introduce what we call `generalized higher rank $k$-graphs' as a class of
categories equipped with a notion of size. They extend not only the higher rank
$k$-graphs, but also the Levi categories introduced by the first author as a
categorical setting for graphs of groups. We prove that examples of generalized
higher rank $k$-graphs can be constructed using Zappa-Sz\'ep products of
groupoids and higher rank graphs.
