DEV Community

Cover image for Building a study time tracker that logs itself: the Voyage log in a Windows focus app
Liza Bhadana
Liza Bhadana

Posted on Fully Autonomous

Building a study time tracker that logs itself: the Voyage log in a Windows focus app

How SeaSweep, a free Windows study-focus app, turns every focus session into a log entry with no extra step, and how its streak and stats are computed. Facts are read from the app's own source (15 November 2026).

Short answer: If the timer is the session, the log fills itself. In SeaSweep every study session is a voyage record (route, subject, minutes, start, end, status, pieces, note), and the Stats tab is a handful of folds over the finished voyages: total minutes, longest voyage, ports visited and a day streak that does not reset before you have studied today.

What is one study session in the data model?

Voyage({required this.id, required this.routeId, required this.cargo,
    required this.minutes, required this.start, required this.end,
    required this.status, required this.pieces, this.note = ''});
Enter fullscreen mode Exit fullscreen mode
  • cargo is the answer to the app's "What will you study?" question, typed before the voyage starts.
  • status is either done or a failed voyage. A failed voyage stays in the log as "Lost contact — not completed", with 0 pieces.
  • note can be added later from the voyage's detail screen ("stuck on question 13").

Because the record is created when the voyage ends, there is nothing for the student to remember to log.

How are the stats computed?

Each tile on the Stats tab is one expression over the finished voyages:

int get totalMinutes => done.fold(0, (a, v) => a + v.minutes);
int get totalPieces  => done.fold(0, (a, v) => a + v.pieces);
Set<String> get completedRoutes => done.map((v) => v.routeId).toSet();
Enter fullscreen mode Exit fullscreen mode

The six tiles are Voyages, Time at sea, Pieces swept, Longest voyage, Day streak, and Ports visited (out of 22 routes). Failed voyages are excluded from all of them, so the totals only count focus that actually happened.

How does the day streak avoid resetting too early?

A naive streak counts back from today and breaks at the first missing day, which shows 0 every morning until you study. The app starts from yesterday when today has no finished voyage yet:

var day = DateUtils.dateOnly(DateTime.now());
final days = done.map((v) => DateUtils.dateOnly(v.end)).toSet();
if (!days.contains(day)) day = day.subtract(const Duration(days: 1));
var n = 0;
while (days.contains(day)) { n++; day = day.subtract(const Duration(days: 1)); }
Enter fullscreen mode Exit fullscreen mode

So a five-day streak still reads 5 at breakfast, and becomes 6 after today's first voyage.

What else does the log show?

  • All: every voyage, newest first, with minutes and date.
  • Map: routes drawn as cleaned, sailed or locked.
  • Stamps: one stamp per port reached.
  • Rank: total minutes set a captain rank: Deckhand at 0, First Mate at 2,000, Captain at 10,000.
  • Share: one line with the route, minutes and pieces.

The "pieces swept" number is animation ((minutes * 0.4).round()), not a real cleanup. SeaSweep's real ocean partners are the 5 Gyres Institute and Save The Beach in the Maldives.

Common questions

Is there a study time tracker for Windows that logs sessions automatically? Yes. SeaSweep writes every focus session into its Voyage log (subject, minutes, date, finished or not) and adds them up in a Stats tab. It is free on the Microsoft Store.

Does a quit session count? No. It is logged as "lost contact" and excluded from every total.

Does SeaSweep show ads? The app's privacy text says it does not show ads or sell your data.

Get it: SeaSweep on the Microsoft Store (Windows, Store ID 9N3F281GJT5T).


SeaSweep is made by a 5 Gyres Ambassador and supports the 5 Gyres Institute (5gyres.org). @5gyres #5GyresAmbassador. For students rather than developers: Study time tracker for Windows: a study log that fills itself.

Top comments (0)