Find the code you need to change
Locate site, admin portal, package, and documentation code.
Find the code you need to change
Sites
Each site in sites/ owns only what makes it different:
src/site.config.ts (tenant, domain, public pages, MCP toolsets), its brand
in src/app/globals.css, and its landing and legal pages. Pages and route
handlers that every site serves live in packages/site-kit/src/app; the files
under sites/<site>/src/app that re-export them are generated by
bun run sites:sync, so edit the site-kit version instead. To change one
site only, commit your own file at the same path in that site.
Admin portal
Platform administration lives in apps/backend: the admin pages in
src/app/(admin), the admin API in src/app/api/admin, and its own
sign-in in src/lib/admin-auth.ts. Stripe webhooks and Inngest run here too.
Shared code
Server helpers and integration adapters live in packages/core; shared React
components, hooks, and the theme live in packages/react-ui.
Shared behavior
Use the existing workspace package when a capability has more than one consumer:
| Package | Responsibility |
|---|---|
@repo/site-kit | Routes, proxy, and root layout shared by every site |
@repo/core | Server helpers: agent auth, operators, integrations, auth routes |
@repo/react-ui | React components, hooks, providers, and theme.css |
@repo/auth | Better Auth instance, tenant binding, and session helpers |
@repo/database | Drizzle client, schemas, tenancy, and DALs |
@repo/billing | Stripe, subscriptions, pricing, and usage |
@repo/analytics | PostHog/Vercel analytics and event contracts |
@repo/durable-exec | Inngest events/functions and billing jobs |
@repo/mcp-chatgpt / @repo/mcp-server | MCP context, tools, metadata, and logging |
@repo/ai | OpenAI-compatible model helpers |
@repo/object-storage | Vercel Blob and S3 storage providers |
For maintainer architecture and module contracts, see the internal
documentation site rather than adding a nested docs/ directory.