how does NextJs know what code to run on the backend vs frontend? - Theo's Typesafe Cult