Directory Licensing Documentation
This document outlines the current and post-merger directory licensing structure for React on Rails projects.
Current Structure (Pre-Merger)
react_on_rails Repository - MIT Licensed
All directories in the react_on_rails repository are MIT licensed:
react_on_rails/
├── lib/react_on_rails/ # Core Ruby code (MIT)
├── node_package/src/ # Core JS/TS code (MIT)
│ └── pro/ # Pro features with license validation (Pro licensed)
├── spec/ # Core tests (MIT)
├── docs/ # Documentation (MIT)
├── .github/ # GitHub workflows (MIT)
└── [all other directories] # MIT
Exception: The node_package/src/pro/ directory contains Pro implementation code licensed under the React on Rails Pro License. This code is included in the package but requires a valid Pro license to use.
Important Distinction:
- MIT-licensed interface files (outside
pro/directories) can be freely modified under MIT terms - Using those modifications to access Pro features without a license violates the Pro License
- Pro-licensed files (inside
pro/directories) require a Pro license to use in any way
react_on_rails_pro Repository - Pro Licensed
All directories in the react_on_rails_pro repository are Pro licensed:
react_on_rails_pro/
├── lib/react_on_rails_pro/ # Pro Ruby code
├── packages/node-renderer/ # Pro Node.js renderer
├── spec/ # Pro tests
├── .circleci/ # CircleCI config
└── [all other directories] # Pro licensed
Post-Merger Structure (Target)
After the monorepo merger, the unified repository will have clear directory-based licensing:
MIT Licensed Directories
react_on_rails/ (monorepo root)
├── lib/react_on_rails/ # Core Ruby code (including specs)
├── packages/react-on-rails/ # Core NPM package (including tests)
├── spec/ # Monorepo-level integration tests
│ └── dummy/ # Rails dummy app for testing
├── docs/ # Shared documentation
├── tools/ # Shared development tools
├── .github/ # Unified GitHub workflows
└── [shared config files] # Build configs, etc.
Pro Licensed Directories
react_on_rails/ (monorepo root)
├── lib/react_on_rails_pro/ # Pro Ruby code (including specs)
├── packages/react-on-rails-pro/ # Pro NPM package (including tests)
└── packages/react-on-rails-pro-node-renderer/ # Pro Node renderer (including tests)
License Compliance Rules
File-Level Compliance
- Repository-Level Licensing: Files inherit their license from the directory they're located in
- No Mixed Directories: Each directory is either entirely MIT or entirely Pro - no mixed licensing within a directory
- Clear Boundaries: The
LICENSE.mdfile explicitly lists which directories fall under which license
Package-Level Compliance
-
Gemspec Files:
react_on_rails.gemspec:s.license = "MIT"react_on_rails_pro.gemspec:s.license = "UNLICENSED"
-
Package.json Files:
packages/react-on-rails/package.json:"license": "MIT"packages/react-on-rails-pro/package.json:"license": "UNLICENSED"packages/react-on-rails-pro-node-renderer/package.json:"license": "UNLICENSED"
Critical Compliance Points
-
Never Move Pro Code to MIT Directories: During the merger, strict verification ensures no Pro-licensed code accidentally ends up in MIT-licensed directories
-
Update LICENSE.md Immediately: Whenever directories are moved or created,
LICENSE.mdmust be updated to reflect the new structure -
Automated Verification: CI checks will verify:
- All Pro directories are listed in LICENSE.md
- Package.json and gemspec files have correct license fields
- No orphaned or unlisted directories exist
Migration Phases and License Updates
The monorepo merger plan includes specific license compliance checkpoints at each phase:
- Phase 1: Update license references and documentation
- Phase 2: Establish dual CI with clear directory boundaries
- Phase 3-4: Reorganize directories while maintaining license compliance
- Phase 5-6: Finalize structure and add automated license checking
- Phase 7: Complete documentation and verification
Each phase includes mandatory license compliance verification before proceeding to the next phase.
Developer Guidelines
When Adding New Files
- Determine if the functionality is Core (MIT) or Pro (subscription required)
- Place the file in the appropriate licensed directory
- Ensure the package.json or gemspec correctly reflects the license
- Update LICENSE.md if creating new directories
When Moving Files
- Verify the destination directory has the correct license for the file content
- Never move Pro features to MIT directories
- Update import statements and references
- Verify no licensing boundaries are crossed inappropriately
When Contributing
- Core features (MIT): Open for all contributors
- Pro features: Contributions become part of Pro offering
- Shared tooling/docs (MIT): Benefits both packages
- License compliance: Never compromise on proper licensing
This document is maintained as part of the React on Rails monorepo merger plan. For implementation details, see MONOREPO_MERGER_PLAN_REF.md