A monorepo template for JavaScript/TypeScript projects.
This monorepo includes the following packages/apps:
admin
: a Refine app for the admin dashboarddesktop
: an Electron app for the desktop client appdocs
: a Docusaurus app for the documentationmobile
: an Expo app for the mobile client appweb
: a Next.js app for the web client appwebsite
: an Astro app for the project website
users
: a Hono app for the user management service
api
: a CDK app for the infrastructure as code
ui
: a React component library shared by applications, packed with Storybook for visual documentation.config
: a shared configuration package (tsconfig, eslint, prettier, etc.)
This monorepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- Jest for testing
- Vitest for unit testing
- Playwright for browser automation and testing
- Tailwind CSS for utility-first CSS
- pnpm for package management
- Turbo for monorepo management
- Commitlint for commit message linting
- Husky for Git hooks
- lint-staged for running linters on staged files
- Conventional Commits for commit message conventions
- Changesets for changelog and version management
- Renovate for automated dependency updates
To install all dependencies, run the following command:
pnpm install
To build all apps and packages, run the following command:
pnpm build
To develop all apps and packages, run the following command:
pnpm dev
To lint all apps and packages, run the following command:
pnpm lint
To format all apps and packages, run the following command:
pnpm format
To run all tests, run the following command:
pnpm test
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
pnpx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
pnpx turbo link
Learn more about the power of Turborepo: