Flattening data structure on backend or frontend commonly? - Theo's Typesafe Cult