Concord

Laravel extension for building decoupled, reusable modules on top of Service Providers

Library
Composer
v1.18.1
236stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
45/100Fair
Development Activity32
Maintenance12
Community56
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
67/100Good
Architecture74
Code Quality70
Innovation65
Learning Curve58

Concord is a Laravel package that adds a formal module system on top of Laravel’s built-in Service Providers, giving teams a convention for breaking a Laravel application into isolated, single-topic pieces of business logic. It distinguishes between in-app modules (living under app/Modules/<ModuleName> with looser decoupling requirements) and external modules (distributed as separate Composer packages meant to be reused and customized across projects).

Rather than inventing a new module format, Concord builds a registration and convention layer on top of Laravel’s existing service-provider and facade mechanisms, so registered modules can expose their own models, contracts, proxy classes, console commands, and routes while Concord manages discovery and wiring between them. This makes it a fit for teams building larger Laravel applications (or a family of Laravel-based products) that want enforced separation between business domains without adopting a separate microservices or monorepo architecture.

What You Get

  • A BaseModuleServiceProvider/BaseBoxServiceProvider convention for declaring self-contained modules on top of Laravel’s Service Provider system
  • Support for both in-app modules (under app/Modules/) and external, Composer-distributed modules with the same registration mechanism
  • A Proxies system that lets modules reference each other’s models/contracts without hard dependencies on concrete classes
  • Console commands for scaffolding and inspecting registered modules
  • An events/hooks system for modules to react to lifecycle events without direct coupling

Common Use Cases

  • Splitting a large Laravel monolith into isolated business-domain modules (billing, catalog, shipping) without moving to microservices
  • Building a suite of reusable, Composer-distributed Laravel modules shared across multiple client applications
  • Enforcing decoupling between application areas via Concord’s proxy/contract conventions instead of direct model references
  • Structuring a Laravel-based product line (e.g. an e-commerce platform) where optional modules can be enabled per deployment

Under The Hood

Architecture ConcordServiceProvider.php is the package’s entry point, registering itself as a standard Laravel service provider and exposing the Concord.php facade/manager class that applications use to register modules. Modules extend BaseModuleServiceProvider or BaseBoxServiceProvider (for in-app vs. external modules) under src/Module/, and Concord tracks registered modules through Conventions/ classes that define default naming and path conventions. The Proxies/ subsystem provides indirection so one module can reference another module’s models/contracts through a resolvable proxy rather than a hard class reference, and Routing/ and Console/ add module-scoped route and Artisan-command registration. Events/ and Hooks/ let modules react to registration and lifecycle events. Tech Stack Requires PHP 8.2+ and Laravel 11-13 (illuminate/support, illuminate/console), plus Konekt’s own konekt/enum and konekt/enum-eloquent packages for enum support used throughout module conventions; tests run via PHPUnit 10-12 with Orchestra Testbench to simulate a full Laravel application. Code Quality Tests are split into Unit, Feature, and Modules suites plus a Dummies directory of fixture modules used across tests, suggesting module registration and proxy resolution are exercised against realistic multi-module scenarios rather than isolated units alone; the codebase also carries StyleCI and Scrutinizer badges indicating automated style and quality checks. API Design The API mirrors Laravel’s own service-provider idioms closely (extend a base provider, call $concord->registerModule(...)), which keeps the learning curve low for developers already familiar with Laravel packages, though the in-app vs. external module distinction and proxy pattern require reading the docs to apply correctly.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search