All estimation techniques follow the same pattern:
1) list all the components and tasks that need to be completed,
2) assign an estimated duration (hours or days) to each task,
3) add them all up and multiply by a fudge factor.
The problem is that none of these are easily done. Step #1 requires a detailed understanding of what you're going to build. Obviously, this is often impossible, but you'll just have to guess. Be sure not to forget categories such as testing, debugging, meetings, etc.
Step #2 relies on experience and your assessment of the client's quality/time trade-off threshold. If you don't have much experience, just guess and then track your time so you can go back and compare reality to your guesses.
The "fudge factor" in step #3 can either be hidden from the client or called "integration phase" or some such. Basically, it is the process of ensuring that all the components are working smoothly together.
Entire books have been written on project planning and estimation. There is no shortcut to doing it well, only experience through the school of hard knocks.
Good luck.