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 Cloudflare Workers ecosystem — Workers, D1 (SQLite at edge), KV, R2 (S3-compatible storage), Queues, Durable Objects, Hyperdrive, and Workers AI / Panduan ahli ekosistem Cloudflare Workers — Workers, D1, KV, R2, Queues, Durable Objects, Hyperdrive, dan Workers AI.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
<a name="english"></a>
Connects with: brainstorming, zero-to-prod-orchestrator, js-backend-expert, database-orm-expert, api-design-expert, authentication-identity-expert, wasm-edge-computing-expert, ci-cd-devops-architect, cloud-hosting-expert, session-memory-manager.
Expert guide for building full-stack edge applications using the Cloudflare Workers ecosystem. Covers Workers runtime, D1 (SQLite at edge), KV (key-value store), R2 (S3-compatible object storage), Queues (message queues), Durable Objects (stateful edge), Hyperdrive (database connection pooling), Workers AI (inference at edge), and Wrangler CLI for development and deployment.
wrangler.toml configuration.node:crypto, node:buffer, node:streams) directly in Workers.# Create new Workers project with Hono
npm create cloudflare@latest my-app -- --framework=hono
cd my-app
# wrangler.toml configuration
# wrangler.toml
name = "my-app"
compatibility_date = "2026-10-01"
compatibility_flags = ["nodejs_compat_v2"]
# D1 Database
[[d1_databases]]
binding = "DB"
database_name = "my-app-db"
database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# KV Namespace
[[kv_namespaces]]
binding = "CACHE"
id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# R2 Bucket
[[r2_buckets]]
binding = "STORAGE"
bucket_name = "my-app-assets"
# Queue Producer
[[queues.producers]]
queue = "email-queue"
binding = "EMAIL_QUEUE"
# Queue Consumer
[[queues.consumers]]
queue = "email-queue"
max_batch_size = 10
max_batch_timeout = 30
# Durable Object
[[durable_objects.bindings]]
name = "RATE_LIMITER"
class_name = "RateLimiter"
[[migrations]]
tag = "v1"
new_classes = ["RateLimiter"]
# Hyperdrive (PostgreSQL connection pooling)
[[hyperdrive]]
binding = "HYPERDRIVE"
id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Workers AI
[ai]
binding = "AI"
import { Hono } from 'hono';
import { cors } from 'hono/cors';
import { bearerAuth } from 'hono/bearer-auth';
type Bindings = {
DB: D1Database;
CACHE: KVNamespace;
STORAGE: R2Bucket;
EMAIL_QUEUE: Queue;
AI: Ai;
HYPERDRIVE: Hyperdrive;
};
const app = new Hono<{ Bindings: Bindings }>();
app.use('*', cors());
// D1 SQLite query
app.get('/api/products', async (c) => {
const { results } = await c.env.DB.prepare(
'SELECT id, name, price FROM products WHERE active = 1 ORDER BY created_at DESC LIMIT 50'
).all();
return c.json(results);
});
// KV cache-aside pattern
app.get('/api/config/:key', async (c) => {
const key = c.req.param('key');
const cached = await c.env.CACHE.get(key, 'json');
if (cached) return c.json(cached);
const { results } = await c.env.DB.prepare(
'SELECT value FROM config WHERE key = ?'
).bind(key).all();
if (results.length > 0) {
await c.env.CACHE.put(key, JSON.stringify(results[0]), { expirationTtl: 3600 });
return c.json(results[0]);
}
return c.notFound();
});
// R2 file upload
app.post('/api/upload', async (c) => {
const formData = await c.req.formData();
const file = formData.get('file') as File;
const key = `uploads/${Date.now()}-${file.name}`;
await c.env.STORAGE.put(key, file.stream(), {
httpMetadata: { contentType: file.type },
});
return c.json({ key, url: `/files/${key}` });
});
// Queue producer — send async job
app.post('/api/send-email', async (c) => {
const body = await c.req.json();
await c.env.EMAIL_QUEUE.send({
to: body.email,
subject: body.subject,
template: body.template,
});
return c.json({ status: 'queued' });
});
// Workers AI — text generation
app.post('/api/ai/generate', async (c) => {
const { prompt } = await c.req.json();
const response = await c.env.AI.run('@cf/meta/llama-3.1-8b-instruct', {
messages: [{ role: 'user', content: prompt }],
});
return c.json(response);
});
export default app;
// Queue consumer handler
export default {
...app,
async queue(batch: MessageBatch, env: Bindings): Promise<void> {
for (const message of batch.messages) {
const { to, subject, template } = message.body as EmailJob;
await sendEmail(to, subject, template); // your email sending logic
message.ack();
}
},
};
# Create migration
wrangler d1 migrations create my-app-db create_products
# Write SQL migration
# migrations/0001_create_products.sql
CREATE TABLE products (
id TEXT PRIMARY KEY DEFAULT (lower(hex(randomblob(16)))),
name TEXT NOT NULL,
price REAL NOT NULL CHECK(price >= 0),
description TEXT DEFAULT '',
active INTEGER DEFAULT 1,
created_at TEXT DEFAULT (datetime('now')),
updated_at TEXT DEFAULT (datetime('now'))
);
CREATE INDEX idx_products_active ON products(active);
CREATE INDEX idx_products_created ON products(created_at DESC);
# Apply migration
wrangler d1 migrations apply my-app-db
export class RateLimiter implements DurableObject {
private requests: number[] = [];
private readonly limit = 100;
private readonly windowMs = 60_000;
constructor(private state: DurableObjectState, private env: Bindings) {}
async fetch(request: Request): Promise<Response> {
const now = Date.now();
this.requests = this.requests.filter(t => now - t < this.windowMs);
if (this.requests.length >= this.limit) {
return new Response('Rate limit exceeded', { status: 429 });
}
this.requests.push(now);
await this.state.storage.put('requests', this.requests);
return new Response('OK', {
headers: {
'X-RateLimit-Remaining': String(this.limit - this.requests.length),
'X-RateLimit-Limit': String(this.limit),
},
});
}
}
import { Client } from 'pg';
app.get('/api/users', async (c) => {
const client = new Client({ connectionString: c.env.HYPERDRIVE.connectionString });
await client.connect();
const { rows } = await client.query('SELECT id, email, name FROM users LIMIT 100');
await client.end();
return c.json(rows);
});
waitUntil() — For fire-and-forget operations (logging, analytics) after response is sent..prepare().bind() to prevent SQL injection.wrangler dev --remote — Use remote mode to test D1, R2, and KV with real data.<a name="bahasa-indonesia"></a>
Terhubung dengan: brainstorming, zero-to-prod-orchestrator, js-backend-expert, database-orm-expert, api-design-expert, authentication-identity-expert, wasm-edge-computing-expert, ci-cd-devops-architect, cloud-hosting-expert, session-memory-manager.
Panduan ahli untuk membangun aplikasi full-stack edge menggunakan ekosistem Cloudflare Workers. Mencakup runtime Workers, D1 (SQLite di edge), KV (key-value store), R2 (object storage kompatibel S3), Queues (antrean pesan), Durable Objects (stateful edge), Hyperdrive (connection pooling database), Workers AI (inferensi di edge), dan Wrangler CLI untuk pengembangan dan deployment.
| Layanan | Fungsi | Analogi |
|---|---|---|
| Workers | Runtime serverless di edge (V8 isolates) | AWS Lambda@Edge |
| D1 | Database SQLite di edge | PlanetScale / Turso |
| KV | Key-value store terdistribusi | Redis (read-heavy) |
| R2 | Object storage (S3-compatible) | AWS S3 (tanpa biaya egress) |
| Queues | Antrean pesan | AWS SQS / BullMQ |
| Durable Objects | State persisten di edge | Stateful actors |
| Hyperdrive | Connection pooling ke DB eksternal | PgBouncer di edge |
| Workers AI | Inferensi model AI di edge | Replicate / Together AI |
waitUntil() untuk operasi fire-and-forget (logging, analitik) setelah respons dikirim.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
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 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.
中文简介正在准备中。当前显示原文说明。
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.
中文简介正在准备中。当前显示原文说明。
Expert guide for autonomous Machine-to-Machine (M2M) agent settlement, dual-rail fiat & stablecoin micro-clearing, dynamic budget envelopes, and cryptographic agent invoicing / Panduan ahli settlement otonom antar-agen (M2M), kliring mikro dual-rail fiat & stablecoin, pagu anggaran dinamis, dan penagihan agen kriptografis.
中文简介正在准备中。当前显示原文说明。
Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.
中文简介正在准备中。当前显示原文说明。