nexus-scholar/graph-core
Lightweight PHP 8.2+ graph data-structure for directed/undirected graphs with node/edge attributes, fast adjacency via integer indexing, read-only subgraph views, and exporters for Cytoscape.js JSON, GraphML, and GEXF. Ideal base for graph analytics.
graph-core handles foundational graph structures, while graph-algorithms (or future packages) can extend functionality (e.g., pathfinding, centrality metrics). Reduces technical debt by decoupling core logic from domain-specific implementations.ext-dom for exports) and provides type safety (PHP 8.2+). Justify adoption if:
Adopt if:
ext-dom for XML exports).Look elsewhere if:
nexus-scholar/graph-algorithms or use NetworkX (Python)."This is a strategic, low-risk investment in a lightweight PHP graph library that enables us to build scalable network analysis tools without heavy dependencies. It’s MIT-licensed, actively maintained (last release: May 2026), and aligns with our roadmap for scholarly data visualization and citation networks. By adopting this, we avoid reinventing graph algorithms, reduce technical debt, and can quickly prototype features like co-authorship maps or dependency graphs—all while supporting exports to industry-standard tools like Gephi and Cytoscape.js. The package is dependency-free (except for XML exports), so it won’t bloat our stack, and its integer-indexed adjacency model ensures performance even with large graphs."
*"graph-core is a batteries-included but extensible graph library for PHP 8.2+. Here’s why it’s a win:
ext-dom for XML exports), so it’s fast and predictable.graph-algorithms for advanced features like centrality metrics or pathfinding if needed.Trade-offs:
Next steps:
graph-algorithms: If we need traversal/pathfinding, we can add that package as a dependency.Key Ask: "Let’s start with a proof-of-concept for our citation network feature—this package will save us 3–6 months of dev time."
How can I help you explore Laravel packages today?