Commands

The commands you will run most often, grouped by what they do.

Generator

CommandWhat it does
php setup.phpRegenerates SQL, backend and frontend code from database/Model/*.json and config.json.
php compile.phpCompiles the HTML views in Resource/View into PHP page classes. These extend \The\PageBase.
./realtime.shWatches files with inotify. On a change it re-runs compile.php and php/set.php, runs sass watch, and refreshes the Composer autoload.

PHP backend

CommandWhat it does
cd php && composer installInstalls the runtime, puneetxp/the.
php php/set.phpCompiles the route definitions in php/Routes/pre/ into php/Routes/web.php. Run it after every route change.
composer dump-autoload --working-dir=phpPicks up new or renamed classes.

Deno backend

CommandWhat it does
deno run --watch --allow-all --unstable-kv index.tsStarts the API. --unstable-kv is required because sessions are stored in Deno KV.
deno check App/Routes/index.tsType-checks the whole route tree.

Frontend

CommandWhat it does
npm run dev / npx ng serveStarts the dev server for SolidJS (Vite) or Angular.
npx vite build / npx ng buildBuilds for production.

Database

mysql -u <user> -p <db> < database/Migration.sql     # structure + relations + role inserts

Migration.sql combines structure.sql, relation.sql and insert.sql. With "postgresql": true, run psql -f database/Migration.sql instead.