So first of all, this is a big field. When you do a project on your own, you have to become skilled in:
Coding is actually just a very small part of the whole thing.
When I do my small projects, my simple approach is like this:
Problem: Find a problem users have and get really good at understanding the problem; be where the problem owners are and understand them; never let the connection to the problem owners slip;
Solution: Find a solution that is viable for the problem owners; e.g. no sense in making an English smartphone app if the majority of the problem owners are 90+y people in China (because 90+y old people in China probably don’t speak English and don’t own a smartphone)
Iterative Execution: Go from Problem to Solution in very small engineering cycles. Add the crucial core features you got from listening to your users; ask the problem owners for feedback, listen closely; add the next crucial feature; listen; and so on.
I think this approach already includes some sort of implicit marketing and sales, because talking about your application with the problem owners is already some sort of marketing and sales.
This whole thing is a lot of soft skills, psychology and communication, because without it you do a lot of guessing (how would I behave?) instead of getting real evidence.