I learned one rule as bootstrapped entrepreneur: 30-30-30-10.
30% is product (programming - product must not suck),
30% is marketing,
30% is sales and
10% is luck (there is always some luck).
That is how it is. Yeah that is cliché.
And don't give up.