Look, here's the reality. You say they could keep you on for another year and yet they obviously see you as an employee who will do whatever they tell you to do. While this is far too common, it obviously means they don't care about your opinions or whether you are happy there.
At the same time you have to look at it from their perspective. You don't want to suddenly leave. I think two weeks is too short for this sort of situation. I worked with a guy who gave four months' notice; that's the agreement he made with my boss, and when those four months were over he left peaceably. Granted, we did have other developers to take over, but we also happened to hire more people in the meantime too.
Just be honest and tell management what you are feeling. You need to push them to hire another developer as good as you are ASAP (vet them personally). If they are not willing to do this, then they do not care about their product -- but that is their problem and not yours. But if they are willing, when the new person comes in, teach them what you've built. This is going to take time. I don't think one or even two months is enough time, you might consider more like four months. You can start now by writing up all the stuff you know.
If you are concerned about not burning any bridges (and believe me I would be too) then this is a surefire way of doing that. You just have to make sure they agree you will no longer be working with them after the allotted amount of time... and then stick to it.
At the same time you have to look at it from their perspective. You don't want to suddenly leave. I think two weeks is too short for this sort of situation. I worked with a guy who gave four months' notice; that's the agreement he made with my boss, and when those four months were over he left peaceably. Granted, we did have other developers to take over, but we also happened to hire more people in the meantime too.
Just be honest and tell management what you are feeling. You need to push them to hire another developer as good as you are ASAP (vet them personally). If they are not willing to do this, then they do not care about their product -- but that is their problem and not yours. But if they are willing, when the new person comes in, teach them what you've built. This is going to take time. I don't think one or even two months is enough time, you might consider more like four months. You can start now by writing up all the stuff you know.
If you are concerned about not burning any bridges (and believe me I would be too) then this is a surefire way of doing that. You just have to make sure they agree you will no longer be working with them after the allotted amount of time... and then stick to it.