Apps
How marketing and docs split work in the Turborepo.
The workspace is apps/* + packages/*. Each Next app is TypeScript source, loads env from the repo root, and uses Tailwind 4.
Marketing (@repo/marketing, port 3000)
Public landing, legal pages, Mayar storefront checkout, and the Hono API at /api. Routes live under /[locale]/... with next-intl (localePrefix: "always"). English is /en, Indonesian is /id.
Meta tags, sitemap, and robots for marketing are covered in SEO.
Storefront checkout: POST /api/checkout returns a Mayar payment-link URL for Solo or Pro. Webhooks: POST /api/webhooks/mayar. Details: Storefront checkout.
Docs (@repo/docs, port 3001)
This site. Fumadocs owns chrome translations and MDX locale files — not next-intl. Pages are /en, /id/setup, and so on. There is no extra /docs path because this app is the docs site.
Docs are public. Do not add this origin to Better Auth trustedOrigins.
No SaaS app in this checkout
There is no apps/saas here. @repo/auth, @repo/database, and related
API modules remain as packages for a product host you add later. Point
leftover NEXT_PUBLIC_SAAS_URL / NEXT_PUBLIC_APP_URL at marketing (or
your future product origin). See Authentication and
Configuration.
Shared packages
| Package | Used for |
|---|---|
@repo/ui | Shadcn components and theme tokens |
@repo/env | Zod-validated server and client env |
@repo/i18n | Locale list (en, id) and message catalogs |
@repo/auth | Better Auth (package only; no dashboard host in this repo) |
@repo/api | Hono routers — hosted by marketing at /api |
@repo/payments | Mayar plan IDs, storefront payment links, display prices |
@repo/database | Prisma (package only) |
@repo/mail | React Email templates + Resend |
@repo/monitoring | Sentry helpers — see Monitoring |