Prerequisites
Before starting, make sure you have:- Go 1.22 or later - Download Go
- Mizu CLI - Install with
go install github.com/go-mizu/mizu/cmd/cli@latest
Create Your First Mobile Backend
Step 1: Create a New Project
Create a minimal Mizu project:Step 2: Add Mobile Middleware
Update yourmain.go to add mobile support:
Step 3: Run the Server
http://localhost:3000.
Test Your API
Test with Mobile Headers
Test API Versioning
Add More Features
Require Device ID
X-Device-ID return 400 Bad Request.
Enforce Minimum App Version
Add Offline Sync
Add Push Token Registration
Create a Mobile Client
Using a Template
Create a complete mobile client with matching SDK:Manual Client Setup
iOS (Swift)
Android (Kotlin)
Flutter (Dart)
Project Structure
A typical mobile backend project:Common Patterns
Platform-Specific Responses
Graceful Version Migration
Structured Error Responses
Next Steps
Youβve created your first mobile backend! Hereβs what to explore next:Device Detection
Deep dive into device parsing and validation
API Versioning
Learn about version management
Offline Sync
Implement delta synchronization
Push Notifications
Handle push token registration