Search by

veldora / framework

modrao

The Veldora PHP Framework Core — Expressive routing, native templates, ORM, CLI, Auth, and more.

Package info

github.com/veldorahq/veldora-core

pkg:composer/veldora/framework

Statistics

Installs: 128

Dependents: 4

Suggesters: 0

Stars: 2

Open Issues: 3

0.7.1 2026-09-17 10:40 UTC

This package is auto-updated.

Last update: 2026-09-17 10:42:10 UTC


README

Veldora Logo

Veldora Framework Core

The Expressive, High-Performance PHP 8.2+ Web Framework Core.

PHP Version License Version

⚡ Overview

veldora/framework is the foundation core package of the Veldora PHP Framework. It delivers an elegant syntax, modular architecture, blazing fast template compilation, a powerful CLI engine, native session authentication, and database migrations with zero unnecessary dependencies.

  • 🚀 Blazing Fast: Lightweight architecture with minimal overhead.
  • 🎨 Modern Template Engine: Native .veldora.php compilation with Blade-style directives and <x-component> tag syntax.
  • 🗄️ Query Builder & Active Record: Clean, chainable database queries, DB Facade, SoftDeletes, Model Events & Observers.
  • 🔐 Complete Auth Suite: Login, registration, password recovery, profile editing, email verification with pure Veldora UI views.
  • 🛠️ Full CLI Engine: 43+ built-in commands for generators, migrations, UI components, maintenance mode, and development server.
  • 🔒 Security First: Native CSRF protection, secure password hashing, prepared SQL statements, rate-limiting middleware, and session auth.
  • 🧩 Service Container: Flexible IoC container with automatic dependency resolution.

📦 Installation

Install the framework core via Composer:

composer require veldora/framework

Or initialize a new full-stack Veldora application in seconds:

composer create-project veldora/veldora my-app
# or using npx
npx create-veldora-app my-app

🏗️ Core Architecture & Features

1. 🛣️ Expressive Routing

Define clean routes with parameters, named routes, middleware groups, and controllers:

use Veldora\Framework\Http\Route;
use App\Controllers\PostController;

Route::get('/', [HomeController::class, 'index'])->name('home');

Route::prefix('/posts')->middleware('auth')->group(function () {
    Route::get('/', [PostController::class, 'index']);
    Route::get('/create', [PostController::class, 'create']);
    Route::post('/', [PostController::class, 'store']);
    Route::get('/{id}', [PostController::class, 'show']);
});

2. 🎨 Template Engine (.veldora.php)

Veldora compiles clean templates into cached native PHP:

@extends('layouts.app')

@section('content')
<div class="container">
    <h1>Welcome, {{ Auth::user()->name }}</h1>

    @if (session()->has('success'))
        <x-alert variant="success" :message="session('success')" />
    @endif

    <div class="grid">
        @foreach ($posts as $post)
            <x-card :title="$post->title">
                <p>{{ $post->excerpt }}</p>
                <x-button href="/posts/{{ $post->id }}" variant="primary">Read More</x-button>
            </x-card>
        @endforeach
    </div>
</div>
@endsection

3. 🗄️ Database & Models

Work with fluent queries or Active Record models:

namespace App\Models;

use Veldora\Framework\Database\Model;

class Post extends Model
{
    protected string $table = 'posts';
    protected array $fillable = ['title', 'slug', 'body', 'user_id'];

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}

// Queries
$posts = Post::where('status', 'published')->orderBy('created_at', 'desc')->get();
$post  = Post::create([
    'title' => 'Getting Started with Veldora',
    'body'  => 'Veldora makes PHP fun again.',
]);

4. 📜 Schema & Migrations

Define database tables programmatically:

use Veldora\Framework\Database\Migrations\Migration;
use Veldora\Framework\Database\Schema\Blueprint;
use Veldora\Framework\Database\Schema\Schema;

return new class extends Migration {
    public function up(): void
    {
        Schema::create('posts', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->string('slug')->unique();
            $table->text('body');
            $table->foreignId('user_id')->constrained('users')->onDelete('cascade');
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('posts');
    }
};

Run migrations via CLI:

php veldora migrate
php veldora migrate:rollback
php veldora migrate:status

5. ⚡ CLI Tooling (bin/veldora)

Over 41 built-in development commands:

php veldora serve                # Start local development server
php veldora make:controller      # Scaffold a new Controller
php veldora make:model           # Scaffold a new Model
php veldora make:migration       # Scaffold a new Migration
php veldora make:middleware      # Scaffold a new Middleware
php veldora add [component]      # Install a UI component (e.g., button, datatable, modal)
php veldora route:list           # Display registered application routes
php veldora view:clear           # Clear compiled view cache

🧪 Testing

Run framework unit and integration test suites:

composer test

🤝 Contributing

We welcome contributions from the community! Please read our Contributing Guidelines and Code of Conduct before submitting pull requests.

🛡️ Security

If you discover any security vulnerabilities in Veldora Core, please review our Security Policy.

📄 License

Veldora Framework Core is open-sourced software licensed under the MIT License.

Copyright © 2026 Shahriyar Fahim / Veldora Authors.