Loading...
Loading...
Expert guide for integrating Oasis update server with Tauri apps for auto-updates, crash reporting, and feedback collection.
npx skill4agent add porkytheblack/coco oasis-server-setupporkytheblack/oasis/.github/workflows/tauri-release.yml@main┌─────────────────────────────────────────────────────────────────┐
│ Tauri Desktop App │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ Auto-Update │ │ Crash SDK │ │ Feedback SDK │ │
│ └──────┬──────┘ └──────┬──────┘ └───────────┬─────────────┘ │
└─────────┼────────────────┼─────────────────────┼────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ Oasis Server │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ /update │ │ /crashes │ │ /feedback │ │
│ │ manifests │ │ collection │ │ collection │ │
│ └──────┬──────┘ └─────────────┘ └─────────────────────────┘ │
└─────────┼───────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Cloudflare R2 (CDN) │
│ Artifact storage: .dmg, .exe, .AppImage │
└─────────────────────────────────────────────────────────────────┘npx @tauri-apps/cli signer generate -w ~/.tauri/keys/your-app.key
# Output: Public key + private key file{
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6...",
"endpoints": [
"https://oasis.yourdomain.com/your-app/update/{{target}}-{{arch}}/{{current_version}}"
],
"windows": {
"installMode": "passive"
}
}
}
}// capabilities/default.json
{
"permissions": [
"updater:default",
"updater:allow-check",
"updater:allow-download-and-install",
"process:default",
"process:allow-restart"
]
}pnpm add @oasis/sdk// lib/oasis.ts
import { initOasis } from '@oasis/sdk';
export const oasis = initOasis({
apiKey: process.env.NEXT_PUBLIC_OASIS_API_KEY!,
serverUrl: process.env.NEXT_PUBLIC_OASIS_SERVER_URL!,
appVersion: '0.1.0',
enableAutoCrashReporting: true,
});import { check } from '@tauri-apps/plugin-updater';
import { relaunch } from '@tauri-apps/plugin-process';
async function checkForUpdates() {
const update = await check();
if (update?.available) {
await update.downloadAndInstall();
await relaunch();
}
}| Endpoint | Method | Purpose |
|---|---|---|
| GET | Update manifest |
| POST | Submit feedback |
| POST | Report crashes |
| POST | Register release (CI only) |
{
"version": "0.2.0",
"notes": "Bug fixes and improvements",
"pub_date": "2024-01-15T10:00:00Z",
"platforms": {
"darwin-aarch64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6...",
"url": "https://cdn.example.com/app/v0.2.0/App_aarch64.app.tar.gz"
},
"darwin-x86_64": {
"signature": "...",
"url": "https://cdn.example.com/app/v0.2.0/App_x64.app.tar.gz"
},
"windows-x86_64": {
"signature": "...",
"url": "https://cdn.example.com/app/v0.2.0/App_x64-setup.nsis.zip"
},
"linux-x86_64": {
"signature": "...",
"url": "https://cdn.example.com/app/v0.2.0/App_amd64.AppImage.tar.gz"
}
}
}HTTP 204 No Content| Variable | Description | Example |
|---|---|---|
| Operating system | |
| CPU architecture | |
| App version | |
| Key Type | Format | Purpose |
|---|---|---|
| Public Key | | SDK operations (client-side) |
| CI Key | | Release registration (server-side) |
pk_coco_a1b2c3d4e5f6g7h8// Categorized feedback
await oasis.feedback.submit({
category: 'bug', // 'bug' | 'feature' | 'general'
message: 'Save button not working',
email: 'user@example.com',
metadata: { screen: 'settings' },
});
// Convenience methods
await oasis.feedback.reportBug('Description');
await oasis.feedback.requestFeature('Description');
await oasis.feedback.sendFeedback('Description');// Manual capture
try {
riskyOperation();
} catch (error) {
await oasis.crashes.captureException(error, {
appState: { screen: 'checkout' },
severity: 'error', // 'warning' | 'error' | 'fatal'
});
}
// Toggle auto-capture
oasis.crashes.enableAutoCrashReporting();
oasis.crashes.disableAutoCrashReporting();oasis.breadcrumbs.addNavigation('/home', '/settings');
oasis.breadcrumbs.addClick('Save Button');
oasis.breadcrumbs.addHttp('POST', '/api/save', 200);
oasis.breadcrumbs.addCustom('wallet', 'Connected', { address: '0x...' });// Set after authentication
oasis.setUser({
id: 'user-123',
email: 'user@example.com',
username: 'johndoe',
});
// Clear on logout
oasis.setUser(null);| Option | Type | Default | Description |
|---|---|---|---|
| | required | Public API key |
| | required | Oasis server URL |
| | required | Current app version |
| | | Catch uncaught errors |
| | | Breadcrumb history limit |
| | | Request timeout (ms) |
| | | Enable debug logging |
| | - | Filter/modify events |
| | - | Error callback |
| Secret | Description |
|---|---|
| Base URL (e.g., |
| CI key for release registration |
| Public SDK key (exposed to client) |
| Public server URL (exposed to client) |
| Update signing key |
| Signing key password |
{{target}}{target}0.1.0v0.1.0vinitOasis()null