🚧 WORK IN PROGRESS 🚧
View the main branch at: https://bubblegum-template.vercel.app/
- Keep in mind the project is still very rough, especially the design. Focusing on functionality and code quality first.
Bubblegum UI docs 🚧: https://bubblegumui.vercel.app/
Building a design library of reusable, flexible, and accessible React form and UI components. The form components will be largely unstyled out of the box and intended to be easily adapted on the fly using customizable variations.
bubblegum_overview_wip.mov
- Tailwind Documentation (CSS styling)
- Radix UI Primitives (For accessibility across devices)
- Lucide Icons
- React Hook Form (Form handling)
- Prisma (Database ORM)
- Clerk Auth
This project uses the Tailwind CSS (v3.0) with NextJs configuration. It follows the steps outlined in the official Tailwind docs.
-
Install dependencies
npm install
-
Run the development server
npm run dev
-
Open http://localhost:3000 in the browser
Using turbo to manage the monorepo. Basic structure:
apps
holds projectspackages
holds anything reusable acrossapps
such asui
for components as well as extendable configurations forestlint
andtsconfig
.
- Each workspace gets its own
package.json
.[ Vercel recommends](You can use an npm organization or user scope to avoid collisions with existing packages on npm. For instance, you could use @mycompany/shared-utils) prepending the org name to avoid npm namespace conflicts. For example:@organizationname/packagename
. - Instructions on importing internal packages.
- In the importing project add this to the
package.json
:"@monorepo/name": "workspace:*"
to import dependencies based on the name of the internal package's name in itspackage.json
- In the importing project add this to the
- Troubleshooting: In a monorepo, mismatched dependency versions can cause problems. Added a postinstall script to the root
package.json
that runs@manypkg/cli
afterpnpm install
as suggested by Vercel. Can also runpnpm manypkg fix
to attempt to fix errors.
- In the monorepo root:
turbo.json
handlespipeline
scripts for the whole repo such as build or linting scripts.dependsOn
can be used to only run these pipeline scripts after project specific scripts have run. config-eslint
andconfig-typescript
inpackages
are used to have a consistent base for the whole monorepo. These can be extended or overridden in the individualapps
via their owneslintrc.json
andtsconfig.json
.- Each project as well as the root gets their own
package.json
. Root handles monorepo-wide dependencies like prettier. Each workspace needs to have a unique title inpackage.json
. pnpm-workspaces.yaml
defines the monorepo's workspaces likepackages
andapps
.
-
Add
{ "eslint.workingDirectories": [ { "pattern": "apps/*/" }, { "pattern": "packages/*/" } ] }
to.vscode > settings.json
to fix error findingnext/babel
. Appears to be a known turborepo issue.