create-browserux
v1.0.1
Published
Create a standards-first BrowserUX starter with PWA, Web Components, native CSS, and browser APIs
Maintainers
Readme
npm create browserux@latestcreate-browserux scaffolds front-end starter templates built around native web standards: PWA, Web Components, semantic HTML, native CSS, browser APIs, and controlled service workers.
It is not a full-stack framework generator and does not try to replace Next, Nuxt, Astro, Remix, or similar tools. It gives you a production-ready front-end base for static sites, PWAs, and client-side applications where you keep control of the browser platform.
✨ What You Get
- 📴 PWA manifest, icons, service worker registration, and offline page.
- 🎨 BrowserUX CSS base with native user interface patterns.
- 🧩 BrowserUX Web Components for theme switching, native sharing, and PWA install/update UI.
- ⚡ Vite templates with Workbox, image optimization, preload hints, sitemap, and robots generation.
- 🔤 Optional TypeScript setup for Vite templates.
- 🧪 React/Vue templates with routing and Vitest test suites.
📦 Templates
| Logo | Template | What it is for | Stack |
|---|---|---|---|
| | raw | Pure HTML/CSS/JS with a hand-written service worker. No build step, no npm, no bundler. | HTML, CSS, Vanilla JS, Cache API |
| | vite-vanilla | Static multi-page app with Vite, Workbox, optimized assets, sitemap, and full SW control. | Vanilla JS or TS, Vite, Workbox, MPA |
| | vite-react | React 19 SPA with React Router v7, data loaders, tests, and BrowserUX Web Components. | React 19, React Router v7, Vite, Workbox, Vitest |
| | vite-vue | Vue 3 SPA with Vue Router 4, Composition API, tests, and BrowserUX Web Components. | Vue 3, Vue Router 4, Vite, Workbox, Vitest |
🚀 Usage
npm create browserux@latestThe CLI asks for:
- Project name: used as the folder name and
package.jsonname. - Template:
raw,vite-vanilla,vite-react, orvite-vue. - TypeScript: optional for Vite templates, not shown for
raw.
For Vite templates:
cd my-project
npm install
npm run devFor the raw template:
cd my-project
# Open index.html in a browser🔤 TypeScript
When TypeScript is selected, the CLI overlays typed source files onto the JavaScript template and updates devDependencies.
vite-vanilla: addstypescript.vite-react: addstypescript,@types/react, and@types/react-dom.vite-vue: addstypescriptandvue-tsc.
🧱 Standards-First Foundation
- 📱 PWA: Web App Manifest, Service Worker, Cache API, offline fallback.
- 🧩 Web Components: Custom Elements, Shadow DOM, slots, HTML attributes.
- 🎨 Native CSS: CSS variables, media queries, semantic elements, native user interface patterns.
- 🌐 Browser APIs: Web Share API,
beforeinstallprompt, View Transitions API,localStorage. - 📝 Semantic HTML: native elements and browser behavior before proprietary abstractions.
📁 Folder Handling
If the target folder already exists, the CLI asks for confirmation before merging files and replacing conflicts.
The following entries are excluded while copying templates:
| Excluded item | Reason |
|---|---|
| node_modules/ | Dependencies should be installed locally |
| dist/ | Build output should be regenerated |
| .env | Local environment files may contain secrets |
🔗 Links
📄 License
MIT © 2026 Effeilo
