A peaceful, offline-capable writing environment with nature ambiance and rich text formatting.
- ✍️ Rich text editor with formatting toolbar (Bold, Italic, Underline, Strikethrough, Headings)
- 🎵 Offline ambient nature sounds (Rain, Forest, Ocean, Night) generated via Web Audio API
- 📊 Audio visualizer around editor border
- 🕐 Gradient-animated clock display
- 💾 Auto-saves content to localStorage
- 📴 Fully offline-capable PWA
- 📱 Installable on desktop and mobile devices
- 🎨 Beautiful gradient backgrounds for each scene
- Place all files in a directory
- Start a local web server (required for service worker):
# Using Python
python3 -m http.server 8000
# Using Node.js
npx serve
# Using PHP
php -S localhost:8000- Open browser to
http://localhost:8000 - Click install icon in address bar or use browser menu to "Install App"
-
Upload all files to your web hosting:
- index.html
- zen-editor.jsx
- manifest.json
- service-worker.js
- icon-192.png
- icon-512.png
-
Ensure HTTPS is enabled (required for PWA)
-
Visit your URL and install the app
index.html- Main HTML file with PWA setupzen-editor.jsx- React application codemanifest.json- PWA manifest configurationservice-worker.js- Service worker for offline capabilityicon-192.png- App icon (192x192)icon-512.png- App icon (512x512)icon.svg- Source SVG icon
The app works completely offline by:
- Service Worker Caching - All HTML, CSS, JS files are cached
- Web Audio API - Nature sounds generated client-side (no downloads needed)
- LocalStorage - Content automatically saved to browser storage
- Embedded Resources - All assets are self-contained
- Click the ▼ button in top-right of editor to show/hide toolbar
- Use toolbar buttons to format selected text
- Supports: Bold, Italic, Underline, Strikethrough, H1, H2, H3, Paragraph
- Click ▶ to play ambient nature sounds
- Adjust volume with slider
- Switch between scenes: Rain, Forest, Ocean, Night
- Visualizer shows animated bars around editor when playing
- Standard text editing shortcuts work (Ctrl/Cmd + B for bold, etc.)
Works on all modern browsers that support:
- Service Workers
- Web Audio API
- LocalStorage
- ES6+ JavaScript
Tested on:
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Mobile browsers (iOS Safari, Chrome Mobile)
- No data sent to servers
- Everything stored locally in browser
- No analytics or tracking
- No network requests after initial load
- Framework: React 18
- Audio: Web Audio API (no external audio files)
- Storage: LocalStorage
- Offline: Service Worker with cache-first strategy
- Styling: Pure CSS with animations
Edit zen-editor.jsx to customize:
- Scene gradients in
NATURE_SCENESarray - Audio generation in
generateAmbientAudio()function - Editor styles in the
stylesconstant
Free to use and modify for personal and commercial projects.