Welcome to the CINQ UI monorepo. This repository is managed as a monorepo using pnpm, Turborepo, and Changesets.
Before starting, ensure you have the following installed:
- Node.js (v22 or higher)
- pnpm (v10 or higher)
- Clone the repository:
git clone https://github.com/agencecinq/ui.git
cd ui
- Install dependencies:
pnpm install
Note: Do not use npm install or yarn install. This project relies on pnpm workspaces.
To start the development server for all packages and apps:
pnpm dev
Turbo will intelligently run all dev scripts. Thanks to our configuration, local changes in @agencecinq/utils will be reflected in @agencecinq/drawer and @agencecinq/modal automatically.
To compile all packages:
pnpm build
Turbo caches successful builds. If no code has changed, the build will finish in milliseconds.
pnpm typecheck
pnpm lintWe use Changesets to manage versioning and NPM releases. Never manually update package.json version numbers.
When your feature or fix is ready, run:
pnpm change- Select the packages that were modified (e.g.,
drawer). - Choose the version bump (Patch for fixes, Minor for features).
- Write a brief description of the change.
Before releasing, generate the changelogs and update versions:
pnpm version-packagesTo build and publish the packages to the @agencecinq scope:
pnpm releasepackages/utils: Shared logic, event bus, and helpers.packages/drawer: The Drawer Web Component and its Vite Plugin.packages/modal: The Modal Web Components (Modal + ModalButton).packages/tabs: The Tabs Web Component (<cinq-tabs>) and related utilities.apps/: Apps / themes consuming the packages (e.g.apps/docs).
- Strict ESM: Always use
import.meta.urlinstead of__dirnamein Node.js scripts (Vite plugins). - Shared Utils: If you write a utility function that could be used elsewhere, place it in
@agencecinq/utils. - Peer Dependencies: When adding a dependency to a package, consider if it should be a
peerDependencyto avoid version conflicts in the final consumer project.
Happy coding with CINQ!