inspiration
most productivity timers feel stressful to use. you start a 25 minute countdown, wait for a loud alarm, and still feel guilty whenever you take a break. i wanted to flip that around so working actually earns you free time to relax.
i also wanted something quiet and uncluttered. a lot of focus apps throw too many charts, popups, and settings at you, so the goal with fcus was to make a simple space that feels calm when you open it.
what it does
fcus is a minimalist focus and relaxation timer where working builds up free time you can spend later.
- work & relax modes: every 5 minutes of work earns 1 minute of relaxation time by default. when you want a break, switch to relax mode and spend the time you banked.
- streaks & multipliers: staying in a continuous focus session slowly raises your multiplier, and hitting 30 minutes of focus a day builds a streak bonus (up to 2.5x total).
- to-do list: add daily tasks with quick (+1m), standard (+3m), or deep (+5m) time rewards, check them off from the bento grid or task view, and reorder them by dragging or using the up/down arrows.
- daily quests: three small daily goals (30m of focus, hitting 1.25x multiplier, or logging offline work) that give bonus relaxation minutes.
- practice questions & manual work logging: paste notes or enter a topic to generate and answer study questions for extra free time, or describe offline work you did (like reading or chores) to have it converted into focus and break time.
- small extras: keyboard shortcuts (
space,w,r,t,m,?,esc), live timer in the browser tab title, soft web audio chimes, light and dark mode, guest mode via local storage, and optional cloud sync across devices.
how we built it
- frontend: react 19, typescript, vite, tailwind css v4, and motion.
- backend: a small express server to proxy api calls so keys stay off the client.
- ai features:
@google/genai(gemini 3.1 flash lite) with structured json outputs for generating/grading study questions and estimating manual work sessions. - auth & sync: firebase auth (google and email/password) and cloud firestore with per-user security rules, falling back to localstorage when signed out.
- audio & timer: web audio api oscillators for simple chimes, and
date.now()timestamp deltas so the timer stays accurate even in background tabs.
challenges we ran into
- cross-device sync bugs: users who signed in on two devices noticed their data wasn't saving properly. it turned out to be two bugs:
- the timer updated state every second, which kept resetting our 1-second save debounce so firestore writes never fired while a timer was running.
- signing in on a brand-new device could trigger a write before the existing cloud document finished loading, overwriting saved stats with empty defaults.
we fixed this by blocking writes until the initial server read finishes, splitting fast saves (tasks, quests, mode switches) from periodic 5-second saves during active timers, flushing on tab hide/close, and using
onsnapshotwith timestamp checks so devices stay in sync without looping.
- background tab throttling: browsers slow down
setintervalwhen a tab isn't active, which made the timer drift. switching to wall-clock timestamps fixed that. - deploying the same codebase to github and live hosting: setting up env vars and
.gitignoreproperly so the live app connects to firebase while the github repo stays clean without leaked keys.
accomplishments that we're proud of
- fitting a timer, multipliers, quests, reorderable to-do list, study tools, and dark mode into a clean bento layout without it feeling crowded.
- letting people use everything right away in guest mode, and smoothly migrating their local progress if they decide to make an account later.
- getting live cross-device sync working reliably after tracking down the debounce and hydration bugs.
what we learned
- don't put high-frequency updates (like a ticking timer) in the same debounce effect as discrete user actions (like adding a task), or the ticks will cancel the saves.
- always load from the server before allowing writes when syncing local storage with a cloud database.
- small details like keyboard shortcuts, dark mode, and showing the timer in the browser tab make the app much nicer to actually use every day.
what's next for fcus
- simple weekly focus stats and history so you can see your past sessions.
- custom work-to-relax ratios (for example 4:1 or 3:1 instead of only 5:1).
- pwa support so it can be installed on desktop or mobile with optional break notifications.
- optional built-in ambient background noise (rain or soft brown noise) generated in the browser. we're proud of

