Four months ago, my startup reached profitability for the first time. It came after more than a year of active work and planning, and here’s what it took.