💡 Proposal: Microkernel Architecture for GitHub Client
Background
While working on Conduit - a microkernel CLI with component system - I've been exploring ultra-modular package architectures. This sparked an idea for github-client that could benefit the broader ecosystem.
Current State vs. Vision
Current (Monolithic):
composer require jordanpartridge/github-client # Everything (~500KB+)
Proposed (Microkernel):
# Core foundation
composer require jordanpartridge/github-connector
# Surgical precision - install only what you need
composer require jordanpartridge/github-repos-list
composer require jordanpartridge/github-search-repos
composer require jordanpartridge/github-issues-create
composer require jordanpartridge/github-releases-list
Package Structure Proposal
🏗️ Core Foundation
github-connector - Base Saloon connector + authentication
github-http-client - HTTP foundation if not using Saloon
📦 Repository Operations
github-repos-list - List user/org repositories
github-repos-create - Create repositories
github-repos-clone - Clone operations with Process integration
github-repos-settings - Repository settings management
🔍 Search Operations
github-search-repos - Repository search
github-search-code - Code search
github-search-users - User search
github-search-issues - Issue/PR search
🐛 Issue Management
github-issues-list - List issues
github-issues-create - Create issues
github-issues-update - Update/close issues
github-issues-comments - Issue comment operations
🚀 Release Management
github-releases-list - List releases
github-releases-create - Create releases
github-releases-assets - Upload/manage release assets
👥 User/Organization
github-users-profile - User profile operations
github-orgs-management - Organization operations
Benefits
🎯 For Developers
- Dependency Precision: Install exactly what you need
- Faster Installs: 5KB vs 500KB+ for simple use cases
- Reduced Attack Surface: Minimal code footprint
- Better Testing: Each package easily unit tested
- Granular Updates: Update repos without affecting issues
🏗️ For Architecture
- Composability: Mix and match capabilities
- Single Responsibility: Each package has one clear purpose
- Independent Versioning: Breaking changes isolated to specific functionality
- Framework Agnostic: Core can work anywhere, Laravel packages add Laravel-specific features
⚡ For Performance
- No Unused Code: Only load what you use
- Faster Autoloading: Smaller class maps
- Memory Efficiency: Lower memory footprint
Implementation Strategy
Phase 1: Core Foundation
- Extract
github-connector with basic Saloon setup
- Create
github-repos-list as proof of concept
- Ensure backward compatibility with existing github-client
Phase 2: Popular Operations
github-search-repos - Most common search operation
github-issues-list - Popular issue operations
github-releases-list - Release management
Phase 3: Complete Ecosystem
- All remaining operations as micro-packages
- Convenience meta-packages (
github-repos = list + create + clone)
- Framework-specific integrations
Backward Compatibility
The current jordanpartridge/github-client could become a meta-package:
{
"name": "jordanpartridge/github-client",
"type": "metapackage",
"require": {
"jordanpartridge/github-connector": "^2.0",
"jordanpartridge/github-repos-list": "^2.0",
"jordanpartridge/github-repos-create": "^2.0",
"jordanpartridge/github-search-repos": "^2.0",
"jordanpartridge/github-issues-list": "^2.0"
}
}
Real-World Use Cases
Conduit Component Discovery
// Only needs search - 5KB vs 500KB
composer require jordanpartridge/github-search-repos
$components = $searchService->searchByTopic('conduit-component');
Simple Repository Lister
// Only needs repo listing - 8KB total
composer require jordanpartridge/github-repos-list
$repos = $repoService->listUserRepos();
Full GitHub Integration
// Install everything (same as current)
composer require jordanpartridge/github-client
Questions for Discussion
- Naming Convention: Prefer
github-repos-list or github-repositories-list?
- Granularity Level: Too granular or just right?
- Meta-packages: Should we have convenience bundles like
github-repos (list + create + clone)?
- Framework Integration: Laravel-specific packages or framework-agnostic core?
- Migration Path: How to best maintain backward compatibility?
Inspiration
This approach is inspired by:
- NPM ecosystem: Lodash → individual function packages
- Conduit: Microkernel with component architecture
- Saloon: Already provides great HTTP foundation
- Laravel ecosystem: Many successful micro-packages
Impact
This could set a new standard for PHP package architecture - moving from monolithic packages to composable ecosystems where developers get surgical precision in their dependencies.
Would love to hear thoughts on this architectural direction! 🚀
This proposal came from building Conduit where we needed minimal GitHub functionality for component discovery but didn't want to pull in a full GitHub client.
💡 Proposal: Microkernel Architecture for GitHub Client
Background
While working on Conduit - a microkernel CLI with component system - I've been exploring ultra-modular package architectures. This sparked an idea for github-client that could benefit the broader ecosystem.
Current State vs. Vision
Current (Monolithic):
composer require jordanpartridge/github-client # Everything (~500KB+)Proposed (Microkernel):
Package Structure Proposal
🏗️ Core Foundation
github-connector- Base Saloon connector + authenticationgithub-http-client- HTTP foundation if not using Saloon📦 Repository Operations
github-repos-list- List user/org repositoriesgithub-repos-create- Create repositoriesgithub-repos-clone- Clone operations with Process integrationgithub-repos-settings- Repository settings management🔍 Search Operations
github-search-repos- Repository searchgithub-search-code- Code searchgithub-search-users- User searchgithub-search-issues- Issue/PR search🐛 Issue Management
github-issues-list- List issuesgithub-issues-create- Create issuesgithub-issues-update- Update/close issuesgithub-issues-comments- Issue comment operations🚀 Release Management
github-releases-list- List releasesgithub-releases-create- Create releasesgithub-releases-assets- Upload/manage release assets👥 User/Organization
github-users-profile- User profile operationsgithub-orgs-management- Organization operationsBenefits
🎯 For Developers
🏗️ For Architecture
⚡ For Performance
Implementation Strategy
Phase 1: Core Foundation
github-connectorwith basic Saloon setupgithub-repos-listas proof of conceptPhase 2: Popular Operations
github-search-repos- Most common search operationgithub-issues-list- Popular issue operationsgithub-releases-list- Release managementPhase 3: Complete Ecosystem
github-repos= list + create + clone)Backward Compatibility
The current
jordanpartridge/github-clientcould become a meta-package:{ "name": "jordanpartridge/github-client", "type": "metapackage", "require": { "jordanpartridge/github-connector": "^2.0", "jordanpartridge/github-repos-list": "^2.0", "jordanpartridge/github-repos-create": "^2.0", "jordanpartridge/github-search-repos": "^2.0", "jordanpartridge/github-issues-list": "^2.0" } }Real-World Use Cases
Conduit Component Discovery
Simple Repository Lister
Full GitHub Integration
Questions for Discussion
github-repos-listorgithub-repositories-list?github-repos(list + create + clone)?Inspiration
This approach is inspired by:
Impact
This could set a new standard for PHP package architecture - moving from monolithic packages to composable ecosystems where developers get surgical precision in their dependencies.
Would love to hear thoughts on this architectural direction! 🚀
This proposal came from building Conduit where we needed minimal GitHub functionality for component discovery but didn't want to pull in a full GitHub client.