Skip to content

Contribution and Development Guide ​

This guide details how to set up a local development environment to work on the Alxarafe framework.

Development Environment (Monorepo) ​

To facilitate development and testing without needing to publish packages to Packagist, the repository includes a demo application in the skeleton/ folder.

This application is configured to use the framework source code (src/) directly from the local disk, thanks to Composer's path repository functionality.

Structure ​

  • src/: Framework source code (what you are editing).
  • skeleton/: Demo application to test your changes.
    • skeleton/Modules/: Test application modules.
    • skeleton/public/: Web entry point.

Initial Setup ​

  1. Open a terminal and go to the skeleton folder:

    bash
    cd skeleton
  2. Install dependencies (this will link the framework locally):

    bash
    composer install
  3. Verify that the symbolic link has been created. In skeleton/vendor/alxarafe/alxarafe you should see a symbolic link pointing to the repository root.

Running the Test Server ​

To bring up the demo application, you can use PHP's built-in web server:

bash
# From the skeleton/ folder
php -S localhost:8080 -t public

Now open your browser at http://localhost:8080. You should see the welcome page of the Demo module served by Alxarafe.

Workflow ​

  1. Make changes to the framework files in src/ (e.g. src/Core/Base/Controller.php).
  2. Refresh the browser at localhost:8080.
  3. The changes are reflected instantly! No need to do composer update.

Adding new test modules ​

If you need to test specific functionality, you can add controllers and views in skeleton/Modules/Demo/.

Next Steps ​

Frontend maintenance and residual risk (ALX-DEPS-001) ​

The 2026-11-29 maintenance comparison used the complete npm audit --json output from unchanged origin/main (9bdfeb298e7afb019f5649449bd1f578552529d8) and the consolidated lockfile, both installed with npm ci in Docker (Node 20.20.2, npm 10.8.2). The baseline manifests and lockfile were copied without alteration.

Audit resultBaselineConsolidated
Affected packages132
High / moderate package findings10 / 31 / 1
Distinct underlying advisories388
Newly introduced advisories—0

Thirty advisories were removed. The two remaining complete audit entries, including severity, affected range, dependency nodes and underlying advisory metadata, are identical to the baseline. Both full audits exit 1; warnings have not been hidden or disabled. npm audit --omit=dev exits 0, but that does not replace the full audit or establish that developer tooling is safe.

All remaining advisories follow the same dependency path: alxarafe -> vitepress@1.6.4 -> vite@5.4.21 (devDependencies). VitePress also appears as an indirect moderate finding; it is not a ninth underlying advisory. The ranges below are the Vite ranges reported by npm for this installed branch; the upstream links also describe other affected major branches.

AdvisorySeverityAffected Vite rangeActual exposure and containment
GHSA-4w7w-66w2-5vf9Moderate<=6.4.1A network-accessible dev server can disclose predictable external .map files. No Vite server is started by production workflows; the local docs development command binds to loopback.
GHSA-v6wh-96g9-6wx3Moderate<=6.4.2Windows UNC paths reaching editor middleware can disclose NTLMv2 credentials, including through a malicious web page. Linux build runners and static hosting do not provide this endpoint; loopback alone does not eliminate the Windows developer risk.
GHSA-698v-4r3x-3vcvModerate<=6.4.3Windows editor command escaping can permit execution when malicious filenames and environment variables or alternate data streams are controlled. No editor middleware runs in the production deployment.
GHSA-r825-w8mm-5pxwModerate<=6.4.3Crafted filesystem entries can be interpreted as flags by particular editors, including WSL cases. Relevant when using development editor integration, not while serving compiled static files.
GHSA-587h-7wmj-h5pmHigh<=6.4.3A Windows path-check bypass can enable editor command injection without planting the filename, in combination with the escaping flaw. No such runtime exists in the reviewed production workflows.
GHSA-9jrq-w75r-8gcwLow<=6.4.3Cross-origin script loading requires a dev-server HTML transform with an unmodified request URL, inline modules and sensitive client capabilities. No custom Vite middleware is configured in this repository; no Vite runtime is deployed.
GHSA-rq7h-c2jc-7f22Moderate<=6.4.3On non-Windows systems, specific imported paths can disclose host files through a network-exposed dev server. Avoid exposing that server or using untrusted imports; production serves generated files instead.
GHSA-fx2h-pf6j-xcffModerate<=6.4.2Windows/NTFS alternate paths can bypass filesystem deny rules on an exposed dev server. Static production hosting has no Vite filesystem middleware.

Deployment boundary and operational mitigations ​

  • npm run dev is a terminating Webpack build, despite its name. The app workflow runs it after npm ci, publishes its CSS/JS under public_html, and deploys the PHP application. It excludes node_modules from upload. It never runs docs:dev, docs:preview, vite, or a persistent Node server remotely.
  • The documentation workflow uploads only doc/.vitepress/dist/ and publishes that generated HTML/CSS/JS via FTP. Build-time Vue SSR does not become a production SSR or Vite development service. Pages publishes a static artifact.
  • The Docker development Node service runs Webpack's watcher and publishes no ports. The checked-in Nginx configuration forwards PHP to FPM and has no proxy to Vite or its usual ports. These are repository/configuration checks, not an inspection of live Hostinger processes or firewall state.
  • docs:dev explicitly binds to 127.0.0.1. Do not override this with a public host, publish its container port, add a reverse proxy, or use it as production hosting. VitePress 1.6.4 preview is a static-file server, not a Vite dev server; its implementation ignores --host and listens on wildcard interfaces. Run docs:preview only in an isolated environment without published ports or with explicit network access controls. Do not use preview for production hosting.
  • Treat development servers as sensitive: use trusted sources and isolated environments without production secrets, avoid untrusted browsing while one is running, and stop it afterwards. Windows editor-related attacks can still matter with loopback binding. These controls contain exposure; they do not patch the vulnerable dependency.

Future upgrade and repeatable validation ​

VitePress 1.6.4 requires Vite ^5.4.14; Vite 5.4.21 has no same-major fix for these remaining advisories. A separately scoped, compatible VitePress/Vite upgrade is required. The listed advisories are all addressed in Vite 6.4.4 (or appropriate patched later branches), but this is a historical minimum for these specific findings, not a recommendation to adopt an unsupported branch. Select an actively supported patched combination and revalidate Vue/plugin compatibility, SSR, hydration and both documentation languages. An override of the standalone launch-editor package does not repair the copy bundled into Vite 5.

Keep Vue and its server renderer aligned, retain the npm lockfile and use npm ci in deployments. VitePress and Vue have explicit versions instead of latest; Immutable has a bounded major range with a patched minimum. Validation includes full npm audit, frontend/docs builds, all PHP quality gates, and browser theme and navigation regressions. Never silently filter audit findings or run npm audit fix --force to bypass this maintenance scope.