Skip to content

ddv1982/soft-focus

Repository files navigation

Soft Focus

Open Soft Focus

TypeScript 6.0.3 Phaser 4.0.0 Vite 8.0.10

Soft Focus is a small guided-practice app for short, quiet attention resets. It offers simple visual and written cues, then gives you a place to pause, finish, and reflect.

Soft Focus is not a medical tool, a diagnosis tool, or a substitute for care from a qualified professional. It does not make health claims. It is meant to support brief personal practice in a calm, low-pressure way.

Practices

  • Phrase Anchor: choose a short phrase and return to it as a steady point of attention.
  • Moving Ball: follow a slow visual sweep with optional gaze guidance.
  • Breathing Reset: use a paced breathing cue with gentle preset rhythms.
  • Bilateral Rhythm: follow a simple left-right rhythm.
  • Orienting: look around slowly and notice what is present in the space around you.
  • Completion / Reflection: close a round, optionally write a short note, and decide what to do next.

Preferences

Soft Focus includes a few preferences for making practice feel less intense:

  • Low intensity softens the presentation where available.
  • Reduced motion uses calmer movement or guidance where available.
  • Gaze guidance can be adjusted for practices that use visual following.

Recent Results

Recent results and reflections are saved locally on your device in this browser. They are not sent to a server by this app.

You can clear saved recent results from the Recent results area.

Run Locally

Soft Focus uses Bun.

  • bun install: install dependencies.
  • bun run dev: start the local development server.
  • bun run build: typecheck and create a production build.
  • bun run preview: preview the production build locally.
  • bun run typecheck: run TypeScript checks.
  • bun run smoke:test: run focused smoke checks.
  • bun run validate: run typecheck, smoke checks, and a production build.
  • bun run e2e:install: install the local Chromium browser used by Playwright.
  • bun run e2e:test: run Playwright end-to-end tests.

Deploy to Vercel

Soft Focus deploys as a static Vite app to the existing Vercel project named soft-focus.

  • Vercel settings are captured in vercel.json: Vite framework, bun install --frozen-lockfile, bun run build, and dist output.
  • Git-based Vercel deployments are disabled in vercel.json; production deploys are handled by the dedicated Vercel Deploy GitHub Actions workflow on pushes to main or manual workflow dispatch, matching space-explorer.
  • The workflow requires these repository secrets: VERCEL_TOKEN, VERCEL_ORG_ID, and VERCEL_PROJECT_ID.
  • Get VERCEL_ORG_ID and VERCEL_PROJECT_ID by linking the local repo to the existing Vercel project with vercel link, then reading .vercel/project.json. Keep .vercel/ local; it is ignored by git.
  • The workflow uses vercel pull, vercel build --prod, then vercel deploy --prebuilt --prod, so Vercel serves the prebuilt static output without enabling automatic Vercel Git deployments.

Releases

Releases are published intentionally by the manual Release GitHub Actions workflow.

  • Merges to main and direct pushes to main run CI and production deployment, but they do not create releases automatically.
  • Release requests should use the Release workflow's workflow_dispatch trigger from main. The manual trigger accepts an optional version input and optional notes override.
  • Release tags use vMAJOR.MINOR.PATCH. If no version is provided, the workflow creates v0.1.0 for the first release and then increments the latest v* patch version for later releases.
  • Release notes are generated by GitHub unless the manual notes input is provided.
  • The release workflow runs bun run validate, installs Playwright Chromium, runs bun run e2e:test, and uses the repository GITHUB_TOKEN with contents: write so it can create the tag and GitHub release.

To request a release manually, ask for a release and include the version only when you want to override the automatic next patch version, for example v0.2.0. Before requesting a manual release, make sure the intended commit is on main; the workflow will run the same local validation and browser E2E checks before publishing.

About

Guided Soft Focus app for breathing, awareness, and eye movement exercises

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors