Flow Timer is a simple, privacy-respecting time-boxing timer that helps users focus by breaking work into clear task blocks.
- Site URL: https://timer.bryanhogan.com
- Stack: Astro 5, Svelte 5, TypeScript, Vite through Astro
- Build Output: Astro static site output in
dist - Core Experience: A client-side timer with task rows, progress display, optional browser notifications, and optional notification sounds
- Privacy: No personal data is collected; avoid adding server persistence or analytics without an explicit product decision
npm run dev- Start the Astro development servernpm run build- Build the production sitenpm run preview- Preview the production build locallynpm run astro- Run Astro CLI commands
- Astro for pages/layout/SEO: Keep routes, document metadata, OpenGraph/Twitter tags, canonical URLs, and shared layout behavior in Astro files.
- Svelte for interactive islands: Timer controls and header toggles are Svelte components loaded with Astro client directives.
- Svelte 5 local state: Use Svelte 5 runes such as
$state,$derived, and$effectfor component-local reactive state. - Shared toggle state:
src/stores/state.svelte.jscurrently exposesshowOptionsandshowHowTowith Svelte stores so separate client islands can communicate. Reuse this pattern for similar cross-island UI state unless doing a deliberate state refactor. - Browser-only APIs: Timer notifications and audio use browser APIs. Keep this logic inside client-loaded components or guard access to
window,Notification, andAudiowhen moving code. - No backend assumptions: This is a static site. Do not add server endpoints, databases, or server-only Node APIs unless the project direction changes.
- Accessibility matters: Preserve semantic buttons, labels, alt text, keyboard usability, and visible/focus states when changing controls.
src/pages/- Astro routes (/,/about,/privacy,/404)src/layouts/BaseLayout.astro- Global layout, metadata, canonical URLs, header/footer, global CSS importssrc/components/FlowTimer.svelte- Main timer app and timer/task/notification behaviorsrc/components/Header.astro- Header navigation and mobile menu behaviorsrc/components/Footer.astro- Footer links and social/repo linkssrc/components/SettingsToggle.svelte- Header settings toggle islandsrc/components/HowToToggle.svelte- Header how-to toggle islandsrc/stores/state.svelte.js- Shared UI state for options/how-to panelssrc/styles/var.css- Design tokenssrc/styles/global.css- Global typography and element stylessrc/styles/reset.css- CSS resetsrc/styles/util.css- Utility classespublic/icons/- UI icons and logopublic/sounds/- Notification soundspublic/images/- Public preview/share images
- Use
src/styles/var.cssas the source of truth for colors, spacing, typography, radii, shadows, and transitions. - Prefer existing CSS variables such as
--space-*,--color-*,--text-size-*,--border-radius-*, and--transition-normal. - Keep the current dark, minimal, focus-oriented visual direction.
- Use Astro components for static layout/navigation pieces and Svelte components only where interactivity is needed.
- Icons currently come from
public/icons/orsrc/components/Icons.ts; keep icon usage consistent with nearby code.
/- Main Flow Timer app/about- About Flow Timer/privacy- Privacy statement/404- Not found page