MCPcopy Index your code
hub / github.com/exectx/t3-cloudflare

github.com/exectx/t3-cloudflare @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
668 symbols 738 edges 18 files 91 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

T3 App on Cloudflare Workers + D1

This repo is a T3 Stack app (tRPC + Drizzle + Tailwind) configured for Cloudflare Workers using OpenNext and D1.

Quickstart with Cloudflare C3 CLI

pnpm create cloudflare@latest --template=exectx/t3-cloudflare

Requirements

  • pnpm
  • wrangler (Cloudflare CLI)

Setup

  1. Install dependencies:
pnpm install
  1. Create a D1 database and update wrangler.jsonc with the database_id:
pnpm wrangler d1 create <DATABASE_NAME>
  1. (Optional) Configure Cloudflare env vars for remote Drizzle commands:
cp .dev.vars.example .dev.vars

Local development

pnpm dev

Migrations

Local D1 (Drizzle Kit):

pnpm db:generate
pnpm db:migrate

Remote D1 (Drizzle Kit, requires .dev.vars):

pnpm db:generate
pnpm db:migrate:prod

Build, preview, deploy

pnpm build
pnpm preview
pnpm deploy

D1 Binding

The Worker expects a D1 binding named DB.

Extension points exported contracts — how you extend this code

ServiceWorkerGlobalScope (Interface)
* The **`ServiceWorkerGlobalScope`** interface of the Service Worker API represents the global execution context of a se
cloudflare-env.d.ts
Response (Interface)
* The **`Response`** interface of the Fetch API represents the response to a request. * * [MDN Reference](https://deve
cloudflare-env.d.ts
Request (Interface)
* The **`Request`** interface of the Fetch API represents a resource request. * * [MDN Reference](https://developer.mo
cloudflare-env.d.ts
ReadableStream (Interface)
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data. * * [MDN Reference](htt
cloudflare-env.d.ts
WebSocket (Interface)
* The `WebSocket` object provides the API for creating and managing a WebSocket connection to a server, as well as for s
cloudflare-env.d.ts

Core symbols most depended-on inside this repo

set
called by 2
cloudflare-env.d.ts
input
called by 2
cloudflare-env.d.ts
createTRPCContext
called by 2
src/server/api/trpc.ts
createQueryClient
called by 2
src/trpc/query-client.ts
error
called by 1
cloudflare-env.d.ts
log
called by 1
cloudflare-env.d.ts
warn
called by 1
cloudflare-env.d.ts
text
called by 1
cloudflare-env.d.ts

Shape

Interface 363
Method 209
Class 85
Function 11

Languages

TypeScript100%

Modules by API surface

cloudflare-env.d.ts657 symbols
src/trpc/react.tsx3 symbols
src/server/api/trpc.ts2 symbols
src/app/api/trpc/[trpc]/route.ts2 symbols
src/trpc/query-client.ts1 symbols
src/app/page.tsx1 symbols
src/app/layout.tsx1 symbols
src/app/_components/post.tsx1 symbols

For agents

$ claude mcp add t3-cloudflare \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact