Cogeze
Guide

Installation

Requirements, install steps, and the layout of a Cogeze project.

Requirements#

Version
PHP 8.5+
Composer 2.x
Node 20+
Database MariaDB 12+ / MySQL 8+

Install#

bash
git clone https://github.com/s3tech/cogeze
cd cogeze
composer install
yarn install

cp .env.example .env
php artisan key:generate

Database#

A docker-compose.yml ships with the repository:

bash
docker compose up -d

That starts MariaDB 12.3 with database, user and password all cmsadmin / 1234, matching .env.example. Point .env at your own server instead if you have one:

dotenv
DB_CONNECTION=mariadb
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cmsadmin
DB_USERNAME=cmsadmin
DB_PASSWORD=1234
bash
php artisan migrate --seed

migrate creates only core infrastructure — users, cache, jobs, tokens, route_map, plugins, plugin_settings, command logs, dashboard layouts. Every content table belongs to a plugin.

--seed then installs every plugin found on disk, in dependency order computed by topological sort. There is no hard-coded list, so this step is what turns an empty schema into a working CMS.

Run#

bash
yarn build
php artisan serve

The admin shell is at /admin. The prefix is configurable — see AdminPrefix.

Project layout#

app/
  Plugins/           PluginManager, PluginInstaller, Commander, ShapeRegistry
  RouterHub/         Hub, PageDispatcher, PatternParser, RouteMap, renderers
plugins/
  Article/           one directory per plugin
  Ecommerce/
  StorefrontS3/      the storefront plugin: URLs + views
resources/
  js/admin/          React admin SPA
routes/
  web.php            no public routes — the Hub generates them
  api.php            /api/admin/* and /api/*

Plugin directory conventions#

A plugin is a directory under plugins/ containing a class that extends AbstractPlugin. These paths are loaded automatically when the plugin boots — no registration required:

Path Loaded as
routes/admin.php /api/admin/*, behind auth:sanctum
routes/public.php /api/*
database/migrations/ Run on install, rolled back on uninstall
ui/index.tsx Built to public/plugins/{key}/plugin.js

Verify#

bash
# plugins found on disk — discovery reads the filesystem, not the database
php artisan tinker --execute="echo count(app(App\Plugins\PluginManager::class)->discover());"

# public URLs the Hub generated
php artisan route:list --path=blog

# the storefront answers, and a bad URL returns a themed 404
curl -o /dev/null -w '%{http_code}\n' http://localhost:8000/
curl -o /dev/null -w '%{http_code}\n' http://localhost:8000/no-such-page

# a guest hitting an admin endpoint gets 401, never 500
curl -o /dev/null -w '%{http_code}\n' http://localhost:8000/api/admin/plugins

If / returns 503 with "no storefront", no plugin is claiming the root URL — install or enable a storefront plugin.

Next#

Configuration for environment and services · Writing a plugin to add your own.