Testar grátis
4 min leitura Guide 414 of 877

How to Manage Monorepo Development Workflows?

How to manage monorepo development workflows?

Manage monorepo workflows by using package-specific labels (pkg:frontend, pkg:api), creating tasks that identify affected packages, coordinating cross-package changes in single tasks, and tracking shared dependency updates. Document package ownership in NoteVault and set up column subscribers for package-specific notifications.

Monorepo labels

LabelPurpose
pkg:frontendFrontend package
pkg:apiAPI package
pkg:sharedShared utilities
pkg:mobileMobile app
pkg:cliCLI tool
cross-packageMultiple packages affected
shared-depsShared dependency change
release:frontendFrontend release
release:apiAPI release

Monorepo task template

## Feature: [Feature Name]

### Packages Affected
- [x] pkg:frontend - UI components
- [x] pkg:api - New endpoints
- [ ] pkg:shared - Utility functions
- [ ] pkg:mobile - Not affected

### Changes by Package

#### Frontend (packages/frontend)
- [ ] Add user settings page
- [ ] Connect to new API endpoints

#### API (packages/api)
- [ ] Create settings endpoints
- [ ] Add validation

### Testing Required
- [ ] Frontend unit tests
- [ ] API unit tests
- [ ] Integration tests
- [ ] E2E tests

### Reviews Required
- [ ] @frontend-owner
- [ ] @api-owner

### Release Coordination
Release order: API first, then Frontend
Reason: Frontend depends on new API endpoints

Monorepo workflow:

  1. Identify packages - Which packages does this affect?
  2. Label task - Add package labels
  3. Document changes - Per-package breakdown
  4. Assign reviewers - From each affected package
  5. Develop - Changes across packages
  6. Test all - CI tests entire monorepo
  7. Review - Package owners approve
  8. Coordinate release - Order matters

NoteVault package documentation

# Monorepo Structure

## Packages

| Package | Path | Owner | Description |
|---------|------|-------|-------------|
| frontend | packages/frontend | @frontend-team | React web app |
| api | packages/api | @backend-team | Node.js API |
| shared | packages/shared | @platform-team | Shared utilities |
| mobile | packages/mobile | @mobile-team | React Native app |
| cli | packages/cli | @platform-team | CLI tool |

## Package Dependencies

frontend → shared api → shared mobile → shared cli → shared


## Shared Dependencies
- TypeScript: 5.3.x (all packages)
- Jest: 29.x (all packages)
- ESLint: 8.x (all packages)

## Release Process
1. Shared released first if changed
2. API released before Frontend
3. Mobile can release independently

Cross-package coordination

ScenarioApproach
Breaking change in sharedNotify all package owners
Feature spanning packagesSingle task, multiple labels
Dependency updateTest all packages
Hotfix in one packageCan release independently

Package ownership matrix

DecisionWho Decides
Package architecturePackage owner
Shared dependency updatePlatform team
Cross-package featureAll affected owners
Release timingRelease coordinator
Breaking changesAll affected + platform