Skip to content
← portfolio·
case study

Flux

active2025

A cross-platform sobriety tracker for any number of vices — streaks, mood-tagged check-ins, and tiered badges without giving up your data.

No server, no account. Everything lives in AsyncStorage via a StorageService singleton, and Redux Toolkit thunks bridge the async I/O to reducers. Off-days let you log a relapse without resetting your main streak, and badges unlock at milestone day counts.

iOS · Android · WebOffline-firstLocal-only dataOpen source
⬡ view on github
Flux — today view with streaks and habits — light theme
app

Your Progress, Two Ways

The calendar shows a month at a glance — color dots per habit, off days, and per-habit completion bars. The stats tab zooms out to streak history, mood distribution, and badge progress — same data, two lenses.

Flux — monthly calendar with per-habit dots — light theme
calendar
Flux — stats with streak history and mood — light theme
stats
architecture

How It Works

There is no backend. All state lives in AsyncStorage, wrapped by a StorageService singleton with namespaced keys. Redux Toolkit thunks (loadVicesFromStorage, addOffDays, removeCheckIn) handle the async read/write boundary; reducers stay synchronous and persist on each mutation. The data model includes off-days so a relapse is captured without losing streak history, and badge logic runs against the full check-in history on every change.

// local-only data flow
device — no backend
UI
React Native\nExpo Router
Redux thunks
async I/O bridge
StorageService
namespaced keys\nsingleton
AsyncStorage
device-local
stack

Tech Stack

Frontend
Expo SDK 54 · React Native 0.81 · React 19
Language
TypeScript (strict mode)
Routing
Expo Router (file-based) · Stack + Tab navigation
Styling
HeroUI Native · Uniwind (Tailwind v4 universal)
State
Redux Toolkit · async thunks · custom hooks
Local DB
AsyncStorage via StorageService singleton
Date utils
date-fns · @react-native-community/datetimepicker
Feedback
Expo Notifications · Expo Haptics
Build
Expo CLI · Metro · EAS Build
features

Key Features

Track multiple vices, each with its own color and start date
Days-sober counter auto-calculated from the start date
Daily check-ins with mood sentiment and optional notes
Off-days log a relapse without resetting your main streak
Per-vice streak counter plus longest-streak tracking
Tiered achievement badges — common, rare, epic, legendary
Calendar heatmap visualizes check-in density over time
Stats tab: longest streaks, badge progress, check-in counts
Light / dark theme with six customizable accent colors
iPad-optimized layout with capped content width