CONNECT • BREATHE • COMPLETE
A calm, minimalist path-connection puzzle for the web.
Link matching colors, fill every cell, and slip into focus. No timers, no penalties.
![]() |
![]() |
![]() |
| Dark theme | Light theme | Level picker |
Each color appears exactly twice on the grid. Draw a path between every matching pair.
- Paths move horizontally or vertically. No diagonals.
- Paths can't cross, overlap or share a cell.
- Most levels also ask you to fill the whole board.
Connect every pair under those rules and the level is complete.
- 🧩 18 hand-made levels in three packs: Settle In (5×5), Find the Rhythm (6×6) and Deep Focus (7×7). A validator checks every level against its canonical solution.
- ✍️ Smooth drawing. Pointer capture with cell interpolation, so quick swipes never skip a cell. Drag backwards to pull a path back.
- 💡 Gentle hints. The next correct cell pulses softly. Nothing is drawn for you.
- ↩️ Undo and restart, with
Ctrl/Cmd + Zsupport and a confirmation step before you lose progress. - ⌨️ Fully playable from the keyboard. Screen-reader labels and markers that don't rely on color alone.
- 🌗 Dark and light themes. Animations are toned down when the system asks for reduced motion (
prefers-reduced-motion). - 🔊 Synthesized sound. Every sound is generated live with the Web Audio API, and there are no audio files. Sound is off by default.
- 💾 Progress is saved to
localStorage, with schema validation and a safe fallback. - 📱 Installable PWA. A service worker, with its asset list filled in at build time, keeps it playable offline.
| Action | Touch / Mouse | Keyboard |
|---|---|---|
| Start a path | Press on an endpoint or a path's open end | Tab to the grid, then Space / Enter |
| Draw | Drag to neighboring cells | Arrow keys |
| Pull back / cancel | Drag back along the path | Backspace / Escape |
| Undo | Undo button | Ctrl/Cmd + Z |
| UI | React 19, TypeScript, CSS Modules with design tokens. No CSS framework. |
| Build | Vite 8, plus a custom service-worker asset injection step |
| Audio | Web Audio API with oscillators and envelopes |
| Quality | Vitest, React Testing Library, Oxlint |
git clone https://github.com/gorkemio/flowstate.git
cd flowstate
npm install
npm run devThen open the local URL that Vite prints.
| Command | Description |
|---|---|
npm run dev |
Start the dev server |
npm run build |
Type-check and build for production |
npm run build:games |
Build for the /games/flowstate/ path |
npm run build:subdomain |
Build for a root / deployment |
npm run preview |
Serve the production build locally |
npm test |
Run the unit and component tests |
npm run lint |
Lint with Oxlint |
npm run typecheck |
Run the TypeScript compiler with no output |
Note: On Node.js 25 and later, the built-in
localStoragehides the jsdom one. Run the tests withNODE_OPTIONS=--no-experimental-webstorage npm test.
src/
├── app/ # App shell and layout
├── components/ # Board, Controls, Header, LevelMeta, LevelPicker, modals
├── game/ # Pure game logic: levels, path rules, reducer, validator, storage
├── hooks/ # useFlowGame, useKeyboardPath, useGameAudio
├── audio/ # Web Audio engine and sound presets
└── styles/ # Design tokens and global styles
docs/ # Product brief, game and level design, architecture, test plans
The game logic in src/game has no UI code, so it can be tested on its own. React only renders state and sends actions to the reducer.
Flow State is one of four calm, focus-friendly puzzle games built on the same foundations:
| Game | Genre | Tagline |
|---|---|---|
| 2048 Nova | Number merging | Classic puzzle |
| Flow State | Path connection | Connect • Breathe • Complete |
| Block Ritual | Block placement | Place • Clear • Repeat |
| Pixel Logic | Nonogram | Reveal • Reason • Rest |


