← All workCase study 19

Habit Flow API

A habit-tracking REST API with streak calculation and break-prediction alerting.

Type

Web

Status

Shipped

Context

Personal engineering

Period

2026

Source

Private

TypeScript
Private repository
(01) Overview

A TypeScript REST API for habit tracking. The interesting part is not CRUD but the streak engine: computing streaks correctly across timezones and gaps, and predicting when a user is about to break one so an alert can arrive before the fact rather than after.

(02) Architecture

TypeScript REST API · streak calculation engine · break-prediction alerting

(03) What was built
  1. 01Streak calculation that holds up across timezones and irregular logging patterns.
  2. 02Break-prediction alerts fire before a streak is lost, not after.
(04) Stack

TypeScript / Node.js

Next case study

Early Office

→