Everything You Need
Packed with features to help you build modern web applications faster
File-based Routing
Next.js inspired routing. Create routes by adding files - no configuration needed. Support for pages and API routes.
ORM with Auto-Migration
Laravel-like Eloquent ORM with automatic database migrations. Support for MySQL, PostgreSQL, SQLite, and MongoDB.
Middleware System
Hierarchical middleware for authentication, CORS, security, and custom logic. Easy to implement and manage.
Powerful CLI
Generate routes, models, migrations, and middleware with simple commands. Built-in development server.
Advanced Validation
Comprehensive validation system with 30+ rules including file uploads, conditional validation, and custom rules.
File Upload System
Secure file uploads with validation, public/private storage, and automatic path handling.
Error Handling
Beautiful error pages with stack traces, code preview, and helpful debugging information.
Console Logging
Built-in console logging system for debugging with console_info(), console_error(), and console_debug().
SEO & Metadata
Built-in metadata system with Open Graph and Twitter Card support for better SEO.
Layout System
Hierarchical layout system with automatic content wrapping and metadata merging.
Development Server
Built-in development server with hot reload for instant feedback during development.
Multi Database Support
Unified API for MySQL, PostgreSQL, SQLite, and MongoDB with easy database switching.
Dynamic Routes
Support for [id], [slug] parameters with automatic route matching and parameter extraction.
Zero Configuration
Works immediately with sensible defaults. No complex setup or configuration required.
DI Container
Dependency injection with service container for clean architecture
Template Directives
Optional Blade-like syntax support for @if, @foreach, @include directives (use plain PHP if preferred)
Database Layer
Query builder with support for MySQL, PostgreSQL, and MongoDB
Security Features
CSRF protection, XSS prevention, secure headers, and input sanitization
Form Handling
Easy form creation, validation, and processing with helper functions
Model System
Eloquent-inspired models with relationships and query scopes
Simple. Powerful. Elegant.
Create a complete API endpoint in seconds with clean, readable code that just works. No configuration needed.
File-Based Routing
Create routes by adding files. No configuration required.
Clean Syntax
Write beautiful, maintainable code with intuitive APIs.
Instant Results
See your changes instantly with built-in dev server.
<?php namespace App\Api\Users; use ApnaPHP\Routing\Request; use ApnaPHP\Routing\Response; use App\Models\User; class UsersHandler { public function GET(Request $request) { return Response::json([ 'success' => true, 'users' => User::all() ]); } }
Get Started in Minutes
Three simple steps to launch your application
Install Dependencies
Install the framework using Composer
Create Your First Route
Generate a new page or API endpoint
Start Development Server
Run the built-in ApnaPHP server
Ready to build amazing things!
Your application is running at http://localhost:3000
Built for Modern Developers
Experience the perfect balance of simplicity and power with ApnaPHP
Lightning Fast Development
Build complete PHP applications in hours, not days. File-based routing, powerful CLI commands, and zero configuration get you started immediately.
Modern PHP Architecture
Next.js-inspired file-based routing, Laravel-like ORM, class-based API handlers, and hierarchical middleware system for clean, maintainable PHP code.
Production Ready PHP
Built-in security features, advanced validation, error handling, multi-database support, and comprehensive CLI tools for enterprise-grade PHP applications.
What You'll Love
- Zero Configuration
Start coding PHP immediately without complex setup
- Laravel-like ORM
Familiar Eloquent-style ORM with auto-migrations
- Multi-Database Support
MySQL, PostgreSQL, SQLite, and MongoDB support
- Powerful CLI Tools
Generate routes, models, migrations, and middleware instantly
Perfect For
- PHP Startups & MVPs
Launch your PHP product faster with rapid development
- REST APIs
Build robust PHP APIs with class-based handlers
- Web Applications
Full-stack PHP apps with file-based routing
- Microservices
Lightweight services with minimal overhead
