Skip to content

tanghoong/focusflow

Repository files navigation

FocusFlow ๐ŸŽฏ

A local-first, offline-first Kanban + Pomodoro "deep work operating system" that runs as an installable PWAโ€”no account, no cloud, no tracking.

Next.js React TypeScript PWA License

๐ŸŒŸ Overview

FocusFlow is a privacy-first productivity application that combines Kanban task management with Pomodoro time tracking to create a complete "deep work operating system." It runs entirely in your browser with full offline support, requiring no account, no cloud service, and no tracking.

What Makes FocusFlow Different?

  • ๐Ÿ”’ Privacy First: No account required, no cloud sync, no trackingโ€”your data stays on your device
  • ๐Ÿ“ด Offline First: Works completely offline after installation, powered by PWA technology
  • โฑ๏ธ Task ร— Time Coupling: Every card tracks focus sessions, making time a first-class citizen
  • ๐Ÿ’พ Portable Data: Reversible JSON export/import and readable Markdown export
  • ๐ŸŽจ Executable Templates: Pre-built workflows with WIP guidance and Definition of Done
  • โšก App-Like Experience: Install as a progressive web app, launches offline, feels native

๐Ÿš€ Key Features

Core Functionality

โœ… Boards, Lists & Cards

  • Unlimited boards with drag-and-drop organization
  • Rich card details: description (markdown), due dates, priority, labels
  • Multi-item checklists with progress tracking
  • Activity log for every card action

โœ… Integrated Pomodoro Timer

  • Start/pause/resume/stop with configurable durations
  • Attach timer sessions to specific cards
  • Automatic session logging and statistics
  • Timer state persists across refreshes
  • Browser notifications on completion

โœ… Global Search & Filters

  • Search across titles, descriptions, labels, and checklists
  • Filter by board, labels, priority, due dates
  • Quick access to overdue and today's tasks

โœ… Focus Dashboard

  • Daily and weekly pomodoro trends
  • Cards completed today/this week
  • Overdue task alerts
  • Activity overview

โœ… Data Portability

  • Export to JSON (full fidelity, reversible)
  • Export to Markdown (human-readable sharing)
  • Import with schema validation and migration
  • Backup and restore your entire workspace

โœ… Keyboard Shortcuts

  • Fast card creation and navigation
  • Quick search (non-conflicting with browser shortcuts)
  • Timer controls
  • Board switching

Templates

15+ professional templates including:

  • Personal: Personal Goals, Habit Tracker, Life Planning
  • Work: OKR Template, Team Goal Setting, Agile Sprint Planning
  • Design: Design Project, Game Design, Web Design & Development
  • Education: Teaching Planning, Academic Research
  • Engineering: Engineering Project, Product Development
  • Writing: Short Story Kanban, Book Outline, Content Calendar
  • Marketing: Marketing Campaign, Social Media Content
  • Business: Business Overview, Business Plan, Grant Tracking

Each template includes pre-configured lists, example cards, and workflow guidance.

๐Ÿ› ๏ธ Technology Stack

  • Framework: Next.js 15.5 (App Router)
  • UI Library: React 18.3
  • Language: TypeScript 5
  • Styling: Tailwind CSS 3.4
  • State: TanStack React Query v5
  • Drag & Drop: react-dnd 16
  • Database: IndexedDB (idb library)
  • PWA: next-pwa (service worker, manifest)
  • Icons: Lucide React
  • Notifications: react-hot-toast + Browser Notifications API

๐Ÿ“ฆ Installation & Setup

Prerequisites

  • Node.js 18 or higher
  • npm, yarn, or pnpm

Development Setup

# Clone the repository
git clone https://github.com/yourusername/focusflow.git
cd focusflow

# Install dependencies
npm install

# Run development server
npm run dev

# Open in browser
# Navigate to http://localhost:3000

Build for Production

# Create optimized production build
npm run build

# Test production build locally
npm run start

# Production build will be in .next/ directory

๐ŸŒ Deployment

Recommended: Vercel (Zero Config)

  1. Push code to GitHub
  2. Import project to Vercel
  3. Deploy automatically
  4. PWA will be available at your-domain.vercel.app

Alternative: Static Export (Netlify, GitHub Pages, etc.)

# Build static export
npm run build

# Deploy the 'out' directory to any static host

Important Deployment Settings

  • Ensure service worker caching strategy is configured
  • Set proper cache headers for static assets
  • Enable HTTPS (required for PWA installation)
  • Configure correct basePath if not deploying to root domain

๐ŸŽฎ Usage Guide

First Time Setup

  1. Install the PWA (optional but recommended)

    • Open FocusFlow in your browser
    • Click "Install" button or use browser's install prompt
    • App will launch in standalone window
  2. Choose a Template

    • Select from 15+ professional templates
    • Or create a blank board to start fresh
  3. Start Your First Pomodoro

    • Open a board
    • Click on a priority card
    • Start the timer in the top-right corner

Daily Workflow

  1. Review Dashboard: Check today's tasks and overdue items
  2. Use Search: Find tasks with Ctrl/Cmd+K
  3. Start Timer: Begin pomodoro on selected task
  4. Track Progress: Move cards through lists as you complete them
  5. Review Stats: Check Focus Dashboard for productivity insights

Backup & Device Migration

# Export your workspace
Dashboard โ†’ Settings โ†’ Export โ†’ Download JSON

# Import on another device/browser
New Device โ†’ Settings โ†’ Import โ†’ Upload JSON file

# Your boards, cards, labels, checklists, and pomodoro stats will be restored

Keyboard Shortcuts

Shortcut Action
N New card
โ†‘/โ†“ Navigate cards
Enter Open card details
/ or Ctrl+K Global search
Space Start/pause timer
R Reset timer
Esc Close modal

๐Ÿ“‚ Project Structure

focusflow/
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ manifest.json          # PWA manifest
โ”‚   โ”œโ”€โ”€ icons/                 # PWA icons (192x192, 512x512)
โ”‚   โ””โ”€โ”€ sw.js                  # Service worker
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ layout.tsx         # Root layout with PWA setup
โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx           # Dashboard/home page
โ”‚   โ”‚   โ”œโ”€โ”€ globals.css        # Global styles
โ”‚   โ”‚   โ””โ”€โ”€ board/[id]/
โ”‚   โ”‚       โ””โ”€โ”€ page.tsx       # Board detail page
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ KanbanBoard/       # Kanban components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ KanbanBoard.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ListComponent.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ TaskComponent.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AddListForm.tsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ PomodoroTimer.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ CardDetailModal.tsx    # Card details with checklist
โ”‚   โ”‚   โ”œโ”€โ”€ NewBoardModal.tsx      # Board creation
โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.tsx             # Navigation with search
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ””โ”€โ”€ useData.ts         # React Query hooks
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ db.ts              # IndexedDB operations
โ”‚   โ”‚   โ”œโ”€โ”€ migrations.ts      # Schema migrations
โ”‚   โ”‚   โ””โ”€โ”€ export.ts          # Export/import logic
โ”‚   โ””โ”€โ”€ types.ts               # TypeScript types
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ next.config.mjs            # Next.js config with PWA
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ tailwind.config.ts

๐Ÿงช Testing

# Run linter
npm run lint

# Type checking
npx tsc --noEmit

# Test PWA offline
# 1. npm run build && npm run start
# 2. Open DevTools โ†’ Application โ†’ Service Workers
# 3. Check "Offline" and reload

๐Ÿ”’ Privacy & Security

  • No Telemetry: Zero tracking or analytics by default
  • No Network Calls: Core features work without internet
  • Local Storage: All data stays in IndexedDB on your device
  • No Third-Party Scripts: No external dependencies at runtime
  • Future Sync: If cloud sync is added, it will be 100% opt-in

๐Ÿ“Š Performance

  • Smooth drag/drop: Handles 500+ cards without lag
  • Fast search: Results in <200ms for typical datasets
  • Optimized rendering: Virtual scrolling for large lists
  • Small bundle: <200KB gzipped JavaScript
  • Offline launch: <1s load time after PWA install

๐Ÿ—บ๏ธ Roadmap

โœ… Phase 1 (Current - MVP for Public Release)

  • PWA installation & offline support
  • Boards/Lists/Cards with rich details
  • Pomodoro timer integration
  • Global search & filters
  • Export/Import (JSON + Markdown)
  • Keyboard shortcuts
  • Focus Dashboard
  • IndexedDB schema versioning

๐Ÿšง Phase 2 (Growth)

  • Advanced analytics (weekly review, heatmaps)
  • Enhanced templates & template marketplace
  • Cross-device import (QR code/file share)
  • Optional BYO cloud sync (self-hosted)
  • Browser extension

๐Ÿ”ฎ Phase 3 (Future)

  • Team workspaces (optional collaboration)
  • Shared templates & public boards
  • Plugin system
  • Mobile app (React Native)

๐Ÿค Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Follow TypeScript and ESLint conventions
  4. Test offline functionality
  5. Commit with clear messages
  6. Open a Pull Request

Development Guidelines

  • Offline First: All features must work without network
  • No Required Cloud: Cloud features must be opt-in
  • Privacy Preserving: No default telemetry
  • Accessible: Keyboard usable, ARIA roles, focus states
  • Portable: Don't break export/import compatibility

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Inspired by the need for privacy-first productivity tools
  • Built with the amazing Next.js and React ecosystems
  • Thanks to the open-source community

๐Ÿ“ง Support


Built with โค๏ธ for focused, private productivity

No account. No cloud. No tracking. Just you and your work.

About

Focus Flow - Kanban board for browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages