A better way is to make a technology and keep reusing it for clients. Have clients find you more clients, make commissions and eventually earn their money back. Give old clients features developed for new clients. Eventually build out a productized service, get a bank loan, market it and sell the company. Or open source the tech and get a community around it (like symfony, etc)
This is the outline of working on your own stuff and just charging clients for high-margin projects, all the while building your technology.
This is the outline of working on your own stuff and just charging clients for high-margin projects, all the while building your technology.