ludelix/framework

Modern PHP framework for scalable web applications with SPA integration, multi-tenancy, and observability

dev-main / 1.0.x-dev 2025-06-25 16:03 UTC

This package is auto-updated.

Last update: 2025-06-25 16:03:47 UTC


README

๐Ÿš€ Ludelix Framework

Modern PHP framework for next-generation web applications

PHP Version License Tests Version

โœจ Key Features

๐ŸŽจ SharpTemplate Engine

  • Reactive templates with .ludou extension
  • Hot reload support for development
  • Built-in security and performance optimizations

๐ŸŒ‰ Bridge System

  • Contextual service access without traditional facades
  • Type-safe service resolution
  • Better performance and debugging

๐Ÿ”— LudelixConnect

  • Modern SPA integration replacing Inertia.js
  • Server-Side Rendering (SSR) support
  • WebSocket integration for real-time features
  • React, Vue, and Svelte adapters

๐Ÿข Multi-Tenancy

  • Native tenant isolation
  • Database, cache, and configuration separation
  • Automatic tenant resolution

๐Ÿ“Š Observability

  • Built-in OpenTelemetry integration
  • Prometheus metrics collection
  • Performance monitoring and tracing

๐Ÿ›ฃ๏ธ Dynamic Routing

  • YAML and PHP route definitions
  • REST, GraphQL, and WebSocket unified routing
  • Automatic API documentation generation

๐Ÿš€ Quick Start

Installation

# Install the framework
composer require ludelix/framework

# Create a new project
composer create-project ludelix/app my-app
cd my-app

# Install frontend dependencies
npm install

# Start development
php ludelix serve

Basic Usage

<?php
// routes.php
Route::get('/', [HomeController::class, 'index'])
    ->connect('Home')
    ->name('home');

// HomeController.php
class HomeController {
    public function index() {
        return Connect::component('Home', [
            'user' => Bridge::auth()->user(),
            'posts' => Bridge::db()->table('posts')->get()
        ]);
    }
}
// Home.jsx
import { get, form } from '@ludelix/connect';

function Home({ user, posts }) {
    return (
        <div>
            <h1>Welcome, {user.name}!</h1>
            <button onClick={() => get('/dashboard')}>Dashboard</button>
        </div>
    );
}

๐Ÿ“š Documentation

๐Ÿงช Testing

# Run tests
composer test

# Run with coverage
composer test -- --coverage

# Static analysis
composer analyse

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

git clone https://github.com/ludelix/framework.git
cd framework
composer install
composer test

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐ŸŒŸ Why Ludelix?

Modern Architecture

  • SharpTemplate (.ludou) - Reactive templates with hot reload
  • Bridge System - Type-safe contextual service access
  • LudelixConnect - Advanced SPA integration with SSR
  • Native Multi-Tenancy - Built-in tenant isolation
  • Integrated Observability - OpenTelemetry and Prometheus ready
  • Unified Frontend - Single Vite configuration for all frameworks

Made with โค๏ธ by the Ludelix Team

Website โ€ข Documentation โ€ข Issues โ€ข Discord