What is Frontend Integration?
Frontend integration lets you:- Develop: Proxy to Vite/webpack dev server with hot reload
- Build: Compile your frontend with your Go app
- Deploy: Embed frontend assets in a single Go binary
- Serve: Serve SPA with proper routing and caching
Supported Frameworks
| Framework | Template | Dev Server |
|---|---|---|
| React | frontend:react | Vite |
| React Router | frontend:reactrouter | Vite |
| Vue | frontend:vue | Vite |
| Svelte | frontend:svelte | Vite |
| SvelteKit | frontend:sveltekit | Vite |
| Angular | frontend:angular | Angular CLI |
| HTMX | frontend:htmx | Vite |
| Next.js | frontend:next | Next.js |
| Nuxt | frontend:nuxt | Nuxt |
| Preact | frontend:preact | Vite |
| Alpine.js | frontend:alpine | Vite |
Quick Start
1. Create a Project
2. Project Structure
3. Development Mode
4. Production Build
Development Workflow
Proxy to Dev Server
In development, Mizu proxies frontend requests to Vite:Hot Module Replacement
With the proxy, you get full HMR support:- Edit React/Vue/Svelte components
- Browser updates instantly
- No page refresh needed
- State preserved
Production Deployment
Embedding Assets
Embed frontend assets in your Go binary:Build Script
Dockerfile
Framework Examples
React
Vue
Svelte
Configuration
Frontend Config
Vite Config
Environment Variables
Inject environment variables at runtime:SPA Routing
Handle client-side routing:/users/123 return index.html so React Router/Vue Router can handle them.
Caching Strategies
Immutable Assets
HTML Files
Security
Content Security Policy
CORS for API
Learn More
Frontend Documentation
Complete frontend integration guide.
Framework Guides
Detailed guides for each framework.