marko/skeleton
The official application template for starting new Marko Framework projects. This is a composer create-project template that scaffolds a ready-to-use project structure with the entry point, directory layout, environment config, and dev tooling pre-configured.
Installation
Section titled “Installation”composer create-project marko/skeleton my-appcd my-appProject Structure
Section titled “Project Structure”my-app/├── app/ # Your application modules├── config/ # Root configuration overrides├── modules/ # Third-party modules├── public/│ └── index.php # Web entry point├── storage/ # Logs, cache, sessions├── tests/├── .env.example # Environment variable template└── composer.jsonEntry Point
Section titled “Entry Point”The public/index.php bootstraps the application:
<?php
declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
use Marko\Core\Application;
$app = Application::boot(dirname(__DIR__));$app->handleRequest();Application::boot() discovers modules, registers bindings, and builds the DI container. handleRequest() routes the incoming HTTP request to the matched controller.
Getting Started
Section titled “Getting Started”- Copy the environment template:
cp .env.example .env- Start the dev server:
marko up- Visit http://localhost:8000
Included Dependencies
Section titled “Included Dependencies”| Package | Description |
|---|---|
marko/framework | Metapackage bundling core, routing, CLI, errors, config, hashing, validation |
marko/env | Environment variable loading (read in config files with Env) |
marko/log | LoggerInterface and the shared logger (also required by marko/queue) |
marko/log-file | file log handler: writes rotated files to storage/logs |
marko/log-stream | stream log handler: writes to stderr, for containers and PaaS |
Dev Dependencies
Section titled “Dev Dependencies”| Package | Description |
|---|---|
marko/devserver | marko up / marko down development environment |
pestphp/pest | Testing framework |
Environment Configuration
Section titled “Environment Configuration”The .env.example ships with:
APP_ENV=localAPP_DEBUG=trueAPP_URL=http://localhost:8000
# Signed URLs (marko/routing). At least 32 bytes; do not reuse ENCRYPTION_KEY.# Generate with: php -r 'echo bin2hex(random_bytes(32));'URL_SIGNING_KEY=
# Logging (marko/log). Both handlers ship: file writes to storage/logs (rotated),# stream writes to stderr. Containers and PaaS use stream (the platform collects# stderr); file,stream writes to both.LOG_HANDLERS=fileURL_SIGNING_KEY is empty on purpose: generate a value per environment before you sign URLs (see Signed URLs). Signing with an empty key throws UrlSigningException.
LOG_HANDLERS=file suits local development: records go to storage/logs. Both handler packages are installed, so switching is a configuration change, not a composer require --- see Logging in Production.
See the Configuration guide for adding database, cache, and other environment variables.
Next Steps
Section titled “Next Steps”- Your First Application — Create your first route and controller
- Project Structure — Understand the directory layout in depth
- Create a Custom Module — Build a reusable module inside
app/ - marko/framework — See all optional packages you can add
Requirements
Section titled “Requirements”- PHP 8.5 or higher