We always "reserve the right to re-use any code written for this project" in our contracts with clients. With this in mind, if a later client needs a very similar web app, is it ethical to slightly modify my previous projects code to suit this new client and resell basically the same thing?
We do a lot of simple php/mysql web apps for clients.
How do you approach intellectual property rights with clients when you're developing a general product for them?
Contract Intellectual Property Web App
The way I handle this is to ask the client up front if there is anything about the project that they consider proprietary. If they say yes, then I suggest that for our mutual benefit any proprietary data that they will be disclosing be done in writing and that we agree not to use it for other than their engagement and that we will not divulge it to third parties without their written consent.
In general very little that would be embodied in the code is proprietary to a client. It sounds like you have covered your bases nicely with the clause "reserve the right to re-use any code written for this project". Further if their is something unique to a particular client it is highly unlikely that some other client would want the exact same piece of code (unless of course it is a competitor of the first client).
The unique items tend to be things like logos, graphics, color schemes etc. Perhaps you might have a unique calculation, but I would think that would be rare.
General things like storing content in a database, order processing for an eCommerce store, RSS feeds for a blog are all very general and not proprietary to a particular client; I see no reason to not reuse such code.
Think of it this way, if you used open source software for a client, would there be any problem using the same open source software for another client? Just because you wrote some code yourself and keep it closed source does not make the issue of re-use any different.
"reserve the right to re-use any code written for this project"Is good, although perhaps a little weak. We go as far as to write into our client contract that we own the IP created for the project. This way it is indisputable.
Some clients want to own the IP and will pay more for the privilege.