Skip to content

AdamQuadmon/turbopandarepo

Repository files navigation

Turbopandarepo

PandaCSS UI & Design System with Storybook on NextJs

This is a 🐼 PandaCSS powered React design system based on the official Turborepo starter.

HighLights

Versioning and package publishing is handled by Changesets and fully automated with GitHub Actions.

What's inside?

This Turborepo includes the following:

Apps and Packages

  • @turbopandarepo/docs: Storybook documentation on Next.js
  • @turbopandarepo/locale: next-intl i18n on Next.js
  • @turbopandarepo/supabase: Supabase with Auth, UserProfile and Checkout on Next.js
  • @turbopandarepo/enterprise: A full featured Next.js
  • @turbopandarepo/eslint-config: ESLint preset using Flat Config
  • @turbopandarepo/preset: PandaCSS custom preset
  • @turbopandarepo/tsconfig: Shared tsconfig.jsons used throughout the monorepo
  • @turbopandarepo/ui: Shared React UI components

Each package and app is 100% TypeScript.

Useful commands

  • pnpm build - Build all packages and the docs site
  • pnpm clean - Clean up all node_modules and dist folders
  • pnpm reinstall - Clean and reinstall packages
  • pnpm dev - Develop all packages and the docs site
  • pnpm storybook:dev - Develop Storybook
  • pnpm storybook:build - Build Storybook
  • pnpm storybook:move - Move the built Storybooks to root
  • pnpm storybook:vercel - Vercel build command for Storybook
  • pnpm lint - Lint all packages
  • pnpm lint:knip - Lint unused code
  • pnpm lint:md - Lint Markdown files
  • pnpm lint:package-json - Lint package.json
  • pnpm lint:packages - Check if newer dependencies can be used in lockfile.
  • pnpm lint:spelling - Lint spelling
  • pnpm format - Use Prettier to format .ts, .tsx and .nd files
  • pnpm format:write - Write Prettier changes
  • pnpm changeset - Generate a changeset
  • pnpm version-packages - Generate a changeset and bump all packages
  • pnpm release - Build docs and publish packages to npm

Other commands

  • pnpm up -L -r -i - interactively and recursively update dependencies to latest versions
  • pnpm add react --filter web - add packages to a specific workspace
  • pnpm add contentlayer --filter './apps/*' - add packages to a specific path

notes on adding a packages

Running pnpm add <pkg>, if a "prepare": "panda codegen" fails, the package will not be added to package.json unless --ignore-scripts flag is provided

Utilities

This Turborepo has some additional tools already setup for you:

Storybook

This implementation is ready for compose turborepo's Storybooks using the Storybook Composition feature.

You can use pnpm storybook:dev to run Storybook.

Generators

Turborepo uses a simplified Plop configuration.

Learn more about Turborepo Generators at turbo: code-generation Check also blog post generator

Generate Component

A pnpm gen:component command is available to generate a new component from the root. It will generate:

  • a ComponentName folder for the new component in the ui package with component and index files
  • an entry in the index.ts file of the ui package
  • a ComponentName.stories.tsx file in the docs package
  • a component.recipe file in the preset package

Versioning and Publishing packages

Package publishing has been configured using Changesets. Please review their documentation to familiarize yourself with the workflow.

This example comes with automated npm releases setup in a GitHub Action. To get this working, you will need to create an NPM_TOKEN and GITHUB_TOKEN in your repository settings. You should also install the Changesets bot on your GitHub repository as well.

For more information about this automation, refer to the official changesets documentation

npm

If you want to publish package to the public npm registry and make them publicly available, this is already setup.

To publish packages to a private npm organization scope, remove the following from each of the package.json's

- "publishConfig": {
-  "access": "public"
- },

GitHub Package Registry

See Working with the npm registry

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published