Skip to content

Latest commit

 

History

118 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FoveaFlow logo

FoveaFlow

Eye training, right in your browser.
Follow a moving target, practice quick refocus, or hold your gaze through distractions.
Set the pace yourself.

Open FoveaFlow ↗   ·   Guide   ·   Run locally

FREE TO USE   /   NO ACCOUNT   /   NO INSTALL

FoveaFlow running in dark mode, with a yellow tracking target and floating controls, against an orange background

Pick a drill

01 / TRACKING

Smooth Pursuit

Follow one target along a moving path. Choose a steady sweep, a figure eight, or random motion.

02 / REFOCUS

Reaction Jumps

Find the target each time it jumps to a new position. Adjust the pace as you go.

03 / DISTRACTIONS

Multiple Distractions

Keep track of the brightest target among moving distractors. Control their number and brightness.

04 / PERIPHERAL AWARENESS

Lilac Chaser

Hold your gaze on the center while noticing changes around it. Tune the ring's scale and color.

Make it comfortable

Start with a large target and a slow speed. Use the floating controls to adjust both while the drill runs.

Adjust What you control
Motion Random paths, sweeps, figure eight, bounce, Lissajous, corner tour, and more.
Pace Speed in deg/s, cm/s, or screen/s.
Target Size, shape, color, opacity, and trails.
Calibration Viewing distance and CSS pixels per centimeter.
Appearance Light and dark themes, distractor brightness, and Lilac Chaser scale.

Your settings stay in your browser and carry over to your next visit.

FoveaFlow is practice software, not medical care. Stop if you feel eye strain, dizziness, headache, nausea, or other discomfort. If you have an eye condition, light sensitivity, seizures, or recent eye surgery, ask a qualified clinician before using visual training tools.

Run locally

Use Bun 1.4.1 and Node.js 24, as selected by .node-version. The minimum supported Node.js version is 22.12.0.

bun install
bun run dev

Open 127.0.0.1:4321.

The app uses Astro for its shell, Svelte 5 for the controls, and a TypeScript canvas engine for the drills. Tailwind CSS 4, shadcn-svelte, and Bits UI handle the interface.

Development commands
Command Purpose
bun run dev Start the local Astro server.
bun run build Build the production app and generate CSP headers.
bun run preview Build and preview locally through Wrangler.
bun run check Check Astro, Svelte, and application types.
bun run check:tools Check tooling types.
bun run check:i18n Check translation coverage.
bun run lint Check code and formatting with Ultracite.
bun run fix Apply Ultracite fixes and format Astro files.
bun run format Format with Oxfmt and the Astro Prettier plugin.
bun run test Build and run the release browser tests.
bun run verify Run the full quality gate, including the dependency audit.

bun run test:release runs the same suite as bun run test. bun run prepush runs the same checks as bun run verify.

Checks and deployment

Install the test browser and enable the pre-push hook once per clone:

bunx playwright install chromium
git config core.hooksPath .githooks

The hook runs lint, formatting, type checks, translation coverage, Tailwind diagnostics, the production build, browser tests, and a dependency audit.

The release suite checks every trainer route and public page on desktop and mobile Chromium. It exercises drill and path selection, canvas animation, pause/resume, settings, persistence, and reset. Browser errors and failed site resources fail the run; failure screenshots and traces land in test-results/.

Set TEST_PORT if the default test port, 4323, is occupied. GitHub Actions runs the full verification on pull requests and deploys to Cloudflare after successful verification on main.

Where things live
src/pages/                  Astro routes
src/lib/components/         Svelte app and UI components
src/lib/trainer/            Trainer state, rendering, and settings
src/lib/engine/             Patterns, profiles, safety, and storage
src/styles/                 Global styles and Tailwind setup
public/logo-render/         SVG logo
public/metadata/            App icons and social image
tests/release.playwright.ts Desktop and mobile release checks
Ideas for later
  • Session history and basic progress stats.
  • Guided routines for warmups, tracking, reaction drills, and cooldowns.
  • A clearer calibration flow for screen size and viewing distance.
  • Exportable presets.
  • Short demo clips.

Background reading


foveaflow.com   ·   MIT license