If it was the second one then IMO you really owe them back the initial deposit they gave you depending on what kind of final work you delivered to them. Honestly handing codebases from one developer to another is less than ideal and makes projects more expensive than they should be. Also I'm sure it was way past the expected deadline of the client.
If you delivered nothing in the end then it was really more like they hired a con artist that stole their money, again if you were under the kind of contract I stated above.
If you were a normal employee then you just didn't do a great job due to all the stuff you mentioned.
Either way I don't know why you would publicize a situation like this. It doesn't matter what way you look at it, this whole story doesn't make you sound like a developer that people would want to hire.