cloudflare-workers-architecture

Define a scalable Cloudflare Workers architecture blueprint for SvelteKit API routes and TypeScript.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/onichandame/zapdo --skill cloudflare-workers-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-workers-architecture
Source: https://github.com/onichandame/zapdo/tree/main/.opencode/skill/cloudflare-workers-api/architecture
Command: npx skills add https://github.com/onichandame/zapdo --skill cloudflare-workers-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a scalable architecture blueprint for Cloudflare Workers projects built with SvelteKit API routes, TypeScript, and a consistent environment setup to accelerate team-led development and deployments.

Core Features & Use Cases

  • Structured project layout: Recommends a clear src/lib/server and src/routes/api structure, along with essential config files like wrangler.toml and drizzle.config.ts to streamline development and deployment.
  • Typing and environment patterns: Includes an Env interface and global App types to standardize bindings, authentication, and error handling across API routes.
  • Deployment readiness: Demonstrates typical Cloudflare setup with Wrangler for production deployments and common API routing patterns for serverless workloads.

Quick Start

To start, adopt the recommended file layout, install necessary dependencies, and configure wrangler.toml for your environment; then create a basic API route under src/routes/api to verify the setup.

Frequently Asked Questions about cloudflare-workers-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a SvelteKit project for Cloudflare Workers API routes?

Structure your SvelteKit project for Cloudflare Workers by adopting a conventional file layout with src/lib/server for backend logic and src/routes/api for endpoints. This blueprint standardizes API routing patterns and environment configuration to accelerate team deployments.

What is the recommended way to manage TypeScript typings and environment bindings in a Cloudflare Workers SvelteKit app?

Manage TypeScript typings and environment bindings in a Cloudflare Workers SvelteKit app by implementing an Env interface and global App types. This standardizes authentication, bindings, and error handling across all serverless API routes.

Can I use this architecture blueprint to refactor an existing Cloudflare Workers project?

Yes, you can use this architecture blueprint to refactor an existing Cloudflare Workers project. It provides standardized environment configuration, typing patterns, and deployment tooling to scale applications seeking a conventional SvelteKit API routing structure.

What's the best way to configure deployment tooling for a SvelteKit Cloudflare Workers application?

The best way to configure deployment tooling for a SvelteKit Cloudflare Workers application is using a wrangler.toml file. This blueprint includes essential configuration files like wrangler.toml and drizzle.config.ts to streamline Wrangler production deployments.

How do I verify my Cloudflare Workers SvelteKit setup after applying this architecture?

Verify your Cloudflare Workers SvelteKit setup by creating a basic API route under src/routes/api. After installing necessary dependencies and configuring wrangler.toml for your environment, testing this endpoint confirms the serverless architecture is functioning correctly.