This is a Turborepo template.
This Turborepo includes the following packages/apps:
docs: a Next.js appweb: another Next.js appstorybook: React.js app with storybbok initialised, it can be used as a react app but more specifically wanted it to test components independently using storybookbackend: Express.js app and esbuild as the bundler@repo/db and @repo/db_serverless: both are initialised with prisma the serverless can be used with hono or any other serverless function, and both of them exposes the prisma client.@repo/ui: a stub React component library shared by bothwebanddocsapplications which includes shadcn and MUI - material ui and tsup as the bundler@repo/eslint-config:eslintconfigurations (includeseslint-config-nextandeslint-config-prettier)@repo/typescript-config:tsconfig.jsons used throughout the monorepo@repo/tailwind-config:tailwind.config.jss used throughout the monorepo
Each package/app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- Shadcn for ui design and components
- MUI - material ui for ui design and components
- Husky for pre-commit hook
- Lint-Staged to run linters against staged git files
To clone the repo run
git clone https://github.com/Ayush272002/Turborepo-Template.git
cd template
npm iTo build all apps and packages, run the following command:
cd template
npm run buildTo develop all apps and packages, run the following command:
cd template
npm run devTurborepo 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:
cd template
npx turbo loginThis 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:
npx turbo linkLearn more about the power of Turborepo: