Repository layout
A map of the folders in the Docup repository and where each part of the product lives.
This map outlines the folder structure of the Docup repository, showing where each component of the application, database, and background pipeline lives.
.
├── app/ Routes (vinext app router)
├── components/ React components
├── db/ Drizzle schema, client and migrations
├── lib/ Domain logic, no UI
├── trigger/ Trigger.dev background tasks
├── hooks/ Shared React hooks
├── public/ Static files
├── worker.ts Worker entry: redirects, custom domains, static files, PostHog proxy, page cache, content negotiation
├── proxy.ts Rewrites docs hosts to /sites/<address>
├── cloudflare.config.ts Worker name, domains, bindings and secrets
├── trigger.config.ts Trigger.dev project, task folder and retry defaults
├── drizzle.config.ts drizzle-kit configuration
├── vite.config.ts Vite with vinext and the Cloudflare plugin
└── docker-compose.yml Local Postgres, Redis and a Redis REST proxyapp/#
| Route | Purpose |
|---|---|
(marketing)/ |
Landing page, pricing, about, changelog, contact, guides, comparisons, product pages, privacy, and terms |
login/, api/auth/ |
Sign-in and Better Auth |
welcome/ |
Onboarding: pick a repository, address and watch the first run |
dashboard/[projectId]/ |
The dashboard: inbox, pages, analytics, runs, Ask AI and settings |
preview/[projectId]/ |
Draft preview of a site, for workspace members |
sites/[subdomain]/ |
The public docs site: pages, sitemap.xml, robots.txt, llms.txt, llms-full.txt and Markdown pages |
api/ask/ |
Ask AI |
api/pages/ |
Save, reset, retry, review and SEO actions for pages |
api/webhooks/github/ |
GitHub App webhook |
api/github/ |
GitHub App install and setup |
api/sites/[projectId]/asset/ |
Uploaded images for the dashboard and preview |
docup-asset/, docup-og/ |
A site's uploaded images and generated social cards |
lib/#
| Folder or file | Purpose |
|---|---|
pipeline/ |
The docs-writing pipeline: repo reader, filter, planner, writer, update planner and tools |
docs/ |
Everything about a docs site: host parsing, navigation, Markdown rendering, SEO files, caching, analytics and theme |
ask/ |
Ask AI: chunking, indexing, retrieval, answers, Turnstile |
marketing/ |
Marketing guides, product pages, comparison articles, SEO files, and legal documents for docup.dev |
github.ts, github-app.ts |
Repository lookup, GitHub App tokens and installs |
publish.ts, pages.ts, projects.ts |
Publishing, page edits, project creation and address rules |
rate-limit.ts, redis.ts |
Fixed-window limits and the Redis client |
auth.ts, session.ts |
Better Auth setup and the current session |
trigger.ts |
Starting tasks and minting run tokens from the Worker |
dashboard.ts |
Queries behind the dashboard screens |
components/#
Split by area: dashboard/ (including editor/ and settings/), docs-site/ for what readers see, onboarding/, auth/, site/ for marketing, and ui/ for shared primitives.
trigger/#
One file per task: sync-repo.ts, retry-page.ts, update-docs.ts, index-site.ts and check-domains.ts. Tasks import from lib/ and db/ with relative paths, because they run on Trigger.dev and not in the Worker.
db/#
schema/ holds the application tables and the Better Auth tables. migrations/ holds SQL migrations generated by drizzle-kit. client.ts builds a per-request Drizzle client over Hyperdrive. See Database.