flowbite-react icon indicating copy to clipboard operation
flowbite-react copied to clipboard

Monorepo conversion (using `bun`)

Open SutuSebastian opened this issue 1 year ago • 5 comments

Summary

Since there is a lot of confusion regarding which files belong to docs, and which belong to the UI library, as well as which files are simply for code quality and which not, we should have a split bringing separation of concerns that isolates each app/package into their own namespace, while still allowing the flexibility of re-usage of one another (eg: UI lib being used in docs namespace).

To achieve this, the answer is monorepo.

Structure

  • [x] apps
    • [x] storybook
    • [x] web
  • [x] packages
    • [x] cli
    • [x] ui

Stack

Task runner: Bun Package manager: Bun Lint: ESLint Format: Prettier Test: Vitest Release: Changesets Monorepo: Bun Monorepo build system: Turborepo

Changes

General:

  • upgrade all packages to safe latest
  • refactor github actions
  • setup github actions using bun
  • remove storybook github action (redo later if needed)
  • formatter - switch from singleQuote to double
  • re-do from the ground up: IDE, linting, formatting configs
  • removed cypress (to be replaced with playwright)
  • removed codecov
  • split into multiple packages and apps [web(docs), ui(library), storybook, cli]

Docs:

  • improve homepage speed
  • fix homepage components section card hover on dark mode
  • add new CLI page
  • add new Editor Setup page
  • add CLI command section to all integration guides
  • refactor Quickstart page
  • code preview
    • desktop/tablet/phone toggle buttons sizes
    • RTL toggle button
    • light/dark mode actually working in isolation (+ syncing with root on init and change if mode matches)
  • remix guide: add dark mode section
  • refactor Dark mode page

UI library:

  • bring in intellisense, linting and formatting in all theme objects, using createTheme() proxy function
  • fix and upgrade all deprecated tests by upgrading vitest to latest
  • cleanup dependencies (of all kind)

Storybook:

  • upgrade to storybook 8
  • light/dark mode widget toggle
  • remove next dependency examples

CLI:

  • create create-flowbite-react CLI package (https://www.npmjs.com/package/create-flowbite-react)

Result

Docs - Quickstart

https://github.com/themesberg/flowbite-react/assets/41998826/986affaa-dd86-45c0-8c8b-c1067700d070

Docs - Integration Guides - CLI section

Screenshot 2024-03-20 at 10 50 24

Docs - code preview

https://github.com/themesberg/flowbite-react/assets/41998826/02c4e3da-a533-49ab-9c44-ce26a514f3b3

https://github.com/themesberg/flowbite-react/assets/41998826/3c65890c-d49f-4bcb-8ee9-34e20f05d7ce

Storybook - light/dark mode toggle

https://github.com/themesberg/flowbite-react/assets/41998826/b4ef547f-d9ff-4c1e-b3f5-5209d6159d7d

CLI

https://github.com/themesberg/flowbite-react/assets/41998826/ebafe22a-ee11-46c1-9f40-a479b6176a2e

Screenshot 2024-03-20 at 11 05 06

SutuSebastian avatar Feb 07 '24 07:02 SutuSebastian

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2024 4:25pm

vercel[bot] avatar Feb 07 '24 07:02 vercel[bot]

would love to learn more about this monorepo!.

dhavalveera avatar Feb 07 '24 08:02 dhavalveera

[!IMPORTANT]

Auto Review Skipped

More than 25% of the files skipped due to max files limit. Skipping review to prevent low quality review.

172 files out of 296 files are above the max files limit of 100.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

coderabbitai[bot] avatar Mar 16 '24 16:03 coderabbitai[bot]

@coderabbitai pause

SutuSebastian avatar Mar 17 '24 15:03 SutuSebastian

@coderabbitai resume

SutuSebastian avatar Mar 20 '24 09:03 SutuSebastian

This is an amazing PR @SutuSebastian. Good job!

zoltanszogyenyi avatar Mar 21 '24 22:03 zoltanszogyenyi