Simple instructions for AI agents working on kheMessage.
kheMessage is a minimal, in-browser text editor that stores everything in the URL.
- Single HTML file architecture
- No backend, no build step
- Vanilla JavaScript (ES2020+)
- PWA with offline support
- Use async/await for async operations
- Wrap localStorage in try/catch
- Use CSS custom properties for colors
- Keep everything in single HTML file when possible
- Follow existing naming conventions (camelCase)
- Single-file first - Prefer keeping code in index.html
- No dependencies - Avoid adding npm packages
- Backwards compatible - Don't break existing URLs
- Progressive enhancement - Core features work without JS
- Accessibility - Use semantic HTML and ARIA
- Add HTML structure in appropriate section
- Add CSS styles using custom properties
- Add JavaScript with proper error handling
- Test in both light and dark themes
- Test offline functionality
- Reproduce the issue
- Check browser console for errors
- Make minimal fix
- Test in multiple browsers
- Verify no regressions
- Use CSS custom properties (--bg, --text, etc.)
- Add transitions for smooth theme changes
- Test responsive design
- Check custom cursor support
index.html- Main applicationsw.js- Service workermanifest.json- PWA manifestqr.html- Full-page QR viewqrcode.js- QR generation libraryvercel.json- Vercel platform configuration
The project is configured for automatic deployment to Vercel via GitHub Actions.
Quick deploy: npx vercel
Configuration (vercel.json):
- Clean URLs enabled (
/qrworks without.html) - Security headers (X-Frame-Options, CSP, etc.)
- Optimal cache headers for static assets
- Service worker properly configured
GitHub Actions:
- Workflow:
.github/workflows/deploy.yaml - Triggers: Push to
master/main, pull requests, manual dispatch - Requires secrets:
VERCEL_TOKEN,VERCEL_ORG_ID,VERCEL_PROJECT_ID
Important Notes:
- No build step required - deploy files as-is
- Service worker cache version in
sw.jsupdates automatically - QR codes use
location.originfor domain flexibility - All URLs work with or without custom domain