Skip to main content
ThinkEx is a full-stack TypeScript app hosted as a Cloudflare Worker. The frontend is React, TanStack Start, Tailwind CSS, Tiptap, EmbedPDF/PDFium, Yjs, and AI SDK. The backend runs on Cloudflare Workers with Durable Objects, D1, R2, Workflows, Containers, Workers AI, Browser Rendering, and Email.

Runtime Ownership

Data or behaviorSource of truth
Auth, users, workspace directory, membership, invitesD1 through Drizzle
Workspace items, shell files, events, revisions, presenceWorkspaceKernel Durable Object
Large workspace file bytesR2 WORKSPACE_KERNEL_FILES
User AI thread directoryUserAIStore Durable Object
AI conversation runtimeAIThread Agent / Durable Object
Collaborative document sessionsDocumentSession Durable Object
File extractionCloudflare Workflows plus configured providers
Code execution and conversionCloudflare Containers

Code Map

AreaPath
Workspace contracts and commandssrc/features/workspaces/contracts.ts, src/features/workspaces/operations/
Workspace kernelsrc/features/workspaces/kernel/
AI threads and toolssrc/features/workspaces/ai/
File upload and extractionsrc/features/workspaces/upload/, src/features/workspaces/extraction/
Document collaborationsrc/features/workspaces/documents/
Sharing and invitessrc/features/workspaces/members/, src/features/workspaces/invites/
Cloudflare bindingswrangler.jsonc

Deployment Shape

The public landing page and product app are currently served by the same Worker. Production is routed to thinkex.app; staging is routed to staging.thinkex.app.

Public Routes

RoutePurpose
/Public landing page, redirects signed-in users to /home
/login, /signupAuthentication entry points
/homeProtected workspace home
/workspaces/$workspaceIdProtected workspace route
/settingsProtected account settings
/invite/$tokenWorkspace invite acceptance
/terms, /privacy, /cookiesPublic legal pages

Integrations

IntegrationUse
Better AuthSessions, Google sign-in, local guest sign-in
AI Gateway / AI SDKChat models and title generation
FirecrawlPublic web search and URL/PDF extraction
LlamaCloudDocument extraction
The Context CompanyAgent observability export
AutumnAI usage analytics
PostHogProduct analytics, feedback, and diagnostics
Do not run deploy, remote migration, legacy-data, or secret-management commands unless you are intentionally performing release or operations work.