DocupDocup
Esc

Tech stack

The frameworks, services and models Docup is built on, and why each is there.

Docup is built on a highly optimized, edge-native architecture, combining fast static asset delivery with state-of-the-art language models and robust database engines.

Application#

Area Technology
Framework vinext, the Next.js API implemented on Vite, with React server components
Language TypeScript
UI React, Tailwind CSS v4, shadcn components on Base UI, Hugeicons
Editor TipTap with the Markdown, table and suggestion extensions
Markdown rendering marked, with highlight.js for code
Forms and validation Zod
Notifications Sonner

Docup uses vinext, not stock Next.js. Behavior follows the vinext documentation, so check it before assuming a Next.js feature works the same way.

Platform#

Area Technology
Runtime Cloudflare Workers with the nodejs_compat flag, placed in aws:ap-south-1
Build Vite 8 with @cloudflare/vite-plugin
Config cloudflare.config.ts, applied with the cf CLI
Static assets Workers assets, with the Worker running first for everything except _next/static/*, /*/_next/static/*, /favicon.ico, /logo.svg, and /marketing/*
Images Cloudflare Images binding with an optimizer
File storage R2 bucket docup-assets
Page analytics Workers Analytics Engine dataset docup-docs-analytics

Data#

Area Technology
Database PostgreSQL, through the pg driver and Hyperdrive
ORM and migrations Drizzle ORM and drizzle-kit
Cache and limits Upstash Redis (REST), locally a Redis container with a REST proxy
Vector search Qdrant

Authentication#

Better Auth with the organization plugin, GitHub and Google sign-in, account linking and encrypted OAuth tokens. See Authentication.

AI#

Job Model Where it is set
Planning the docs gemini-3.1-pro-preview lib/pipeline/models.ts
Writing and updating pages gemini-3.5-flash lib/pipeline/models.ts
Ask AI answers gemini-3.5-flash lib/ask/config.ts
Embeddings (768 dimensions) gemini-embedding-001 lib/ask/config.ts

All models are called through the AI SDK and served by Vertex AI, with a service account. Changing a model is a one-line edit, but changing the embedding model or size means every site has to be indexed again.

Background work#

Trigger.dev v4 runs the tasks in trigger/. The browser follows runs with @trigger.dev/react-hooks.

Integrations#

  • GitHub App using plain REST calls for installations, repositories, commits, comparisons and archives (tar-stream unpacks the archive).
  • Cloudflare Turnstile for bot protection.
  • PostHog for Docup's own product analytics, proxied through /ingest.
  • Resend is configured for emails but not wired up yet.

Package manager#

pnpm 12.11.2, as pinned in package.json.

Documentation written with Docup