Skip to content

Installation

Requirements

  • PHP 8.2 or higher
  • Composer

Creating a New Project

The easiest way to get started is with the Lighthouse skeleton:

bash
composer create-project lighthouse/skeleton my-app

This creates a new directory with a fully configured Lighthouse application.

Starting the Development Server

bash
cd my-app
composer start

This starts PHP's built-in server at http://localhost:8000.

Manual Installation

If you prefer to start from scratch:

bash
mkdir my-app
cd my-app
composer init
composer require lighthouse/framework

Then create your entry point:

php
// public/index.php
<?php

require __DIR__ . '/../vendor/autoload.php';

use Lighthouse\Application;

$app = new Application(
    basePath: dirname(__DIR__),
    debug: true
);

$app->get('/', function () {
    return 'Hello, Lighthouse!';
});

$app->run();

What's Included

The skeleton includes:

my-app/
├── config/
│   └── app.php          # Application configuration
├── public/
│   └── index.php        # Entry point
├── routes/
│   └── web.php          # Route definitions
├── src/
│   └── Controllers/     # Your controllers
├── views/
│   └── layouts/         # View templates
└── composer.json

Next Steps

Released under the MIT License.