Skip to content

rickytabe/FlowState

Repository files navigation

FlowState

FlowState is an energy-aware productivity web app.
It helps you manage tasks while tracking session health signals such as energy level, error rate, velocity, and burnout risk.

What The App Does

  • User auth flow (mocked locally): register, login, logout.
  • Task management with per-task timers.
  • Session telemetry engine:
    • velocity (tasks per hour)
    • error rate
    • energy level
    • work pattern classification (Deep Focus, Drifting, Struggling, Burnout Risk)
    • computed burnout risk score
  • Recovery support:
    • rest mode timer
    • sound alerts when tasks/rest complete
    • rest logging
  • Analytics dashboard:
    • energy vs velocity time series
    • task difficulty distribution
    • resilience summary metrics
  • Theme support (light/dark)
  • Settings for burnout sensitivity, energy decay rate, and user profile preferences
  • Data export and reset controls

Tech Stack

  • React 19
  • TypeScript
  • Vite
  • React Router
  • Recharts
  • Lucide icons
  • Browser localStorage for persistence

Project Structure

  • App.tsx: route wiring and protected dashboard routes
  • components/LandingPage.tsx: marketing/intro page
  • components/Dashboard.tsx: core task/timer/telemetry UX
  • components/Analytics.tsx: charts and session analysis views
  • components/Settings.tsx: user and engine preferences
  • context/AuthContext.tsx: auth state management
  • context/ThemeContext.tsx: theme state management
  • lib/engagementEngine.ts: metric calculations and suggestions
  • lib/storageService.ts: all persistence (tasks, logs, analytics, settings, timer/session state)
  • lib/auth.ts: mock auth service

Getting Started

Prerequisites

  • Node.js 18+ (Node.js 20+ recommended)

Install

npm install

Run Development Server

npm run dev

Build For Production

npm run build

Preview Production Build

npm run preview

Persistence Model

FlowState stores app state in localStorage using keys like:

  • flowstate_user
  • flowstate_tasks
  • flowstate_task_logs
  • flowstate_rest_logs
  • flowstate_settings
  • flowstate_analytics_history
  • flowstate_timer_state
  • flowstate_session_stats

This means data is local to the browser/profile by default.

Current Limitations

  • Auth is mocked and not secure for production use.
  • No real backend/database integration yet.
  • Supabase client in lib/supabaseClient.ts is currently a placeholder.
  • Multi-device sync is not implemented (except manual export/import workflows you add later).

Notes For Future Development

  • Replace mock auth with real authentication.
  • Move persistence from localStorage to a backend (for sync and durability).
  • Add automated tests for engagement engine and timer behavior.
  • Add true import flow to complement export.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors