Skip to content

DopparWhere Performance Meets Aristocratic Syntax

Unlock the Full Potential of Your PHP Applications with Modern Syntax and Uncompromising Performance

✨ Routing

With Doppar, a single line like #[Route('user/store', methods: ['POST'], name: 'user.store', middleware: ['auth'])] gives you full routing power — HTTP method restriction, route naming, and middleware support — all declaratively, elegantly, and without boilerplate.

php
#[Route(
  uri:'user/store',
  methods: ['POST', 'PATCH'],
  name: 'user.store',
  middleware: ['auth'],
  rateLimit: 10,
  rateLimitDecay: 1
)]
public function updateOrCreate(Request $request)
{
    // This route handles POST and PATCH requests sent to 'user/store'.
    // The 'auth' middleware ensures that only authenticated users can access this endpoint.
    // The route name 'user.store' allows you to reference this route elsewhere in your code,
    // such as when generating URLs or redirects.
    // Only 10 request is allowed for this client within 1 minute
}

✨ Binding Services to Abstraction

Doppar allows you to inject dependencies directly at the method signature. By simply decorating a parameter, it immediately clear which concrete implementation is being used:

php
#[Route(uri: 'user/store', methods: ['POST'])]
public function store(
    #[Bind(UserRepository::class)] UserRepositoryInterface $userRepository
) {
    // The framework now explicitly knows to resolve UserRepositoryInterface to UserRepository.
    // The binding is visible exactly where it is used.
}

✨ Model Hook

Doppar’s Model Hooks provide an elegant way to tap into your models’ lifecycle events, allowing you to execute custom logic automatically during creation, updates, deletion, or booting.

php
class User extends Model
{
    protected $hooks = [
        'after_updated' => [
            'handler' => App\Hooks\UserUpdatedHook::class,
            'when' => [self::class, 'isAdmin']
        ],
    ];

    public static function isAdmin(Model $model): bool
    {
      return (int) $model->role === 'admin';
    }
}

class UserUpdatedHook
{
    public function handle(Model $model): void
    {
        if ($model->isDirtyAttr('name')) {
            info("Name changed from {$model->getOriginal('name')} to {$model->name}");
        }
    }
}

✨ Request

Doppar’s request handling system combines dependency injection, data pipelines, and contextual transformations into a concise and expressive syntax

php
public function store(PostRequst $request, #[BindPayload] Post $post)
{
  $data = $request
      ->pipeInputs([
          'title' => fn($v) => ucfirst(trim($v)),
          'tags' => fn($v) => is_string($v) ? explode(',', $v) : $v
      ])
      ->contextual(fn($data) => [
          'slug' => Str::slug($data['title'])
      ])
      ->ensure('slug', fn($slug) => strlen($slug) > 0)
      ->only('title','slug');

  Post::createFromModel($post);
}

✨ The Magic of Parameter-Level Hydration

Traditionally, a controller action receiving a POST request to create a user. With Doppar’s #[BindPayload], this entire setup collapses into a declarative, single line in your method signature:

php
public function store(Request $request) {
    // 1. Validate the request data.
    // 2. Extract the data.
    // 3. Create a new User object and fill it manually.
    $user = new User();
    $user->name = $request->input('name');
    // ... many more lines of mapping
    $user->save();
}

// With #[BindPayload] Attribute
public function store(
    #[BindPayload] User $user // The $user object is fully ready!
) {
    return User::createFromModel($user);
}

✨ Entity ORM

Doppar Entity ORM functionality with expressive reusable query, selective fields, and embedded relationships, all while keeping code clean and readable delivering pure, high-performance data handling with zero external overhead.

php
public function __active(Builder $query): Builder
{
    return $query->whereStatus(true);
}

Post::active()
  ->search(attributes: [
      'title',
      'user.name',
      'category.name'
  ], searchTerm: $request->search, caseSensitive: true)
  ->embed(relations: ['category', 'user', 'tags'])
  ->paginate(perPage: 10);

Why Doppar?

Doppar is engineered for speed — every repeated execution is intelligently memoized, ensuring results are delivered instantly without unnecessary reprocessing.

Blazing Fast Performance

Doppar’s highly optimized core is engineered for maximum speed—delivering near-instant response times, low latency, and seamless execution even under heavy load.

  • Lightweight architecture
  • 📉 Minimal overhead
  • 🔄 Efficient resource usage

JIT Template Compilation

Doppar brings advanced Just-in-Time (JIT) compilation to the Blade template engine — a performance-focused feature that transforms how views are compiled and rendered at runtime.

  • #️⃣ Runtime-optimized Blade
  • 💉 Lazy Component Loading
  • 🧩 Real-time, context-aware rendering optimizations

Entity ORM

Crafted entirely within Doppar's core, this ORM eliminates all third-party dependencies—delivering pure, high-performance data handling with zero external overhead.

  • 🔌 Fully core-powered ORM
  • 🧠 Expressive syntax
  • 🚀 High performance queries

Hook-Driven Model Architecture

Doppar’s model hooks goes beyond and a cleaner, more flexible lifecycle API with support for inline, class-based, and conditional hooks directly in the ORM core.

  • 🔌 Hook into key model stages: boot, update, etc
  • 🧠 Inline, class-based, and conditional logic
  • 🚀 Clean, testable architecture with zero clutter

 

Doppar Offers

Doppar offers a rich set of features out of the box — from a fast, core-powered ORM to built-in routing, validation, and concurrency controls. Everything you need to build modern, high-performance applications with zero unnecessary dependencies.

Service Container

Automatic resolutionContextual bindingsSingleton/Transient
Learn More →

Middleware

Throttle handlingGlobal/Route-specificLightweight pipeline
Learn More →

API Authentication

Stateless AuthScoped permissionsRevocable tokens
Learn More →

Rate Limiter

Dynamic throttlingRedis/File backendsCustom thresholds
Learn More →

Cache

Multi-driverTag invalidationAuto revalidation
Learn More →

Task Schedule

Exclude dateThrottle cron handlerCron with retry
Learn More →

Pool Console

Dev AccelerationClass GenerationTask Scheduling
Learn More →

Processes

ConcurrencyAsync ProcessesCommand Injection
Learn More →

Doppar Axios

Fluent HTTP ClientPromise-like SyntaxBuilt-in Retry & Timeout
Learn More →