I started working with a client a few months ago and we've done a few projects together. All the projects that he needs have a lot in common in the way they all have a registration, login/logout system, same user management features, same payment integration for his products, etc.
Since our last project I've coded things so that I can re-use all the common components in the projects. This way, I won't have to code the payment integration, user management, etc features from scratch for each project and I can just re-use them and code only the core features which make the projects different from each other.
But the problem is, the client also realizes this and now he wants me to cut off my costs by about 45-50% percent for each project we do in the future. I've convinced him to do another project with me for our usual price, but I'm pretty sure that once this one is done he would want me to reduce prices for the future projects.
Technically, yea, the code that I'll be re-using makes up about 50-60% of each project, but lets not get into a debate about whats moral and not. Everyone is in the business to make money, and while I can re-use this code for each project, i had to put in many hours of hard work into this code and I don't want to just give it away for free for each project. I'm sure there are lots of developers reading this who can relate to this.
What should I do? I like working with this guy and having a stable client is pretty nice, but I also feel that I might be missing on higher paying clients. Also its just not worth it to me to do a project for half of how much I charge for it, even if I have to work less on it.