> When do i file for a patent?
As soon as possible. A basic change in patent law has recently gone into effect, which (at risk of oversimplification) grants a patent to the first person to file, rather than the first person to invent (the old standard).
http://en.wikipedia.org/wiki/First_to_file_and_first_to_inve...
> As far as I know, the idea is unique but I don't know if I have to make it first to patent it or just patent the idea, or is the idea all that matters?
* Ideas can now be patented, so don't wait until you have a working embodiment -- by then, someone else may have patented the idea.
* You need to consult a competent patent attorney, not a public forum.