Skip to content

tylerpriest/Threshold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Threshold

Threshold helps you cross daily state transitions without relying on willpower.

A doorway appears. You step through.

Use Threshold to start a saved Spotify, YouTube, or local ritual from the app, Home Screen widgets, Lock Screen widgets, Shortcuts, Siri, Spotlight, or the Action Button. The app keeps the active crossing quiet: one timer, one small adjust control, and one stop action.

How To Use

  1. Open the native iPhone app.
  2. Pick or edit a ritual such as Morning, Wind Down, Focus, or Reset.
  3. Choose a payload: Spotify playlist, YouTube URL, or local placeholder.
  4. Set the ritual length.
  5. Tap Step Through, or start from a widget/App Shortcut.
  6. Let the active timer hold the first few minutes of the transition.
  7. Tap Stop Crossing when the ritual is finished or no longer useful.

What It Is

  • A native SwiftUI iPhone prototype.
  • A calm doorway for morning, wind-down, focus, and reset transitions.
  • A ritual launcher for Spotify playlists, YouTube URLs, and local rituals.
  • A WidgetKit/App Intents experiment for putting doorways on system surfaces.
  • A truthful iOS automation prototype that names the limits instead of hiding them.

What It Is Not

  • Not a meditation content library.
  • Not an alarm app.
  • Not a habit tracker or streak system.
  • Not a productivity dashboard.
  • Not a generic app blocker.
  • Not a simple-phone replacement.
  • Not a promise of invisible background Spotify or YouTube playback while the app is killed.

Features

  • Create and edit saved rituals.
  • Use direct, typeable, and draggable duration controls from 1 minute to 12 hours.
  • Start Spotify, YouTube, or local ritual payloads.
  • Prefer Spotify App Remote on iPhone, then Web API playback fallback.
  • Pause Spotify best-effort when a Spotify ritual stops.
  • Run a quiet active countdown with an Adjust Time sheet for the current crossing only.
  • Preserve adjusted active-session deadlines across app reopen.
  • Clean up overdue sessions when the app wakes again.
  • Expose App Intents/App Shortcuts:
    • Start Morning Ritual
    • Start Wind Down Ritual
    • Start Focus Ritual
    • Start Reset Ritual
    • Stop Current Ritual
  • Provide WidgetKit doorways for Morning, Wind Down, and configurable ritual layouts.
  • Show a setup/capability screen with honest status labels.

Non-Features

  • No accounts.
  • No cloud backend.
  • No payments.
  • No analytics dashboard.
  • No social sharing.
  • No streaks, badges, or habit scoring.
  • No uploaded media library.
  • No silent exact timer stop while the phone is locked and the app is suspended.
  • No universal app shielding without Apple's FamilyControls/ManagedSettings entitlement path.
  • No guaranteed YouTube autoplay or background playback.

Best Use

Use Threshold for small, repeated state changes where touching the phone is part of the problem: morning meditation, evening wind-down, focus entry, and nervous system reset. The strongest prototype path is an iPhone with the Spotify app installed, Spotify Premium available for playback control, and widgets or Shortcuts configured as low-friction doorways.

The product direction is based on a simple research pattern: people want fewer choices at the threshold, their own media, native launch surfaces, and honest limits. They do not want another feed, content library, guilt loop, fake blocker, or alarm that shouts at them.

iOS And Media Limits

  • Spotify playback control depends on Spotify's app, account, Premium, device, auth, and API rules.
  • Spotify App Remote can wake/control the installed Spotify app in foregrounded app flows, but it is not a silent background scheduler.
  • Spotify Web API playback can return success before playback is actually active, so Threshold verifies playback state where possible.
  • YouTube handoff opens the chosen URL; autoplay and background behavior depend on YouTube, account state, and iOS rules.
  • Widgets and App Shortcuts are good doorway surfaces, but locked-device behavior may still require unlocking before the app can run.
  • If a countdown finishes while the app is suspended, Threshold does not auto open. When the app is opened again, it closes the overdue session and attempts the normal best-effort stop path.

Privacy Notes

  • Spotify tokens are stored locally in user defaults for this prototype.
  • A Spotify Client ID is a public OAuth app identifier, but forks should create their own Spotify Developer app and paste their own Client ID.
  • No Spotify Client ID, API secret, access token, refresh token, password, or private key should be committed to this repository.
  • Saved rituals and active-session state are local to the device.
  • Bundle identifiers and signing settings should be replaced by anyone building their own fork.

Local Dev

Open the native prototype:

open ThresholdController/ThresholdController.xcodeproj

Or build from the command line with an installed simulator/runtime:

xcodebuild -project ThresholdController/ThresholdController.xcodeproj \
  -scheme ThresholdController \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  build

For a physical iPhone, open the project in Xcode, select your phone, set a Development Team for signing if prompted, and run the ThresholdController scheme.

Spotify Setup

  1. Create a Spotify Developer app.
  2. Add this redirect URI exactly:
threshold://spotify-auth
  1. Copy the Spotify Client ID.
  2. In Threshold, open Setup & Honesty.
  3. Paste the Client ID and tap Save Client ID.
  4. Tap Authorize Spotify.
  5. Start a Spotify ritual.

This path requires Spotify authorization, Spotify Premium for playback control, and a usable iPhone Spotify device.

Widgets And Shortcuts

The WidgetKit bundle provides three widget gallery entries:

  • Morning Doorway: one large Morning threshold.
  • Wind Down Doorway: one large Wind Down threshold.
  • Threshold Doorways: configurable 1-, 2-, or 4-button doorway layout.

App Shortcuts expose ritual start/stop actions to Shortcuts, Siri, Spotlight, widgets, and the Action Button on supported iPhones. Sleep Focus, Focus mode, NFC, and Action Button automations still require user setup in Shortcuts.

Tests

xcodebuild -project ThresholdController/ThresholdController.xcodeproj \
  -scheme ThresholdController \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  build

Real Spotify, YouTube, widget, and locked-device behavior should be validated on a physical iPhone because those flows depend on installed apps, account state, device state, and iOS system surfaces.

Research Docs

Public Repo Note

No license has been selected yet, so this is public source rather than an open-source project until a license is added.

About

A native iPhone threshold controller for starting calm Spotify, YouTube, and local rituals from app, widgets, and Shortcuts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages