Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.
中文简介正在准备中。当前显示原文说明。
Expert guide for Local-First & Offline-First architectures, CRDT conflict-free sync (RxDB, ElectricSQL, PowerSync), OPFS SQLite, Service Worker v3, and PWABuilder deployment / Panduan ahli arsitektur Offline-First & Local-First PWA.
中文简介正在准备中。当前显示原文说明。
安装前可以查看交给 AI 代理的指令内容。
<a name="english"></a>
Expert guide for building enterprise-grade Local-First and Progressive Web Applications (PWA). Eliminates loading spinners by reading and writing to local databases (OPFS SQLite, RxDB, IndexedDB) first, replicating seamlessly in the background with zero conflict (CRDTs, ElectricSQL, PowerSync), and packaging to native stores via PWABuilder.
// sw.ts - Production Service Worker with Stale-While-Revalidate
/// <reference lib="webworker" />
declare const self: ServiceWorkerGlobalScope;
const CACHE_NAME = 'app-v2.11.0-cache';
const STATIC_ASSETS = [
'/',
'/index.html',
'/manifest.json',
'/styles/global.css',
'/icons/icon-512x512.png',
];
// 1. Install & Pre-cache critical application shell
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => cache.addAll(STATIC_ASSETS))
);
self.skipWaiting();
});
// 2. Activate & Clean stale caches
self.addEventListener('activate', (event) => {
event.waitUntil(
caches.keys().then((keys) =>
Promise.all(
keys.filter((k) => k !== CACHE_NAME).map((k) => caches.delete(k))
)
)
);
self.clients.claim();
});
// 3. Stale-While-Revalidate Strategy for Navigation & API GETs
self.addEventListener('fetch', (event) => {
const { request } = event;
// Ignore POST/PUT/DELETE mutations (handled by offline sync queues)
if (request.method !== 'GET') return;
event.respondWith(
caches.open(CACHE_NAME).then(async (cache) => {
const cachedResponse = await cache.match(request);
const fetchPromise = fetch(request)
.then((networkResponse) => {
if (networkResponse.status === 200) {
cache.put(request, networkResponse.clone());
}
return networkResponse;
})
.catch(() => cachedResponse || Response.error());
return cachedResponse || fetchPromise;
})
);
});
// 4. Background Sync for offline mutations
self.addEventListener('sync', (event: any) => {
if (event.tag === 'sync-mutations') {
event.waitUntil(flushOfflineMutationQueue());
}
});
async function flushOfflineMutationQueue() {
// Read pending mutations from IndexedDB and POST to backend
}
// local-db.ts - Reactive Offline-First Database with Background Replication
import { createRxDatabase, addRxPlugin } from 'rxdb';
import { getRxStorageDexie } from 'rxdb/plugins/storage-dexie';
import { replicateGraphQL } from 'rxdb/plugins/replication-graphql';
export interface TaskDocType {
id: string;
title: string;
isCompleted: boolean;
updatedAt: string;
}
const taskSchema = {
version: 0,
primaryKey: 'id',
type: 'object',
properties: {
id: { type: 'string', maxLength: 100 },
title: { type: 'string' },
isCompleted: { type: 'boolean' },
updatedAt: { type: 'string', format: 'date-time' },
},
required: ['id', 'title', 'isCompleted', 'updatedAt'],
};
export async function initLocalDB() {
const db = await createRxDatabase({
name: 'app_local_db',
storage: getRxStorageDexie(),
});
await db.addCollections({
tasks: { schema: taskSchema },
});
// Background Replication with Server (GraphQL / REST Sync)
replicateGraphQL({
collection: db.tasks,
url: 'https://api.myapp.com/graphql',
pull: {
queryBuilder: (doc) => ({
query: `query { syncTasks(since: "${doc ? doc.updatedAt : 0}") { id title isCompleted updatedAt } }`,
variables: {},
}),
modifier: (doc) => doc,
},
push: {
queryBuilder: (doc) => ({
query: `mutation { pushTask(task: ${JSON.stringify(doc)}) { id } }`,
variables: {},
}),
batchSize: 10,
},
live: true,
retryTime: 1000 * 5, // Auto-retry on network reconnection
});
return db;
}
To distribute your web application on Google Play Store (TWA - Trusted Web Activity) and Microsoft Windows Store:
display: "standalone"id: "/?source=pwa"icons: At least 192x192 and 512x512 maskable PNGs.shortcuts for rapid action launching.npx @pwabuilder/cli https://myapp.com
modern-web-guidance: Modern Web APIs, PWA install prompts, and service worker best practices.design-system-architect: Offline state indicators, sync status chips, and install prompt modals.ui-ux-pro-max: Offline UX patterns, optimistic mutation feedback, and 0ms instantaneous navigation.visual-ui-auditor: Multimodal vision auditing of offline banners, install dialogs, and standalone PWA windows.anti-slop: Anti-slop PWA engineering, zero fake offline mockups, and complete Service Worker lifecycles.senior-frontend: For UI integration with offline state bars and optimistic mutation hooks.state-management-expert: For connecting RxDB / local stores with Zustand or TanStack Store.database-orm-expert: For designing compatible backend schemas with ElectricSQL / Postgres.email-notification-expert: For Web Push Notification subscription handling.<a name="bahasa-indonesia"></a>
modern-web-guidance: API Web Modern, prompt instalasi PWA, dan praktik terbaik service worker.design-system-architect: Indikator status offline, chip status sinkronisasi, dan modal prompt instalasi.ui-ux-pro-max: Pola UX offline, feedback mutasi optimistik, dan navigasi instan 0ms.visual-ui-auditor: Audit visual multimodal untuk banner offline, dialog instalasi, dan window PWA standalone.anti-slop: Rekayasa PWA anti-slop, nol mockup offline palsu, dan siklus hidup Service Worker lengkap.senior-frontend: Integrasi UI indikator status offline dan hook mutasi optimistik.state-management-expert: Menghubungkan RxDB / local storage ke Zustand atau TanStack Store.database-orm-expert: Perancangan skema backend PostgreSQL yang kompatibel dengan replikasi CRDT / ElectricSQL.email-notification-expert: Penanganan registrasi dan subscription Web Push Notification.Panduan ahli untuk membangun aplikasi web Local-First dan Progressive Web Applications (PWA) kelas enterprise. Menghilangkan ketergantungan loading spinner dengan membaca dan menulis langsung ke database lokal (OPFS SQLite, RxDB, IndexedDB) terlebih dahulu, sinkronisasi otomatis di latar belakang tanpa bentrok data (CRDTs, ElectricSQL, PowerSync), dan packaging ke toko aplikasi native melalui PWABuilder.
sw.ts)/// <reference lib="webworker" />
declare const self: ServiceWorkerGlobalScope;
const NAMA_CACHE = 'aplikasi-shell-v4.3.0';
const ASET_STATIS = [
'/',
'/index.html',
'/manifest.json',
'/styles/global.css',
'/icons/icon-512x512.png',
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(NAMA_CACHE).then((cache) => cache.addAll(ASET_STATIS))
);
self.skipWaiting();
});
self.addEventListener('activate', (event) => {
event.waitUntil(
caches.keys().then((keys) =>
Promise.all(keys.filter((k) => k !== NAMA_CACHE).map((k) => caches.delete(k)))
)
);
self.clients.claim();
});
self.addEventListener('fetch', (event) => {
if (event.request.method !== 'GET') return;
event.respondWith(
caches.open(NAMA_CACHE).then(async (cache) => {
const responsTercache = await cache.match(event.request);
const janjiJaringan = fetch(event.request)
.then((networkRes) => {
if (networkRes.status === 200) {
cache.put(event.request, networkRes.clone());
}
return networkRes;
})
.catch(() => responsTercache || Response.error());
return responsTercache || janjiJaringan;
})
);
});
import { createRxDatabase } from 'rxdb';
import { getRxStorageDexie } from 'rxdb/plugins/storage-dexie';
export async function inisialisasiDatabaseLokal() {
const db = await createRxDatabase({
name: 'db_lokal_pengguna',
storage: getRxStorageDexie(),
});
await db.addCollections({
tugas: {
schema: {
version: 0,
primaryKey: 'id',
type: 'object',
properties: {
id: { type: 'string', maxLength: 100 },
judul: { type: 'string' },
selesai: { type: 'boolean' },
diperbaruiPada: { type: 'string', format: 'date-time' },
},
required: ['id', 'judul', 'selesai', 'diperbaruiPada'],
},
},
});
return db;
}
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.
中文简介正在准备中。当前显示原文说明。
Expert guide for intelligent model cascading and routing — complexity-scored task routing from Fast (Composer 2.5, Grok 4.7/4.6) to Medium (Gemini 4 Argon, GPT-5.6 Sol, Claude Opus 5.5) and High (Claude Sonnet 5.5, Claude Fable 5.1, Muse Wonder) / Panduan ahli untuk kaskade dan routing model cerdas.
中文简介正在准备中。当前显示原文说明。
Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.
中文简介正在准备中。当前显示原文说明。
Master guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan utama komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.
中文简介正在准备中。当前显示原文说明。
Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.
中文简介正在准备中。当前显示原文说明。
Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.
中文简介正在准备中。当前显示原文说明。