How cloudflare/templates works
This repository is a collection of Cloudflare Workers starter templates, rather than one deployed application. Each template demonstrates a distinct user-to-result workflow: for example, internal-site administration and deployment, tenant website hosting, AI-brand visibility reporting, and workflow execution with live progress. The graph highlights those documented examples plus the MySQL/Postgres data-dashboard pattern. Connections are limited to calls shown in excerpts or module relationships listed in the SOURCE INDEX; many other templates are present in the tree but are not mapped here because their runtime behavior was not sampled.
Main entry points: src/index.ts Site admin · src/index.ts Tenant platform · js/app.js MySQL dashboard · js/app.js Postgres dashboard
Components 29
Site hosting
- Site admin
internal-sites-template/src/index.ts - Identity access
internal-sites-template/src/access.ts - Site database
internal-sites-template/src/db.ts - Site dispatch
internal-sites-template/src/resource.ts - Admin rendering
internal-sites-template/src/ui.ts - Tenant platform
workers-for-platforms-template/src/index.ts - Project database
workers-for-platforms-template/src/db.ts - Script dispatch
workers-for-platforms-template/src/resource.ts - Database router
workers-for-platforms-template/src/router.ts - Page rendering
workers-for-platforms-template/src/render.ts
AI visibility
- Visibility API
ai-brand-visibility-template/workers/api.ts - Worker entry
ai-brand-visibility-template/workers/app.ts - Analysis queue
ai-brand-visibility-template/workers/queue.ts - Visibility config
ai-brand-visibility-template/src/config.ts
Data dashboards
- MySQL dashboard
mysql-hyperdrive-template/public/js/app.js - MySQL API client
mysql-hyperdrive-template/public/js/services/api.js - MySQL tables
mysql-hyperdrive-template/public/js/components/tables.js - MySQL UI helpers
mysql-hyperdrive-template/public/js/components/ui.js - MySQL formatting
mysql-hyperdrive-template/public/js/utils/formatters.js - Postgres dashboard
postgres-hyperdrive-template/public/js/app.js - Postgres API client
postgres-hyperdrive-template/public/js/services/api.js - Postgres tables
postgres-hyperdrive-template/public/js/components/tables.js - Postgres UI helpers
postgres-hyperdrive-template/public/js/components/ui.js - Postgres formatting
postgres-hyperdrive-template/public/js/utils/formatters.js
Workflow demo
- Workflow interface
workflows-starter-template/src/App.tsx - Step diagram
workflows-starter-template/src/components/WorkflowDiagram.tsx - Code display
workflows-starter-template/src/components/CodeDisplay.tsx - Progress hook
workflows-starter-template/src/hooks/useWorkflowWebSocket.ts
Other components
- Template user
Connections 28
- Site admin → Identity access: authenticates
internal-sites-template/src/index.ts - Site admin → Site database: reads and writes
internal-sites-template/src/index.ts - Site admin → Site dispatch: deploys sites
internal-sites-template/src/index.ts - Site admin → Admin rendering: renders admin
internal-sites-template/src/index.ts - Tenant platform → Project database: manages projects
workers-for-platforms-template/src/index.ts - Tenant platform → Script dispatch: dispatches scripts
workers-for-platforms-template/src/index.ts - Tenant platform → Database router: uses middleware
workers-for-platforms-template/src/index.ts - Tenant platform → Page rendering: renders pages
workers-for-platforms-template/src/index.ts - Worker entry → Visibility API: routes requests
ai-brand-visibility-template/workers/app.ts - Worker entry → Analysis queue: registers queue
ai-brand-visibility-template/workers/app.ts - Visibility API → Visibility config: uses config
ai-brand-visibility-template/workers/api.ts - Analysis queue → Visibility config: uses config
ai-brand-visibility-template/workers/queue.ts - Template user → MySQL dashboard: uses dashboard
- MySQL dashboard → MySQL API client: fetches data
mysql-hyperdrive-template/public/js/app.js - MySQL dashboard → MySQL tables: renders tables
mysql-hyperdrive-template/public/js/app.js - MySQL dashboard → MySQL UI helpers: sets loading
mysql-hyperdrive-template/public/js/app.js - MySQL tables → MySQL formatting: formats values
mysql-hyperdrive-template/public/js/components/tables.js - MySQL tables → MySQL UI helpers: uses helpers
mysql-hyperdrive-template/public/js/components/tables.js - Template user → Postgres dashboard: uses dashboard
- Postgres dashboard → Postgres API client: fetches data
postgres-hyperdrive-template/public/js/app.js - Postgres dashboard → Postgres tables: renders tables
postgres-hyperdrive-template/public/js/app.js - Postgres dashboard → Postgres UI helpers: sets loading
postgres-hyperdrive-template/public/js/app.js - Postgres tables → Postgres formatting: formats values
postgres-hyperdrive-template/public/js/components/tables.js - Postgres tables → Postgres UI helpers: uses helpers
postgres-hyperdrive-template/public/js/components/tables.js - Workflow interface → Step diagram: renders steps
workflows-starter-template/src/App.tsx - Workflow interface → Code display: renders code
workflows-starter-template/src/App.tsx - Workflow interface → Progress hook: tracks progress
workflows-starter-template/src/App.tsx - Template user → Workflow interface: starts workflow