I can't help with coding and organization, as I'm not a programmer, but I am a writer, and it sounds like programmers and writers have exactly the same problem with momentum. In this case, I'd say any advice targeted at writers applies equally to programmers.
The best advice I've come across is about inspiration. There's a great quote from Neil Gaiman: "If you only write when you're inspired, you may make a fairly decent poet, but you will never be a novelist. Because you're gonna have to make your word count today, and those words aren't going to wait for you whether you're inspired or not." Replace "novel" with "big project" and you've got the same idea.
When you start a big project, you're full of ideas. You get that rush of excitement and motivation. It's also the same feeling most people get starting a new relationship. "This is gonna be amazing. We're gonna be together forever. I'll never get sick of this."
At a certain point, the novelty wears off, and it becomes a grind. This is 100% inevitable. It happens to absolutely everyone. The difference between a successful writer/programmer/marriage and one that fails is the drive to push through that. It will not be fun. You have to force yourself to do it. It's a job now. And if this is something you do in your spare time, it's an *unpaid* job, at that. You have to find ways to motivate yourself. Set yourself a minimum amount of time to work on it every single day. Or a minimum amount you need to get done before you can stop for the day. For my current rewrite of my novel, I'm making myself do 1500 words every day. Sometimes that takes half an hour. Sometimes it takes 4 hours. But I have to do it. Find whatever way to motivate yourself that you can, but you have to force yourself to keep going, or it will be just another unfinished project.
A person with a thousand unfinished novels is still not a novelist. These things only really count if you finish them. If you abandon your project, then that's your decision, but that means it will never be finished. No matter how many hours you put into it, it's not really an accomplishment. At most, it's another learning experience. And learning experiences are not bad, but if that's all you ever have, then you won't have accomplished much of anything. And that's such a massive shame, to put in so much work and have basically nothing to show for it. Just finish things. Even if halfway through you decide what you're doing is not worthwhile, finish it anyway. It will almost certainly turn out to be better than you think it is, and no matter how many problems it has, they can always be fixed later. The only unfixable project is the one you never finish.
As for motivation, I have two concrete suggestions. The first is accountability. Find the target audience for your thing, recruit one or two of them to be your unofficial managers. Pledge that you will have X done by Y date, and keep them updated. It helps, knowing that someone is waiting for you to finish your stuff.
The second is
HabitRPG. If you haven't tried it, give it a look. There's a Bay12 guild on there already (twelfth bay). Set a daily task to finish X amount of work. If you succeed, you gain XP and gold which can be spent on better equipment. If you fail, you lose HP. Then set a Habit task for a session of work on the project. Click it every time you've spent any reasonable amount of time on the project. More XP, more gold. Go on quests. Fight boss monsters. It's a surprisingly effective way to keep yourself motivated.
Finally, here's a video of Neil Gaiman giving writing advice. Much of it certainly applies to programming as well (not all, of course; you can't code in notebooks, etc.). Have a watch, see if it gives you a push as it did me:
https://www.youtube.com/watch?v=drMuQqLLEe0Good luck!