marwa-framework

Starter Kits

Marwa Framework is a minimal core framework. There are currently no official starter kits, but you can quickly bootstrap an application manually.

Manual Setup

1. Create Project Directory

mkdir myapp && cd myapp

2. Install Framework

composer require memran/marwa-framework

3. Create Basic Structure

myapp/
├── app/
│   ├── Controllers/
│   ├── Models/
│   └── Providers/
├── config/
│   ├── app.php
│   ├── database.php
│   └── session.php
├── public/
│   └── index.php
├── routes/
│   ├── web.php
│   └── api.php
├── storage/
├── bootstrap/
└── .env

4. Create Entry Point

// public/index.php
<?php

use Marwa\Framework\HttpKernel;

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

$kernel = new HttpKernel(dirname(__DIR__));
$response = $kernel->handle();

$response->send();
$kernel->terminate($response);

5. Configure Routes

// routes/web.php
use Marwa\Router\Route;

Route::get('/', function () {
    return view('home');
});

Route::get('/about', function () {
    return view('about');
});

6. Create View

// resources/views/home.twig
<h1>Welcome to Marwa</h1>

Module-Based Development

For larger applications, use modules:

php marwa make:module Blog

This creates a modules/Blog/ directory with:

modules/Blog/
├── manifest.php
├── BlogServiceProvider.php
├── Controllers/
├── Models/
├── Resources/
│   └── views/
└── database/
    └── migrations/

Minimal Requirements

What’s Next?