The better question is: do you want to go mainstream?
If your startup is satisfying a niche, then your strategy might be to jump to other niches. If you're solving the needs of grocery shops with a small ERP, then you might jump to bodegas, to bakeries, to small coffee shops.
Going "mainstream" is totally different - it's the final step, after you've conquered all the niches that you can think of, where the product is "generic" enough to spread to dozens or hundreds of tangential markets. Most niche startups never even make this transition.
The real question, therefore, is not if you should go mainstream. It's: is your niche market (and the subsequent niches you'll conquer) big enough and will it grow over time? it's that simple. There's no worry about building a product only for grocery shops if they pay enough and there is enough of them. If you're not making money off of them as the market isn't big enough, trying to generalize features and "phase-shift" to the mainstream will not only not work but make you lose focus and turn your product to crap.
You can make all kinds of market estimations, but at the end of the day, has the niche market (or markets) paid you enough to survive, and, even if not, do you truly feel that you can capture more value from them (by adding new features and cool stuff) in the near future? If yes, viable. If not, run away.
Take "mainstream" out of your dictionary and mind and focus on niche market size and growth.