Skip to content
gorkemioPublic

About

Calm, minimalist path-connection puzzle. Connect matching colors and fill the grid. React + TypeScript PWA.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Flow State icon

Flow State

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.

React TypeScript Vite PWA Tests


Screenshots

Flow State gameplay in dark theme Flow State gameplay in light theme Flow State level picker
Dark theme Light theme Level picker

How to play

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.

Features

  • 🧩 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 + Z support 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.

Controls

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

Tech stack

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

Getting started

git clone https://github.com/gorkemio/flowstate.git
cd flowstate
npm install
npm run dev

Then open the local URL that Vite prints.

Scripts

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 localStorage hides the jsdom one. Run the tests with NODE_OPTIONS=--no-experimental-webstorage npm test.

Project structure

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.

Part of a collection

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

About

Calm, minimalist path-connection puzzle. Connect matching colors and fill the grid. React + TypeScript PWA.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages