I'm working on a project that includes a React/Vite frontend and a backend, and I need to deliver it so the client can run it locally using a .bat file. However, I don't want them to be able to see, read, modify, or copy my source code. I'm looking for the best ways to package my project, whether it's creating a single executable file, hiding or encrypting source files, or using tools like Electron or Tauri to protect my code. What are my options to achieve this without giving full access to the code?
6 Answers
One option is to host the project yourself as a demo until the final delivery, so the client can see how it works without directly accessing the source.
If your backend is in Python, you've picked some technology that makes it harder to conceal code. Think about using a different backend that allows you to minify front-end code and compile it alongside backend code, like Java which can bundle everything in a .jar file.
Consider using a Software as a Service model where you host the project on your server. This way, you can manage what the client sees. Just keep in mind any contract terms regarding ownership of the code, as they might have rights to it anyway.
You could consider rewriting parts of it in compiled languages. They might still be able to decompile it, but it would require more effort on their part.
It's important to clarify what you're trying to protect. Identifying the specific issues will help find the best solution. Are you concerned about them modifying it or just seeing the code?
Since it's a web service, you might not even need the client to run the project themselves. If you host the backend, you can manage the entire service without exposing front-end code to them.

You could also use a tunneling service to make it available only to them.