gCore

Geodineum

gCore

A PHP service-container framework: application code stays stateless, with all state held in ValKey.

Built by Niels Erik Toren · distributed as geodineum/gcore (Composer)


What it is

gCore is a singleton manager-of-managers: one container that bootstraps, configures, and hands out a roster of first-party managers - cache, state, security, format, REST API, and more - to application and plugin builders. Components are stateless yet state-aware: configuration and state live in ValKey, namespaced per site, so any node can serve any request.

It runs in three shapes - a WordPress MU-plugin, a standalone PHP library, or Docker - over a ValKey backend, optionally fronted by the gNode daemon. Where gNode is absent, managers degrade gracefully rather than fail. It is one component of the Geodineum ecosystem, alongside gNode, gNode-Client, and gTemplate.

Public build surface

The build-with surface is the container and the manager classes - nothing beneath them.

The complete per-symbol index - every public method, its signature, and a one-line summary - is generated from source into PUBLIC_API.md (php scripts/gen-public-api.php). Prose and behavior live in CONTRACT.md; this README never re-hosts either.

Managers

Each manager is a singleton reached through getService(). The first-party (Base) managers ship complete in this repo - each has a focused guide under docs/. The extension managers ship inert stubs here and light up when their Chapter-2 package (its own repo, geodineum/gcore-<name>) is installed.

First-party (Base) - full implementation

Manager What it does Guide
SecurityManager Roles/capabilities, CSRF, JWT, API keys, tiered rate-limiting docs/README_SECURITY.md
CacheManager Distributed cache over ValKey, per-site isolation, dual free-tier / gNode mode docs/README_CACHE.md
StateManager Distributed state, transactions, observers, atomic counters docs/README_STATE.md
ErrorManager Error/exception/shutdown capture, dedup, level-TTL, admin alerts docs/README_ERROR.md
FormatManager Data-format detection + conversion (delegates to gNode) docs/README_FORMAT.md
APIManager REST routing, middleware pipeline, rate-limit / CORS docs/README_API.md
ResourceManager Asset bundling, template fragments, asset caching docs/README_RESOURCE.md
AssetManager CMS-agnostic asset + manifest storage, daemon-built bundle retrieval docs/README_ASSET.md
CookieManager GDPR consent, encrypted cookies, WordPress privacy tools docs/README_COOKIE.md
VersionManager Version tracking + cache invalidation, multi-tenant docs/README_VERSION.md
WordPressManager DB cloning, DTAP env switching, GDPR PII scrub docs/README_WORDPRESS.md
HtaccessManager Locked .htaccess composition + write-out docs/README_HTACCESS.md
IPBlockManager Apache-level IP block/unblock/expire via .htaccess docs/README_IPBLOCK.md
InstallManager Extension install + file-integrity verification (install/deploy) docs/README_INSTALL.md
BackupManager Filesystem backup/restore/retention (install/deploy) docs/README_BACKUP.md

Extension managers - stub in Chapter 1, Pro in Chapter 2

Inert until their package is installed; calling one returns a stub_mode marker. Each Pro implementation ships in Chapter 2 - see the ecosystem overview at geodineum.com.

Manager Chapter-2 package What the Pro adds
TemplateManager geodineum/gcore-template Tera templating via the gNode daemon
SEOManager geodineum/gcore-seo Persisted SEO + AI/GEO meta generation
InferenceManager geodineum/gcore-inference LLM inference via the gNode LLM tier
TranslateManager geodineum/gcore-translate Translation pipeline via Geodine
AnalyticsManager geodineum/gcore-analytics Visitor journeys, multi-day analytics
MetricsManager geodineum/gcore-metrics Full metric detail + history
OptimizationManager geodineum/gcore-optimization Real asset/DB optimization passes
ManifestManager geodineum/gcore-manifest Full PWA manifest + install tracking
TopologyManager geodineum/gcore-topology Live geometric topology + visualization
CommsManager geodineum/gcore-comms Programmatic multi-channel dispatch
EcommerceManager (stub only - pluggable via EcommerceAdapterInterface) -

The Chapter-1 comms dashboard/test-send surface (Modules/Comms/CommsManager) is real and separate from the inert CommsManager stub slot - see CONTRACT.md §3.8.

Capabilities

Contract

The precise integration surface - container entry points, capability aliases, each manager's access path / signatures / behavior, the base-vs-stub resolution rule, and what gCore consumes and requires - is documented in CONTRACT.md. Agents should prime from CONTRACT.scn.md.

Quick start

Standalone - the minimal path that always runs:

require '/path/to/gCore/bootstrap.php';

$gCore = \gCore\Modules\Core\gCore::getInstance();
$gCore->initialize([
    'site_id' => 'my_app',
    'node_id' => 'node1',
    'storage' => ['host' => '127.0.0.1', 'port' => 47445],
]);

$cache = $gCore->getService('cache');   // by capability alias
$cache->set('greeting', 'hello', 300);
echo $cache->get('greeting');           // hello

The WordPress MU-plugin and Docker deployment paths are described in CONTRACT.md and docs/.

Limits worth knowing

Collaborate

Contributions are welcome. Open issues and pick up work on the ecosystem board at geodineum.com; issues tagged good-first-issue are a good place to start.

Author & support

Built by Niels Erik Toren.

If you want to support the work:

Currency Address
Bitcoin (BTC) bc1qwf78fjgapt2gcts4mwf3gnfkclvqgtlg4gpu4d
Ethereum (ETH) 0xf38b517Dd2005d93E0BDc1e9807665074c5eC731 / nierto.eth
Monero (XMR) 8BPaSoq1pEJH4LgbGNQ92kFJA3oi2frE4igHvdP9Lz2giwhFo2VnNvGT8XABYasjtoVY2Qb3LVHv6CP3qwcJ8UnyRtjWRZ5

Disclaimer

This software is provided "as is", without warranty of any kind, express or implied. Use of this software is entirely at your own risk. In no event shall the author or contributors be held liable for any damages arising from the use or inability to use this software.

License

Licensed under either of

at your option.