Skip to content

kibermaks/SessionFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

165 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SessionFlow

Smart scheduling for productive days

License: MIT macOS Swift Build Release

SessionFlow is a native macOS app that helps you plan, execute, and reflect on productive days. It automatically schedules work, side, and deep sessions around your existing calendar events, tracks them in real time with ambient sounds and progress indicators, and captures feedback so you can see how your time actually felt.

Download Latest Release β€’ Documentation β€’ Contributing


✨ Key Features

Plan

  • 🧠 Smart Scheduling: Automatically fits work, side, and deep sessions into available gaps in your macOS Calendar
  • πŸ”„ Dynamic Patterns: Choose from multiple scheduling patterns (Alternating, All Work First, All Side First, Custom Ratio)
  • πŸ’Ύ Preset Management: Save and quickly switch between configurations for Workdays, Focus Days, Weekends, or any custom mix
  • πŸ“… Calendar Integration: Read from and write directly to macOS Calendar with per-calendar filtering and replacement controls
  • βš™οΈ Customizable Sessions: Configure names, durations, and target calendars for each session type (Work, Side, Planning, Deep Work)
  • 🎯 Hashtag System: Add #work, #side, #deep, #plan, or #break to event notes so existing sessions are recognized automatically

Execute

  • πŸ“Š Interactive Timeline: Drag-and-drop events, resize sessions, lock layout, and freeze projections for manual fine-tuning
  • πŸ‘ Session Awareness: Tracks active calendar eventsβ€”both tagged sessions and your regular calendar eventsβ€”with ambient sounds, a progress bar, and gentle reminders as sessions approach their end. A progress donut on the dock icon and an optional menu-bar timer let you glance at remaining time without switching windows
  • πŸͺŸ Mini-Player: Compact floating window that shows session status at a glanceβ€”collapse the main window and keep awareness in a small footprint. Displays idle, next-up, active, and feedback states with the same progress and time info as the full panel
  • ⌘ Shortcuts Integration: Trigger macOS Shortcuts when sessions start, end, or approach. Each shortcut receives structured JSON with session detailsβ€”use it to toggle Focus modes, send notifications, control smart home devices, or anything Shortcuts can do. Template shortcuts are available for every trigger
  • πŸŒ™ Night-Owl Mode: Schedule beyond midnight with +1d markers on the timeline (up to 6 am next day)
  • ↩️ Undo/Redo: Full history for event moves and projected session edits

Reflect

  • πŸ“ˆ Productivity Tracking: After each session ends you get a quick feedback prompt (rocket/completed/partial/skipped). A daily productivity card and monthly calendar view summarize your ratings, highlight unrated blocks, and compute weighted focus time so you can see how each day and month actually felt

Polish

  • πŸŒ‘ Beautiful UI: Dark-themed glassmorphic design with intuitive controls
  • πŸ”ƒ Auto-Updates: Automatic update checks with self-install from GitHub Releases, plus a What's New changelog viewer

πŸ–Ό Visual Walkthrough

Welcome Guide

Welcome guide onboarding flow

Command Center

Timeline, projections, and controls share a single glass panel so you can see inputs and outputs together.

SessionFlow timeline and settings

Dynamic Scheduling + Drag & Drop

Sessions flow around existing events instantly as you tweak durations or presets. You can also drag and drop events to change their time and duration.

Animated view showing sessions adapting on the timeline

Preset Library

Workday, Focus, Weekend, or any custom preset stays one click away.

Preset manager UI and quick switching controls

Availability Insights

Summary cards highlight real events, projected work, and when you are supposed to be free.

Projected sessions and availability cards

Session Awareness & Mini-Player

The bottom panel tracks your current session in real timeβ€”whether it’s a tagged event (#work, #side, #deep, #plan, #break) or any regular calendar eventβ€”displaying elapsed time, a progress bar, and remaining time. Ambient sounds and visual cues keep you in flow, with gentle alerts as the session nears its end. Progress also appears as a donut overlay on the dock icon and as a live timer in the menu bar, so you always know where you stand without switching windows. When a session ends, a quick prompt lets you rate how it went. For a more compact experience, the floating Mini-Player provides the same awareness in a small footprint. You can expand back to the full app anytime.

Session Awareness: idle, active session, progress, feedback

Productivity Tracking

The right side of the window can show a Productivity card once you start leaving feedback on sessions. It aggregates how many rocket/completed/partial/skipped blocks you had today, how many are still unrated, and computes a weighted Focus Time score based on both duration and rating. From there, a calendar button opens a monthly productivity view with a compact calendar: each day shows colored dots for rated sessions and a tiny focus-time label, making it easy to spot your strongest days and streaks at a glance.

Productivity Tracking

πŸš€ Installation

Option 1: Download Pre-built Release (Recommended)

  1. Download the latest SessionFlow-vX.X.dmg from Releases
  2. Open the DMG file
  3. Drag SessionFlow.app to your Applications folder
  4. Launch from Applications or Spotlight
  5. Grant Calendar permissions when prompted

Option 2: Build from Source

See Building from Source section below.

🎯 Quick Start

  1. Launch the app, grant Calendar access, and pick your calendars.
  2. Set target counts and durations for Work, Side, Deep, and Planning sessions.
  3. Pick a scheduling pattern or load a preset, then review the timeline.
  4. Press Schedule Sessions when the layout looks right.
  5. As sessions begin, the bottom panel (or Mini-Player) tracks your progress with ambient sounds, a dock icon donut, and an optional menu-bar timer. Rate each session when it ends to build your productivity history.

πŸ”’ Privacy & Local Processing

  • Local Only: Scheduling logic, presets, and state live entirely on your Macβ€”no accounts, telemetry, or remote services.
  • Privacy Respected: Calendar access is limited to the calendars you explicitly pick, and the data never leaves the device.
  • User Confirmation: The app only modifies your calendar when you explicitly schedule sessions or drag events β€” you're always in control.

πŸ’‘ Usage Tips

  • Hashtags: Add #work, #side, #deep, #plan, or #break to event notes so existing sessions are detected automatically.
  • Visual Language: Solid borders mark real events; dashed borders with diagonal stripes are projections.
  • Presets: Save Workday, Focus, Weekend, or any custom mix for instant reuse.
  • Awareness Mode: Toggle β€œAware of existing tasks” when you want counts to respect what’s already booked.
  • Track Other Events: Enable β€œAwareness of your other calendar events” to also track regular (untagged) calendar events with timer, progress, and ambient sound.
  • Shortcuts: Set up macOS Shortcuts to automate actions at session boundaries. Go to Settings β†’ Shortcuts, enable a trigger, and name your shortcut. Download ready-made templates to get started instantly.
  • Dock & Menu Bar: Enable the dock progress donut and menu-bar timer in Session Awareness settings so you can monitor remaining time from anywhere.
  • Mini-Player: Click the collapse button on the bottom panel to detach a floating mini-player; expand back anytime.
  • Freeze & Adjust: After scheduling, freeze projections and drag/resize them by hand for pixel-perfect layouts.
  • Copy Events: Right-click any timeline event and use β€œCopy to...” to duplicate it to a nearby day.
  • Lock Dragging: Toggle the lock icon to prevent accidental event moves while reviewing your schedule.
  • Night Scheduling: Extend the schedule end hour past midnight to plan late-night sessions with clear +1d markers.
  • Rate Sessions: After each session ends, use the quick feedback prompt to rate itβ€”these ratings feed into the Productivity card and monthly view.

πŸ— Architecture & Key Elements

The project follows a modular architecture with clear separation of concerns:

SessionFlow/
β”œβ”€β”€ Models/
β”‚   β”œβ”€β”€ Session.swift
β”‚   β”œβ”€β”€ Preset.swift
β”‚   β”œβ”€β”€ SchedulePattern.swift
β”‚   β”œβ”€β”€ SessionAwarenessConfig.swift
β”‚   └── SessionFeedback.swift
β”‚
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ SchedulingEngine.swift
β”‚   β”œβ”€β”€ CalendarService.swift
β”‚   β”œβ”€β”€ AvailabilityCalculator.swift
β”‚   β”œβ”€β”€ EventUndoManager.swift
β”‚   β”œβ”€β”€ SessionAwarenessService.swift
β”‚   β”œβ”€β”€ SessionAudioService.swift
β”‚   β”œβ”€β”€ DockProgressController.swift
β”‚   β”œβ”€β”€ MenuBarController.swift
β”‚   └── UpdateService.swift
β”‚
└── Views/
    β”œβ”€β”€ ContentView.swift
    β”œβ”€β”€ TimelineView.swift
    β”œβ”€β”€ SettingsPanel.swift
    β”œβ”€β”€ PresetManager.swift
    β”œβ”€β”€ SessionAwarenessPanel.swift
    β”œβ”€β”€ MiniPlayerView.swift
    β”œβ”€β”€ ProductivityCard.swift
    β”œβ”€β”€ WhatsNewView.swift
    β”œβ”€β”€ AboutView.swift
    └── [other views...]

Key Components

Models

  • Session.swift: Defines SessionType enum (Work, Side, Deep, Planning) and ScheduledSession data structure
  • Preset.swift: Handles preset configuration and persistence via UserDefaults
  • SchedulePattern.swift: Generates session orders based on patterns (Alternating, All Work First, etc.)
  • SessionAwarenessConfig.swift: Configuration for session tracking, sounds, dock progress, and menu-bar timer
  • SessionFeedback.swift: SessionRating enum and feedback storage via calendar event notes

Services

  • SchedulingEngine.swift: Core scheduling algorithm that fits sessions into available time gaps
  • CalendarService.swift: EventKit wrapper for reading/writing calendar events with per-calendar filtering
  • AvailabilityCalculator.swift: Identifies free time slots between existing events
  • EventUndoManager.swift: Custom undo/redo stack for calendar event and projected session changes
  • SessionAwarenessService.swift: Tracks active and upcoming sessions, manages progress, and triggers feedback prompts
  • SessionAudioService.swift: Ambient sound playback, transition sounds, and accelerando during sessions
  • DockProgressController.swift: Renders the progress donut overlay on the dock icon
  • MenuBarController.swift: Manages the optional menu-bar status item with live timer

Views

  • ContentView.swift: Main layout container and state management
  • TimelineView.swift: Interactive timeline with drag-and-drop, resize, locking, and freeze mode for both events and projected sessions
  • SettingsPanel.swift: Configuration controls (session counts, durations, patterns)
  • PresetManager.swift: Preset saving, loading, and management UI
  • SessionAwarenessPanel.swift: Bottom panel showing active session, next-up, and feedback states
  • MiniPlayerView.swift: Compact floating window mirroring the awareness panel
  • ProductivityCard.swift: Daily summary and monthly calendar view of session feedback
  • WhatsNewView.swift: Fetches and displays the changelog from GitHub after updates
  • AboutView.swift: About window with version and build info

πŸ”§ Development Guide

Adding a New Session Type

  1. Update SessionType enum in Session.swift with a new case, icon, and color
  2. Update SchedulingEngine.swift to handle the new type in its generation loop
  3. Add UI controls in SettingsPanel.swift for configuration
  4. Update preset system in Preset.swift to include new type
  5. Add hashtag support in CalendarService.swift if needed

Modifying Scheduling Logic

  • Core algorithm: SchedulingEngine.generateSchedule()
  • Gap detection: AvailabilityCalculator.calculate()
  • Pattern logic: SchedulePattern enum and SessionOrderGenerator.generateOrder()
  • Existing task awareness: Hashtag parsing in CalendarService.swift

Adding New Files

IMPORTANT: When adding new Swift files, you must manually update SessionFlow.xcodeproj/project.pbxproj:

  • PBXBuildFile section
  • PBXFileReference section
  • PBXGroup section
  • PBXSourcesBuildPhase section

See Agents.md for detailed instructions.

πŸ“¦ Requirements & Dependencies

System Requirements

  • macOS: 13.0 (Ventura) or later
  • Processor: Apple Silicon (M1/M2/M3) or Intel
  • Permissions: Calendar access (requested on first launch)

Dependencies

  • SwiftUI: Main UI framework
  • EventKit: macOS Calendar integration
  • Foundation: Core logic and date handling

No external dependencies or package managers required!

πŸ›  Building from Source

Prerequisites

  • Xcode 15.0 or later
  • macOS 13.0 or later
  • Git
  • Apple Developer Team ID (update the TEAM_ID="RGFAX8X946" placeholder in build_app.sh and SessionFlow.xcodeproj/project.pbxproj to your own Team ID before running the build scripts)

Clone and Build

# Clone the repository
git clone https://github.com/kibermaks/SessionFlow.git
cd SessionFlow

# Build using the build script (creates Release build)
./build_app.sh

# Or open in Xcode
open SessionFlow.xcodeproj

Build Scripts

The project includes several convenience scripts:

./build_app.sh [major|minor|patch|version X.Y]

Builds a Release version of the app with version management.

⚠️ Before running, update the TEAM_ID="RGFAX8X946" placeholder in both build_app.sh and SessionFlow.xcodeproj/project.pbxproj so the script can sign with your Apple Developer account.

# Increment build number only (default)
./build_app.sh

# Bump minor version (1.0 β†’ 1.1)
./build_app.sh minor

# Bump major version (1.0 β†’ 2.0)
./build_app.sh major

# Set specific version
./build_app.sh version 1.5

What it does:

  • Updates version numbers in project file
  • Builds Release configuration
  • Signs the app (if certificates available)
  • Outputs to ./build_output/
  • Copies app to current directory
  • Launches the built app

./create_dmg.sh

Creates a distributable DMG file for the app.

# Create DMG from built app
./create_dmg.sh

What it does:

  • Packages the app into a DMG
  • Creates Applications folder symlink
  • Adds README with installation instructions
  • Outputs to ./dmg_output/
  • Names file as SessionFlow-vX.Y.dmg

Development Workflow

# 1. Make your changes in Xcode
open SessionFlow.xcodeproj

# 2. Build and test locally
./build_app.sh

# 3. When ready to release, create DMG
./create_dmg.sh

πŸ“š Documentation

For Users

For Developers

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on:

  • Setting up your development environment
  • Code style and standards
  • Submitting pull requests
  • Reporting issues
  • Feature requests

πŸ“‹ Roadmap

Future features and improvements:

  • Multi-day scheduling
  • Recurring session templates
  • iCloud sync for presets
  • Custom session colors and icons
  • Calendar widget support

πŸ› Known Issues

Check the Issues page for current known issues and feature requests.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built with SwiftUI by Apple
  • Calendar integration powered by EventKit
  • Inspired by the need for better task scheduling and time management

πŸ’¬ Community & Support

⭐ Star History

If you find this project useful, please consider giving it a star!


Made with ❀️ for productive Mac users

Report Bug β€’ Request Feature β€’ View Releases

About

Native macOS app that auto-schedules deep work, focus, and side sessions around your calendar, with session awareness, ambient sounds, and a mini player

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors