search ESC

Getting Started

A Launchpad consumer project is a thin PHP application that pulls in Launchpad\Core\* via Composer path autoload and the compiled frontend via a hard-copied public/assets/dist/. This page walks through creating one from scratch.

1. Scaffold a new project

Use the new-project.sh script at the framework root:

bash /var/www/html/launchpad/scripts/new-project.sh blog

This creates /var/www/html/launchpad-blog/, substitutes placeholders, hard-copies the compiled frontend, runs composer dump-autoload, and runs the consumer Vite build.

2. What you get

  • public/index.php — front controller that boots the Application and dispatches the request.
  • bootstrap/app.php — creates the Application with basePath=project-root.
  • routes/web.php — one GET / route pointing at HomeController::index.
  • app/Controllers/HomeController.php — renders views/home.php inside the layout.
  • config/app.php, modules.php, sidebar.json.
  • resources/views/ — your pages; layout + partials inherited from framework stubs.
  • public/assets/dist/ — hard copy of the framework's frontend/dist/.
  • resources/css/app.scss + resources/js/app.js — your project-specific SCSS/JS, compiled by Vite into public/build/.

3. Add an Apache vhost

Add the new site to the SITES array in scripts/setup-vhost.sh, then run:

sudo bash /var/www/html/launchpad/scripts/setup-vhost.sh

The wildcard *.launchpad.local cert already covers every subdomain, so there's no certificate regeneration step.

4. Open it

https://blog.launchpad.local

Tip: The sidebar, navbar, search modal, theme switcher, and manifest-hashed asset loading all come for free from the shared stubs. Your project only needs to provide routes, controllers, and views.