This application is a Progressive Web App that serves the frontend of "PlebChat" - an AI-chat application where users are anonymous and pay-per-token with bitcoin in the form of eCash (cashu tokens).
Upon first use the application will show a series of welcome popups that serve to educate the user on steps to install the PWA, import backed-up API keys (from other sessions), paste cashu tokens in order to setup a new API key, or skip in order to browse the app and become familiar.
npm install
npm run icons # generate PNGs and Apple touch icon
npm run dev # http://localhost:5175
npm run build
npm run preview # http://localhost:5174
- Vue 3 + Vue Router (SPA)
- Vite
- vite-plugin-pwa (registerType: autoUpdate; Workbox with skipWaiting + clientsClaim)
- Authoritative template docs:
docs/VUE.md(Vue + Vite + vite-plugin-pwa) - cashu.me reference docs (Quasar-based):
docs/PWA.md,docs/FAQ.md(kept for background; concepts map to Vite equivalents) - Submodule (do not edit):
Inspiration/cashu.me/
- SW is generated by vite-plugin-pwa and registered via
useRegisterSWinsrc/App.vue. - Only the app shell is precached. External APIs (height/price) are fetched with
cache: 'no-store'and are never cached by the SW.
- Development icons live in
public/icons/and are referenced by the PWA manifest configured invite.config.js. - SVG sources:
public/icons/icon-192.svg,public/icons/icon-512.svg. - PNGs (preferred by many platforms):
public/icons/icon-192.png,public/icons/icon-512.png. - Apple touch icon:
public/icons/apple-touch-icon.png. - Generate icons from SVGs: run
npm run icons.
- Netlify or Cloudflare Pages: add a
_redirectsfile at the repo root or inpublic/containing:/* /index.html 200 - Vercel: add
vercel.jsonwith:{ "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] } - Nginx:
location / { try_files $uri $uri/ /index.html; } - Apache (
.htaccess):<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L] </IfModule> - GitHub Pages: copy
dist/index.htmltodist/404.htmlduring deploy so unknown routes serve the SPA.