Welcome to Mochi UI by Console Labs' team! 🌟 Your interest and enthusiasm mean a lot to us. This repository, like many open-source projects, thrives on collaboration and we're excited to have you on board.
Whether you're fixing bugs, proposing new features, or enhancing documentation, your contributions are immensely valuable. Let's get you started on how you can contribute to the repository.
To begin contributing to Mochi UI, follow these steps to set up the project on your local machine:
- Fork the Repository: Start by forking the repository. Click the Fork button at the top right of this page.
- Clone Your Fork: Clone your fork to your local machine for development.
git clone https://github.com/<your_github_username>/mochi-ui.git
cd web-foundation
- Install Dependencies: Execute
pnpm install
to set up all the necessary dependencies and packages. This command ensures everything you need is installed.
Encountering issues? Don’t hesitate to reach out to the ConsoleLabs team for support.
Mochi UI operates on a monorepo structure, containing both UI packages and applications (Mochi web app & Mochi UI landing page). Each component and application is treated as an independent unit.
For package development, we use the following tools:
- PNPM: Manages packages and dependencies.
- Tsup: Bundles packages.
- Storybook: Facilitates UI component development and testing.
- Testing Library: Tests components and hooks.
- Changeset: Manages changes documentation, changelog generation, and release.
Commands
pnpm install
: Bootstraps the project, symlinks dependencies, and builds components.pnpm storybook
: Launches Storybook server for UI component development.pnpm build:packages
: Builds all component packages.pnpm test:packages
: Runs tests across all component packages.
For developing applications within the monorepo, the process is streamlined:
Commands
pnpm install
: Bootstraps the project, symlinks dependencies, and builds components.pnpm dev:app-slug
: Starts the development server for a specific application. Replace `app-slug`` with the appropriate application identifier.pnpm build:app-slug
: Builds a specific application.pnpm test:app-slug
: Runs tests for a specific application.
If you encounter a bug, please follow the issue template and provide a detailed description and a path to reproduce the issue.
For a pull request (PR) to be merged, it requires the approval of at least two collaborators. If a collaborator is the PR author, their approval counts as one.
When you propose a visual change, kindly include screenshots and/or screencasts. This assists in making the intended change more comprehensible.
Ensure your commits follow our convention: category(scope or module): message
,
using categories like feat
, fix
, refactor
, docs
, build
, test
, ci
,
and chore
. For more details, visit
Conventional Commits.
Steps to Submit a PR
- Fork and clone your fork of the repository.
- Create a new branch following the
[type/scope]
convention. - Commit your changes adhering to our commit convention.
- Use
pnpm changeset
for detailed change descriptions, crucial for changelog generation. - For minor changes, use
pnpm changeset add --empty
.
All bug fixes or feature additions must be accompanied by appropriate tests.
By contributing to the Mochi UI GitHub repository, you agree to license your contribution under our project's license.
Your participation and contributions are what make the project exciting and evolving. We look forward to your creative and innovative input!