Search by

kinetis / vector-demo

aln-1

A complete Kinetis application administered by Vector: a shop on MySQL and a support desk on PostgreSQL, in Docker. Create it with --no-install; docker compose up installs backend/.

Package info

github.com/kinetis-dev/vector-demo

Homepage

Issues

Documentation

Type:project

pkg:composer/kinetis/vector-demo

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.1 2026-12-04 11:30 UTC

This package is auto-updated.

Last update: 2026-12-04 11:50:45 UTC


README

Kinetis

kinetis/vector-demo
A complete Kinetis application administered by Vector

Packagist Version Packagist Downloads License CI

Part of Kinetis, a non-blocking PHP framework for API-first applications. The Vector demo is developed in kinetis-dev/vector-dev, beside Vector's PHP package, its AI package and its admin UI.

The application Vector is developed and tested against, as a project of your own. Two business domains on two databases exercise every field type and relation shape Vector administers:

  • a shop on MySQL: customers, orders, products, categories and tags;
  • a support desk on PostgreSQL: teams, agents, tickets, replies and labels.

It runs both admins, background jobs on a real queue, the queue dashboard, a seeded catalog, and kinetis/vector-ai on a scripted provider that needs no model. Each release requires the exact kinetis/vector and kinetis/vector-ai releases cut beside it.

Running it

Docker is the only requirement.

  1. Create the project and its environment file:

    docker run --rm -v "$PWD":/app -w /app composer:2.11 \
        create-project --no-install kinetis/vector-demo vector
    cd vector
    cp backend/.env.example backend/.env
  2. Set JWT_SECRET in backend/.env to at least 32 bytes, for example the output of openssl rand -hex 32. Without it, every request fails.

  3. Start the stack, then create and seed the databases:

    docker compose up --build -d
    docker compose exec app vendor/bin/kinetis migrate
    docker compose exec --user www-data app vendor/bin/kinetis demo:seed

--no-install fetches the project without resolving its dependencies: docker compose up installs them into backend/vendor inside the container that runs them, so no PHP or Composer has to exist on the host. Every docker compose command here runs from the project's root.

Then open either admin and sign in as admin@vector.local with the password password: the decoupled one at http://localhost:3000, which needs nothing more, or the hosted one at /vector/ui once its bundle is installed (below).

Service Address What it is
nginx, app localhost:8080 The application under nginx and PHP-FPM, and the hosted admin at /vector/ui.
frankenphp localhost:8081 The same application under FrankenPHP worker mode, Kinetis's primary runtime.
worker none The queue worker: the application's jobs, then Vector's.
scheduler none Every hour, Vector's and Vector AI's housekeeping commands.
mysql, postgres, redis loopback only The shop, the support desk and Vector's own tables, the queue and the cache.
node localhost:3000 The decoupled admin.

The hosted UI

The admin is served by the application itself, at /vector/ui, behind the session sign-in at /login. Install the @kinetis/vector-ui release kinetis/vector pins (its hosted bundle, from npm), then restart the PHP services so every worker serves it:

docker compose exec app vendor/bin/kinetis vector:install-ui
docker compose restart app frankenphp

Open http://localhost:8080/vector/ui and sign in as admin@vector.local with the password password. vector:install-ui --check exits 0 while the installed bundle is the pinned one.

The decoupled UI

The same admin as an app of its own, on its own origin, extending @kinetis/vector-ui and calling the API with a bearer token. docker compose up starts it on http://localhost:3000; its first start installs its packages, so give it a minute. See frontend/README.md.

Trying the AI

backend/.env.example configures the fake provider demo, whose replies backend/src/Vector/Ai/DemoAiReplies.php scripts. Any other message is answered with the sentences it does answer.

  • Plain-language filters. On the Orders list, type paid orders over 500.
  • The assistant. Open the Products list, click the sparkle button in the app bar and ask Which products are low on stock? It reads the products with Vector's own tools and answers naming products#1.
  • Proposed changes. Turn Assistant may propose changes on in the AI settings, then ask Set the stock of products#9 to 42., Set the stock of products#9 to 7. or Mark order ORD-000184 as shipped. Nothing changes until you approve the proposal.
  • Writing help. In a text input or editor, choose Writing help on one of these texts: the order notes Please make sure to call the customer before the delivery, because the customer has asked us to call ahead before the parcel is delivered., the product description paragraph This lamp gives a warm and pleasant light that is very suitable for reading in the evening and for other quiet activities at home., or, translated into French, Leave the parcel with the neighbour at number 12 if nobody is home.

To use a real model instead, list its provider in VECTOR_AI_PROVIDERS in backend/.env (the file shows how) and recreate the stack; to run without AI, empty it. See the AI documentation.

Building with an AI coding agent

Start the stack, open your MCP-capable coding agent in this directory, and describe what you want built. AGENTS.md is the contract it works to (CLAUDE.md and GEMINI.md import it): kinetis/orbitron is installed as a development dependency, so the agent works from the Kinetis and Vector versions this project really has, and reads the current Kinetis documentation over the same connection.

.mcp.json, .codex/config.toml and .gemini/settings.json each register one stdio MCP server, orbitron, launched as ./bin/orbitron-mcp in a disposable container derived from the app service. Reload or reconnect your client once the stack is up, and approve the project-local server under your client's own policy. The coding agents guide covers each step and its diagnostics.

Working on this package

This repository is a read-only mirror of demo/ in kinetis-dev/vector-dev, split and tagged on each release. Open issues and pull requests there.

License

MIT. See LICENSE.