I was assigned to fix some issues in a PHP project. Later on, I was asked to implement some new features, which I did. The project neither uses any framework nor does it use OOP. It lacks a proper structure, except for the use of folders (no sub-folders) to organize files. There was no documentation created by the original programmer. Now, the project's almost complete with some simple testing to be done and the client is asking for documentation.
I have a few questions actually.
I have always considered documentation as a process which is starts before starting the coding part of project and which continues till the end. So, am I wrong about this? Is the documentation done at the end of the project?
What should be my way to go on documenting this project. I've kept a basic "log like" documentation on the changes I've made for my personal use. But since there was no initial documentation produced, I didn't bother to create one either.
Is there a good documentation template that I could use to reduce my effort?
I am talking about or code documentation (not user documentation). Although I'm assuming this since they haven't specified anything.