A collection of Mantine UI extension components built with TypeScript, organized as a pnpm monorepo with Nx orchestration.
- @mantyke/spotlight-image - Interactive image component with zoom and pan functionality
- Package Manager: pnpm with workspaces
- Build Orchestration: Nx
- Build Tool: Rollup with TypeScript
- Version Management: Changesets
- Documentation: Next.js
- Testing: Jest + React Testing Library
- Linting: ESLint with TypeScript ESLint
- CI/CD: GitHub Actions
- Node.js 20+
- pnpm 9+
# Install pnpm globally if not already installed
npm install -g pnpm
# Install dependencies
pnpm install
# Build all packages
pnpm run build# Start documentation site (with hot reload)
pnpm run dev
# Start Storybook
pnpm run storybook
# Run tests
pnpm run test
# Run linting
pnpm run lint
# Type check
pnpm run typecheck.
├── apps/
│ └── docs/ # Next.js documentation site
├── packages/
│ └── spotlight-image/ # Component packages
├── scripts/ # Build and utility scripts
└── .github/workflows/ # CI/CD workflows
pnpm run build- Build all packagespnpm run clean- Clean all build outputspnpm run dev- Start docs dev serverpnpm run test- Run all tests with lintingpnpm run lint- Lint all projectspnpm run typecheck- Type check all projectspnpm run docgen- Generate component documentationpnpm run docs:build- Build documentation sitepnpm run storybook- Start Storybook
# Build specific package
pnpm nx build @mantyke/spotlight-image
# Run tests for specific package
pnpm nx test @mantyke/spotlight-image
# Build all packages except docs
pnpm nx run-many -t build --exclude=mantyke-docs
# See affected projects
pnpm nx affected:graph- Create package structure:
mkdir -p packages/my-component/src- Add
package.json:
{
"name": "@mantyke/my-component",
"version": "0.1.0",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.mjs",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"import": "./dist/esm/index.mjs",
"require": "./dist/cjs/index.cjs"
},
"./styles.css": "./dist/styles.css"
},
"peerDependencies": {
"@mantine/core": ">=7.0.0",
"react": "^18.x || ^19.x"
}
}- Add
project.jsonfor Nx:
{
"name": "@mantyke/my-component",
"root": "packages/my-component",
"targets": {
"build": {
"executor": "nx:run-commands",
"outputs": ["{projectRoot}/dist"],
"options": {
"command": "pnpm run build",
"cwd": "{workspaceRoot}"
}
}
}
}- Create component and run:
pnpm install
pnpm run buildThis project uses Changesets for version management.
# Add changeset for your changes
pnpm changeset
# Follow prompts to select packages and bump type
# - patch: bug fixes
# - minor: new features
# - major: breaking changesReleases are automated via GitHub Actions when changesets are merged to master:
- Create changeset on your feature branch
- Commit changeset file
- Open PR and get it merged
- CI will automatically create a "Version Packages" PR
- Merge the version PR to publish to npm
# Version packages based on changesets
pnpm changeset version
# Build and publish
pnpm run build
pnpm changeset publish- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Create a changeset:
pnpm changeset - Submit a pull request
All PRs must pass:
- Type checking
- Linting (ESLint + Stylelint)
- Unit tests
- Build validation
MIT
- [Documentation] (wip)
- Mantine UI