Designs monorepo architectures with workspace structure, build configuration, and CI/CD optimization.
You are a platform engineer who sets up monorepo architectures. Design a monorepo structure for this organization.
Projects to include:
- [LIST APPLICATIONS / PACKAGES]
Languages: [TYPESCRIPT / PYTHON / GO / MIXED]
Build tool preference: [TURBOREPO / NX / BAZEL / LERNA]
Team structure: [HOW TEAMS ARE ORGANIZED]
CI/CD platform: [GITHUB ACTIONS / GITLAB / OTHER]
Deployment targets: [DIFFERENT FOR EACH APP?]
Provide:
**Monorepo Structure**
```
/
├── apps/
│ ├── web/ # Next.js web app
│ ├── api/ # Backend API
│ └── mobile/ # React Native
├── packages/
│ ├── ui/ # Shared UI components
│ ├── utils/ # Shared utilities
│ ├── config/ # Shared configurations
│ └── types/ # Shared TypeScript types
├── tools/
│ └── scripts/ # Build and dev scripts
├── .github/
│ └── workflows/ # CI/CD
├── turbo.json # Turborepo config
├── package.json # Root package.json
└── pnpm-workspace.yaml # Workspace config
```
**Package Configuration**
Root package.json:
```json
{
"private": true,
"workspaces": [...],
"scripts": {...},
"devDependencies": {...}
}
```
Shared package structure:
```json
{
"name": "@org/package",
"version": "0.0.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts"
}
```
**Build Configuration**
Turborepo/Nx config:
```json
{
"pipeline": {
"build": {...},
"test": {...},
"lint": {...}
}
}
```
**Dependency Management**
- Internal dependency strategy
- External dependency hoisting
- Version synchronization
**CI/CD Pipeline**
```yaml
# Affected-based CI
# Caching strategy
# Parallel builds
```
**Developer Experience**
- IDE setup
- Git hooks
- Local development commands
- Documentation structure
**Code Sharing Patterns**
- When to create a shared package
- Package boundaries
- API contracts
**Release Strategy**
- Independent vs unified versioning
- Changelog generation
- Publishing workflowYou are a platform engineer who sets up monorepo architectures. Design a monorepo structure for this organization.
Projects to include:
- [LIST APPLICATIONS / PACKAGES]
Languages: [TYPESCRIPT / PYTHON / GO / MIXED]
Build tool preference: [TURBOREPO / NX / BAZEL / LERNA]
Team structure: [HOW TEAMS ARE ORGANIZED]
CI/CD platform: [GITHUB ACTIONS / GITLAB / OTHER]
Deployment targets: [DIFFERENT FOR EACH APP?]
Provide:
**Monorepo Structure**
```
/
├── apps/
│ ├── web/ # Next.js web app
│ ├── api/ # Backend API
│ └── mobile/ # React Native
├── packages/
│ ├── ui/ # Shared UI components
│ ├── utils/ # Shared utilities
│ ├── config/ # Shared configurations
│ └── types/ # Shared TypeScript types
├── tools/
│ └── scripts/ # Build and dev scripts
├── .github/
│ └── workflows/ # CI/CD
├── turbo.json # Turborepo config
├── package.json # Root package.json
└── pnpm-workspace.yaml # Workspace config
```
**Package Configuration**
Root package.json:
```json
{
"private": true,
"workspaces": [...],
"scripts": {...},
"devDependencies": {...}
}
```
Shared package structure:
```json
{
"name": "@org/package",
"version": "0.0.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts"
}
```
**Build Configuration**
Turborepo/Nx config:
```json
{
"pipeline": {
"build": {...},
"test": {...},
"lint": {...}
}
}
```
**Dependency Management**
- Internal dependency strategy
- External dependency hoisting
- Version synchronization
**CI/CD Pipeline**
```yaml
# Affected-based CI
# Caching strategy
# Parallel builds
```
**Developer Experience**
- IDE setup
- Git hooks
- Local development commands
- Documentation structure
**Code Sharing Patterns**
- When to create a shared package
- Package boundaries
- API contracts
**Release Strategy**
- Independent vs unified versioning
- Changelog generation
- Publishing workflowThis prompt is released under CC0 (Public Domain). You are free to use it for any purpose without attribution.
Explore similar prompts based on category and tags
Creates comprehensive Architecture Decision Records with options analysis, decision matrices, and consequence documentation.
Conducts thorough code reviews covering security, performance, maintainability, and best practices with specific fix suggestions.
Analyzes complex error stack traces to identify root causes and provide specific code fixes.
Identifies security vulnerabilities with fixes, OWASP analysis, and comprehensive hardening recommendations.