Search by

mj-zana / skeleton-web

mjnable

A starting point for a Zana website: pages in two languages, templates, security headers, and release archives for shared hosting

Package info

github.com/mjnable/zana-skeleton-web

Type:project

pkg:composer/mj-zana/skeleton-web

Statistics

Installs: 40

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.19.2 2026-11-07 09:53 UTC

This package is auto-updated.

Last update: 2026-11-07 09:54:39 UTC


README

A starting point for a website on Zana: pages in English and French, templates, page metadata, versioned assets, security headers, translated error pages, and upload archives for shared hosting.

composer create-project mj-zana/skeleton-web my-site
cd my-site
composer serve

Open http://localhost:8000. composer create-project writes .env with a fresh secret.

What is where

Path
src/Bootstrap.php The framework's providers
config/ Settings; APP_A__B in the environment or .env overrides a.b
modules/Site/ The pages: routes in SiteModule, PageController, templates and translations
templates/ The layout and the error pages
translations/ Texts shared by every module
public/ The document root: index.php, assets, 503.html
tests/ Browser tests: composer test, which also runs the tests in modules/*/Tests
AGENTS.md The rules and workflow for AI coding agents (CLAUDE.md and .github/ point to it)

Add pages with the maker, installed for development:

php bin/console make:page Site Services

For a JSON endpoint, add the packages it needs and register their providers in src/Bootstrap.php (the command lists them), then generate the whole use case:

composer require mj-zana/mediator mj-zana/ddd mj-zana/serialization mj-zana/validation
php bin/console make:feature Site RequestQuote --field=email:string --http

The tests run without .env: in the testing environment, config/testing/security.php gives them a secret of their own.

See what the application contains and check it after a change (--format=json for agents):

php bin/console inspect
php bin/console check

After upgrading Zana, write AGENTS.md again with php bin/console make:agents --force, then add back any section of your own; tests/AgentsFileTest.php reminds you.

Going live

  1. On the server, set APP_ENV=production, APP_APP__URL and APP_SECURITY__SECRET, in the environment or in .env.
  2. Make var/ writable.
  3. Check the server: php bin/console doctor, and the mail settings: php bin/console mail:test you@example.com once mj-zana/communication is installed.

When a page shows the error page, the reason is in var/log/app.log (config/logging.php).

The document root is public/. When the hosting fixes the document root to the project folder, the root .htaccess sends every request into public/, so .env, config/ and vendor/ cannot be reached.

Shared hosting without SSH (cPanel and the like, where public_html is fixed and Composer cannot run):

php bin/console release:build

It writes two archives from the last commit, with the production dependencies installed:

  • build/website.zip: unpack it beside public_html, so the project is in ~/website;
  • build/public_html.zip: unpack it into public_html. Its index.php finds the project in ../website (--folder picks another name).

It finds Composer on the PATH, on Windows too; --composer points at another one, -v shows its output, and --timeout (600 seconds) stops a build that hangs. The command comes from mj-zana/console, so composer update brings its fixes.

Create ~/website/.env on the server, and delete ~/website/var/cache after each upload so the container and the configuration are read again.

The deployment guide covers all of it.

License

MIT