Simplest answer. I would stop coding of any kind, until he has a final spec for exactly what he/she wants as of now.
Then they need to prioritize that list of features etc, to confirm what items are must have right now, and what ones can be done later....
Using your experiences to determine what the time/cost of each feature, and then tell them, if they want this, it will take x amount of time & money.
Your dealing with the big crime of feature scope creep, and they will keep endlessly adding features, until nothing ever get's done or get's done so poorly.
Tell them once you have a final list, that you will make future modifications, as they prefer, but need to focus on the top 15/20 that they must have right now.
Then based on the time to completion, tell them, that after this has been released, then you will be open to discussing/brainstorming the next version.
Once a final decision has been made as to what is to be done for the current version, all discussions/ideas/suggestions must be stopped 100%.
If he get's ideas endlessly, tell him/her to write them down, in their feature list for the next version, and let you focus on delivering the most important features that they want right now.
If they continue to waste your time keep changing their minds. Then I'd just stop working on the project, and work on other projects, until they have finalized their decisions..
It's hard to do, but feature scope creep is so destructive of time, energy, motivation and clear thinking.