Demo
General
Codebase

Project Structure

Learn how to navigate the codebase of the starter kit.

Achromatic uses Turborepo and pnpm workspaces to enforce a modern monorepo structure.

Workspaces

The monorepo is divided into three main workspaces:

pnpm-workspace.yaml
packages:  - 'apps/*'  - 'packages/*'  - 'tooling/*'
  • Apps: Applications, such as the marketing website or dashboard.
  • Packages: Shared packages, basically all your libraries.
  • Tooling: Configurations for ESLint, Prettier, Tailwind and TypeScript.

Folders

  • apps

App workspace

DirectoryPurpose
/appsApplications (everything that can be executed)
/apps/dashboardMain web application
/apps/marketingMarketing pages
/apps/public-apiMinimal Public API example

Packages workspace

DirectoryPurpose
/packagesPackages (everything that can be installed into your apps)
/packages/api-keysGenerate and consume api keys for a public API
/packages/authAuth.js configuration, organizations and invitations
/packages/billingLogic to handle the billing and payments
/packages/commonTiny library for shared errors and type guards
/packages/databaseContains your Prisma schema, client and migrations
/packages/emailLogic to send emails and resolve and email templates
/packages/monitoringError and performance monitoring
/packages/rate-limitRate limiters to protect your application from brute-force
/packages/routesCommon route object to be able to link dashboard and marketing together type-safe
/packages/uiThe design system based on shadcn/ui (components, hooks, styles)
/packages/webhooksHelpers to send webhooks

Tooling workspace

DirectoryPurpose
/toolingConfigurations for your monorepo
/tooling/eslint-configLinting rule-sets using ESLint
/tooling/prettier-configFormatting rules using Prettier
/tooling/requirements-checkScript to make sure you have min versions installed
/tooling/tailwind-configShared tailwind config
/tooling/typescript-configTypescript presets for different use-cases

Namespace prefix

The namespace prefix is @workspace/*. This is the same as in the shadcn monorepo setup.