Architecture
Clay is a pnpm Turborepo with four app surfaces and one generated client package.Backend
Hono routing
HTTP routes are mounted with Hono through
@hono/zod-openapi. The current backend stays flat in
apps/backend/src/index.ts until route pressure justifies extraction.OpenAPI 3.1
The HTTP surface is described in OpenAPI 3.1 and kept in sync with implemented routes. The
document is exported from the live Hono app into
apps/backend/openapi/openapi.yaml and linted
by Redocly before the Fern generator consumes it.Mastra and Hyperdrive remain part of the intended backend stack, but they should be documented as
implemented only after code exists under
apps/backend/src/mastra or Worker bindings reference
the database boundary. See Environment and bindings for the
intended-binding rules.Landing
apps/landing is the Next.js 16 static-export pitching site that explains Clay as an opportunity
platform. It hosts the root route, the design-system plasticine board, and supporting pages
(framework, technical, competitors) used by partners and reviewers. Copy follows the
intentions/personalities/opportunity contract — never the chatbot/resume/dating framing.
Mobile
apps/mobile is the iOS-first Expo app. It uses Expo SDK 57, Expo Router, and @expo/ui for native form controls in the first capture flow. Haptics ship through react-native-pulsar, exposed as product-level events in apps/mobile/lib/clay-haptics.ts.
Specs
apps/specs is a Mintlify workspace package. It exports to .mintlify-export/ via mint export, and Wrangler publishes that bundle to the clay-specs Cloudflare Pages project. Navigation lives in docs.json and must move with every page add, rename, or move.
Workspace contract
| Task | Command |
|---|---|
| Install everything | pnpm install |
| Run all dev servers | pnpm dev |
| Build all apps | pnpm build |
| Typecheck everything | pnpm typecheck |
| Lint everything | pnpm lint |
| Regenerate OpenAPI + SDK | pnpm generate |
| Format Markdown / MDX / JSON | pnpm format:all |
| Deploy specs | pnpm --filter @clay/specs cf:deploy |
Related
Backend overview
The Hono + OpenAPI contract behind the backend surface.
Workspace
The pnpm + Turborepo tasks and per-package scripts that ship this layout.
Client package
The Fern-generated
@clay/client SDK consumed by every Clay app.API reference
The implemented HTTP routes and Zod schemas.
OpenAPI pipeline
How Hono route schemas become the OpenAPI YAML consumed by Fern.
Mobile capture flow
The first iOS screen wired up against this architecture.

