Skip to content
Search docs
Search the docs and jump to the section
Sign in

Public site

The landing page, the pages about Werker and the blog are a separate app, apps/site. It is deployed at werker.cloud, with the app (apps/app) at app.werker.cloud, as two Coolify applications (Coolify).

Why two apps

  • The site has no database or sign-in, and its server only runs the waiting list. Its policy in tools/checks/policy.ts allows only @werkerai/ui and the pure @werkerai/rules.
  • The site builds without the app.
  • A self-hosted install gets the app only. Its / redirects to the dashboard or to sign-in (apps/app/src/routes/+server.ts).

Deploying it

A second Coolify application from the same repository, beside the app. Its addresses and sender are in apps/site/src/lib/site.ts.

SettingValue
Site typeDynamic (a web application)
Build packRailpack, base directory /
Build commandpnpm --filter @werkerai/site build
Start commandpnpm --filter @werkerai/site start
Port3000
Publish directorynone; Coolify shows /
  • Environment: the four RESEND_* variables of the waiting list, and WERKER_SITE_ORIGIN on the app for page views.
  • A push to main redeploys both applications.

What is shared: packages/ui

The theme tokens, the logo and the shadcn-svelte primitives are in packages/ui⁠ (opens in a new tab). Each app compiles them from source in its own build.

How the site is built

  • SvelteKit with @sveltejs/adapter-node; every route is prerendered (apps/site/src/routes/+layout.ts). pnpm build writes apps/site/build/.
  • pnpm dev:site serves it on port 5232.
  • Pages and posts are markdown in apps/site/src/content/pages/ and apps/site/src/content/blog/, compiled by mdsvex 1.1.0 (a Vite plugin). Code fences are highlighted with twinkleplop at build time (@twinkleplop/theme-night-owl).
  • Frontmatter is checked at build (apps/site/src/lib/content.ts): title, description (200 characters at most), updated, and published for a post. A missing or bad field fails the build.
  • The order of pages, in menus and in llms.txt, is page_order in the same file. Short menu names are in apps/site/src/lib/messaging/chrome.ts.

The docs section

/docs is every doc, written in apps/site/src/content/docs/: pages for people using Werker, and engineering/ for working on its code (.agents/skills/docs/SKILL.md). Root docs/ holds one generated file, glossary.md, written by pnpm docs:glossary (apps/site/src/lib/server/glossary.ts); a test fails when it is stale.

  • Layout: the docs have their own (apps/site/src/routes/docs/+layout.svelte). Every other page is in apps/site/src/routes/(site)/.
  • Groups and order: apps/site/src/lib/docs/groups.ts. A doc it leaves out fails a test. /docs redirects to Getting started.
  • Frontmatter: as for a page.
  • Moved pages: apps/site/src/lib/moved.ts lists the old addresses, which the server redirects (src/hooks.server.ts).
  • Links: between docs they become pages; anything else in the repository opens on GitHub (apps/site/src/lib/docs/links.ts). A link to a missing doc or heading fails the build.
  • Writing: the rule on {, }, < and > below applies here.
  • Search: the browser fetches every section once, from /docs/search.json, and ranks them itself (apps/site/src/lib/docs/search.ts). /docs/search?q= lists more. A result opens with the words marked from ?find= (apps/site/src/lib/docs/highlight.ts).
  • Links to other sites open in a new tab (apps/site/src/lib/components/document-link.svelte), in pages and posts too.
  • Link graph: /docs/graph (apps/site/src/lib/components/docs/graph.svelte).
  • Credit: the sidebar credits wiki0⁠ (opens in a new tab) (apps/site/src/lib/components/docs/wiki0-credit.svelte).

Adding a page or a post

  1. Add apps/site/src/content/pages/<slug>.md or apps/site/src/content/blog/<slug>.md with the frontmatter above.
  2. For a page, add its slug to page_order.
  3. Outside code spans and fences, do not write {, }, < or >: mdsvex reads them as Svelte. A value containing : in the frontmatter must be quoted.

What is written for programs

Each is built from the same lists as the pages (apps/site/src/lib/server/machine-files.ts).

AddressWhat it is
/<slug>.mdThe page as markdown, with its title and address on top
/blog/<slug>.mdThe post as markdown
/docs/<slug>.mdThe doc as markdown
/llms.txtAn index: what Werker is, then a link to each page's and doc's markdown
/llms-full.txtEvery page, doc and post in one markdown file
/sitemap.xmlEvery page, doc and post with the date it was updated
/robots.txtAllows every crawler and names the sitemap
/blog/rss.xmlThe blog as RSS 2.0

Head tags and share cards

  • Head tags come from svead⁠ (opens in a new tab) 0.2.0, in one component (apps/site/src/lib/components/seo.svelte): the title, description, canonical link, Open Graph and Twitter tags. The same component adds a link to the page's markdown.
  • JSON-LD is written by svead's SchemaOrg from typed nodes (apps/site/src/lib/structured-data.ts): WebSite and SoftwareApplication on /, TechArticle on a page, BlogPosting on a post, and FAQPage on /faq, read from its ## headings (apps/site/src/lib/server/faq.ts).
  • Every page, post and doc has its own share card, a 1200 by 630 PNG at /api/og-image/<slug>.png (blog-<slug> for a post, docs-<slug> for a doc, site for /). Nothing is drawn by hand: the card is an SVG built from the page's title and description and rendered with Resvg (WASM) while the site is built (apps/site/src/lib/og/cards.ts, apps/site/src/lib/server/og/render.ts).
  • The cards are set in Inter, from two TTF files in apps/site/src/lib/server/og/fonts/ (SIL Open Font License, OFL.txt beside them).

Pages

PageAnswersDrafted from
/What Werker isapps/site/src/routes/(site)/+page.svelte
/how-it-worksDescribe, generate, run, result; factoriesagents, workflows and factories
/securitySandboxes, network, keys, workspacessandboxes, workspaces
/pricingThe three offerings; no priceshosting plan⁠ (opens in a new tab)
/statusEach built thing and how far it was testedstatus epic⁠ (opens in a new tab)
/fitWho it suits today and who should waitstatus epic⁠ (opens in a new tab)
/faqShort answersThe pages above

Waiting list

The form on the landing page and the dialog a link opens there use remote functions (apps/site/src/lib/waiting-list.remote.ts), and the site's server calls Resend itself: the app has no part in it.

  • Joining emails a link to the landing page; a button in its dialog adds the address to a Resend segment, one per answer. Opening the link does not.
  • The site keeps no list. What was asked for is signed into the link, in the fragment, and lasts 7 days.
  • Resend: the sender is at a domain verified in Resend (email_from in apps/site/src/lib/site.ts). Environment: RESEND_API_KEY (sending), RESEND_CONTACTS_KEY (contacts), and the segment IDs RESEND_USE_SEGMENT and RESEND_HOST_SEGMENT. Without all four the form says sign-ups are closed.
  • One address is emailed at most every 10 minutes for each answer, and 100 emails an hour in all, counted in the process: a restart forgets.

Visitor analytics

The site's page views are recorded by the app and shown in Admin → Analytics with the app's own (visitor analytics). Set WERKER_SITE_ORIGIN=https://werker.cloud on the app. The site posts to app_url in apps/site/src/lib/site.ts; it does not post in development.

This page as markdown apps/site/src/content/docs/engineering/site-plan.md