How can you design software that runs on a server and client?

You have to code differently for both client and server. Client uses front end while server uses back end.