Zen Type is a typing app built with Astro 5 and React 19, themed with the Rosé Pine palette. It includes an open-ended Zen mode and a quote practice mode, sharing a consistent UI styled with Tailwind CSS.
- Framework: Astro 5 with islands powered by React 19 components in
src/components/ - Runtime: Bun-first workflow for development, builds, and testing
- Styling: Tailwind CSS layered over a custom Rosé Pine design system in
src/styles/globals.css - Routing: Two primary surfaces,
src/pages/zen.astroandsrc/pages/quote.astro, backed by shared stateful React hooks - Storage: Local persistence via
src/utils/storage.tsso sessions, streaks, and preferences stay with the device
ZenCanvas.tsxrenders floating word tokens and session overlays- Session markers, ghost text recovery, and local analytics keep longer sessions consistent
- Theme presets (Void, Forest, Ocean, Cosmic) adjust gradients while keeping Rosé Pine core colors
QuoteTyper.tsxtracks accuracy and WPM for curated quotes- Live region announcements surface progress for screen reader users
- Export helpers in
src/utils/export.tscreate shareable session summaries
- Base
#191724and Overlay#26233adrive the dark surfaces and glassmorphism - Text
#e0def4provides primary legibility across backgrounds - Accents Foam
#9ccfd8, Iris#c4a7e7, and Gold#f6c177are used for focus rings, metrics, and highlights - High contrast and reduced motion toggles reuse the same palette to meet accessibility preferences
- CSS custom properties in
src/styles/globals.cssmap directly to Rosé Pine reference values
- Astro islands host React components such as
AboutPanel.tsx,StatsBar.tsx, andSettingsPanel.tsx - State Management leverages hooks in
src/hooks/, including motion preference detection and session state machines - Utilities in
src/utils/handle Dexie-backed archives, quote hydration, web vitals logging, and preference schemas - Testing sits alongside components using Vitest and Testing Library for realistic interaction checks
- Bun v1.0+
- Node.js 18+ (only required for ecosystem tooling)
- Modern browser with hardware acceleration enabled
git clone https://github.com/jonathanreed/zen-type.git
cd zen-type
bun install
bun run devbun run build
bun run previewThe build step emits an optimized static bundle with on-demand React islands, manual Rollup chunks, and image service support.
bun run dev– Astro dev server with HMR and Bun runtimebun run build– Production bundle targeting static outputbun run preview– Serve the built site locally for smoke testingbun run lint– ESLint with Astro, React, and accessibility presetsbun run check–astro checktype-safety and content validationbun run test/bun run test:run/bun run test:coverage– Vitest suites for components and utilities
src/
├── components/ # React islands (Overlays, StatsBar, SettingsPanel, etc.)
├── hooks/ # Motion preference, session logic, and timers
├── pages/ # Astro surfaces: zen.astro, quote.astro, and supporting routes
├── styles/ # globals.css contains Rosé Pine tokens and Tailwind layers
├── types/ # Ambient type declarations (e.g., Astro font modules)
└── utils/ # Storage, quotes, export, and performance helpers
- Keyboard first: full tab navigation, skip links, and visible focus states
- Screen reader friendly: live regions and ARIA descriptors cover both typing modes
- Motion sensitivity:
useMotionPreference()disables non-essential animations when reduced motion is requested - High contrast: a high contrast toggle raises color contrast using the Rosé Pine Love and Foam values
- Fork and branch from
main bun run lintandbun run test:runbefore opening a PR- Keep Rosé Pine theming consistent by reusing CSS custom properties
- Document new keyboard shortcuts or overlays directly in this README
This project is licensed under the MIT License.
- Rosé Pine for the color palette
- Astro for the application framework
- React for island interactivity
- Tailwind CSS for utility styling
- Bun for the development runtime