MULTI MONOREPO INDEX
Documentation for Developers
๐ Multi-Monorepo Configuration - Complete Documentation Index
This directory contains all documentation and tools for the multi-monorepo performance optimization.
๐ Documentation Files
1. SETUP-COMPLETE.md - Quick Start Guide
- โ Summary of what was configured
- ๐ Next steps to complete setup
- ๐งช Testing and verification
- โฑ๏ธ Read time: 3 minutes
2. MULTI-MONOREPO-SETUP.md - Technical Details
- ๐ Complete configuration details
- ๐ง Troubleshooting guide
- ๐ก Best practices
- ๐ฏ Performance recommendations
- โฑ๏ธ Read time: 10 minutes
3. ROLLBACK-MULTI-MONOREPO.md - Revert Instructions
- ๐ Complete step-by-step rollback guide
- โ Verification checklist
- ๐ Troubleshooting rollback issues
- ๐พ Backup and restore procedures
- โฑ๏ธ Read time: 15 minutes
- โ ๏ธ Important: Read this before reverting any changes!
4. FIX-FILE-LIMITS.md - File Descriptor Limits Fix
- ๐ง Fixes "EMFILE: too many open files" errors
- ๐ Increases macOS file descriptor limits
- ๐ Includes complete rollback instructions
- ๐ Required for multi-monorepo development
- โฑ๏ธ Read time: 10 minutes
- โ ๏ธ Critical: Must be applied for Git operations to work properly
5. ADD_TO_ZSHRC.txt - Shell Configuration
- ๐ Shell environment variables
- ๐ง Useful aliases
- ๐ Copy-paste ready
- โ ๏ธ Already applied to your
~/.zshrc
๐ ๏ธ Scripts and Tools
Configuration Scripts
Located in scripts/ directory:
1. configure-multi-monorepo.js
yarn configure:multi-monorepo
- Sets EventEmitter max listeners to 30
- Applies multi-monorepo optimizations
- Run this after shell restarts if needed
2. verify-multi-monorepo-setup.js
yarn verify:multi-monorepo
- Checks all configuration settings
- Verifies environment variables
- Reports system status
- Shows recommendations
3. quick-rollback.sh
bash scripts/quick-rollback.sh
- โ ๏ธ Use with caution!
- Automated rollback script
- Creates backups before changes
- See ROLLBACK-MULTI-MONOREPO.md for full instructions
4. apply-file-limits.sh
bash scripts/apply-file-limits.sh
- ๐ง Required for file descriptor limits
- Increases macOS file limits (256 โ 65,536)
- Requires sudo password
- Fixes "too many open files" errors
- See FIX-FILE-LIMITS.md for details
๐ Quick Command Reference
Setup & Configuration
# Verify current configuration
yarn verify:multi-monorepo
# Apply multi-monorepo settings
yarn configure:multi-monorepo
# Reset Nx daemon
yarn nx reset
Monitoring
# Check running Nx processes
monorepo-status
# Check environment variables
echo $NODE_OPTIONS
echo $UV_THREADPOOL_SIZE
Maintenance
# Reset all Nx caches across monorepos
nx-reset-all
# Clean up Nx daemons
monorepo-clean
๐ What Was Configured
โ Cursor/VSCode Settings
- TypeScript server: 8GB max memory
- Large files: 4GB support
- Optimized file watchers
- Location:
.vscode/settings.json
โ Nx Configuration
- Max parallel tasks: 3
- Max memory: 16GB
- Daemon concurrency: 6
- Location:
nx.json
โ Node.js Environment
- Max heap size: 8GB
- Thread pool: 128 threads
- EventEmitter listeners: 30
- Location:
~/.zshrc
โ macOS File Descriptor Limits
- System soft limit: 65,536 (was 256)
- System hard limit: 200,000
- Per-process limit: 65,536
- Location:
~/Library/LaunchAgents/limit.maxfiles.plist
โ Applied To
/Users/fguijarro/developer/repos/editor/Users/fguijarro/developer/repos/editor2/Users/fguijarro/developer/repos/gograb-space
๐ฏ When to Use What
| Situation | Action | Documentation |
|---|---|---|
| Just completed setup | Read SETUP-COMPLETE.md | Quick start guide |
| Want to understand details | Read MULTI-MONOREPO-SETUP.md | Technical details |
| Experiencing issues | Check troubleshooting section | MULTI-MONOREPO-SETUP.md |
| Need to revert everything | Read ROLLBACK-MULTI-MONOREPO.md | Full rollback guide |
| Quick verification | Run yarn verify:multi-monorepo |
Automated check |
| After system restart | Run yarn configure:multi-monorepo |
Re-apply settings |
โ ๏ธ Important Notes
Before Rollback
- โ Read ROLLBACK-MULTI-MONOREPO.md completely
- โ Create backups of your customizations
- โ Close all Cursor windows
- โ Stop all development servers
After Configuration
- โ Restart Cursor completely
- โ
Verify settings with
yarn verify:multi-monorepo - โ Test with your normal workflow
- โ Monitor system resources initially
Regular Maintenance
- ๐ Run
yarn nx resetweekly - ๐ Monitor memory usage
- ๐งน Clean up unused Cursor windows
- ๐ Check for stale processes with
monorepo-status
๐ Getting Help
Quick Checks
Environment variables not set?
source ~/.zshrc echo $NODE_OPTIONSStill seeing MaxListenersExceededWarning?
yarn configure:multi-monorepo # Then restart CursorSeeing "EMFILE: too many open files" errors?
# Apply file limits fix (requires password) bash scripts/apply-file-limits.sh # Then restart Cursor # See FIX-FILE-LIMITS.md for detailsCursor running slow?
yarn nx reset # Close unused Cursor windows
Full Verification
cd /Users/fguijarro/developer/repos/editor
yarn verify:multi-monorepo
๐ Expected Performance Improvements
| Metric | Before | After | Improvement |
|---|---|---|---|
| TypeScript compile time | Baseline | Faster | โฌ๏ธ 20-40% |
| Parallel task execution | 1 task | 3 tasks | โฌ๏ธ 300% |
| Memory allocation | 12GB | 16GB | โฌ๏ธ 33% |
| EventEmitter capacity | 10 | 30 | โฌ๏ธ 300% |
| Cursor responsiveness | Good | Excellent | โฌ๏ธ Smoother |
๐๏ธ System Profile
Optimized For:
- Machine: MacBook Pro / Mac Studio / iMac Pro
- RAM: 128GB (you have plenty!)
- CPU: Multi-core Apple Silicon or Intel
- Workload: 2-3 monorepos simultaneously
Not Recommended For:
- Machines with < 16GB RAM
- Single monorepo workflows
- Shared/CI environments
๐ Change Log
October 18, 2025
- โ Initial multi-monorepo optimization
- โ Applied to 3 monorepos
- โ Shell configuration added
- โ File descriptor limits fix added
- โ Documentation created
- โ Rollback guide provided (includes file limits rollback)
๐ File Structure
editor/
โโโ docs/english/public/development/monorepo/
โ โโโ SETUP-COMPLETE.md # Quick start (read first!)
โ โโโ MULTI-MONOREPO-SETUP.md # Technical details
โ โโโ ROLLBACK-MULTI-MONOREPO.md # Revert instructions
โ โโโ FIX-FILE-LIMITS.md # File descriptor limits fix
โ โโโ MULTI-MONOREPO-INDEX.md # This file
โ โโโ ADD_TO_ZSHRC.txt # Shell configuration
โโโ .vscode/
โ โโโ settings.json # Cursor settings (modified)
โโโ nx.json # Nx configuration (modified)
โโโ package.json # Scripts added
โโโ ~/Library/LaunchAgents/
โ โโโ limit.maxfiles.plist # macOS file limits (created)
โโโ scripts/
โโโ configure-multi-monorepo.js # Configuration script
โโโ verify-multi-monorepo-setup.js # Verification script
โโโ quick-rollback.sh # Automated rollback
โโโ apply-file-limits.sh # File limits fix script
Last Updated: October 18, 2025
Configuration Version: 1.0
Machine Profile: High-performance workstation (128GB RAM)
Status: โ
Active and configured