How to structure a client-server app for deployment?

I need some advice. I’m making a client + server app and I don’t know how to structure it.
Should I set separate repositories for both client and server or is there a more convenient way? Can I deploy client and server apps from one github repo? What are the best practices?

There is no one single best answer out there that will hold true for every project including yours.

If you need to share code between them while building any portion of your project, typically these days folks seem to be trying to consolidate such codebases into single “monorepos”. But, since that is more of a convention and less of a standard, you’ll find uneven support for this configuration both in our service and in other CI services, based on how you set things up.

If it were me, and no code was shared between the frontend and backend (or minimal code - like logos), I’d probably have two separate repos, myself. But it wouldn’t be ridiculous to do them together, or not, is my read. Perhaps others who are more active developers will have more input :slight_smile:

Thanks. So, basically, it is possible to upload server and client app from one repo? Where can I read more about that?

Yes, you can do that from a single repo, but note that, Netlify cannot host your server-side code. You can use Netlify Functions to create a REST API or Expresss-application kind of thing, but if you wish to deploy a full-fledged server, that’s not possible on Netlify.

With that being said, the documentation that you need can be found here: Monorepos | Netlify Docs