The short answer
Roosta records every wake-up and recomputes your streak and statistics from that history each time you open the app. Nothing is a stored counter, so a streak can never drift out of sync with what actually happened — and a wrong streak in a streak-driven product is a trust failure.
Why recomputing matters
The obvious way to build a streak is to keep a number and add one each morning. It is also the way streaks silently go wrong: a crash mid-write, a timezone change, a clock adjustment, a restore from backup, and the number no longer matches reality. Users notice, and once they have seen a wrong streak they stop believing any of the numbers.
Roosta stores the events instead — each wake-up, with its timestamp and outcome — and derives everything from them on read. If the derivation is right, the number is right, every time.
How the streak works
Wake up each day and either beat your mission or dismiss the alarm to keep the flame. Your streak stays alive as long as your last wake-up was today or yesterday. Miss a whole day and it resets to zero.