Download the PHP package machinjiri/framework without Composer
On this page you can find all versions of the php package machinjiri/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download machinjiri/framework
More information about machinjiri/framework
Files in machinjiri/framework
Package framework
Short Description Machinjiri is a lightweight, flexible PHP framework for rapid web development.
License proprietary
Informations about the package framework
Machinjiri PHP Framework
Machinjiri is a flexible, and powerful PHP framework designed for rapid web development. Built with modern PHP 8.2+ principles, it provides a modular architecture, elegant routing system, comprehensive database abstraction, authentication & authorization, and robust security features. Designed for speed, scalability, and developer experience, Machinjiri empowers developers to build secure, maintainable applications efficiently.
Table of Contents
- Introduction
- Features
- System Requirements
- Installation
- Quick Start
- Project Structure
- Core Components
- Routing
- Views & Templates
- Database
- Authentication & Security
- Forms & Validation
- Service Providers
- Mail System
- Queues & Jobs
- Usage Examples
- Configuration
- API Reference
- Error Handling
- Testing
- Console Commands (Artisan)
- Contributing
- License
- Support
Introduction
Machinjiri is designed to accelerate web development with:
- Modular architecture with service providers and dependency injection
- Elegant routing with middleware, groups, and named routes
- Powerful view templating with inheritance and asset management
- Multi-database support with migrations and query builders
- Built-in authentication with OAuth, sessions, and cookies
- Advanced security with encryption, hashing, CSRF tokens, and SQL injection prevention
- Job queues for background processing
- Comprehensive logging and error handling
Features
Core Architecture
- Singleton Application Container: Centralized management of application resources and configuration
- Service Container: Powerful dependency injection with service binding and resolution
- Provider System: Modular service providers with lazy loading and bootstrapping
- Configuration Management: Environment-aware config loading with
.envsupport - Service Facades: Quick access to complex services with simple syntax
Routing System
- Flexible HTTP Routing: RESTful routes with GET, POST, PUT, DELETE, PATCH methods
- Route Groups: Apply middleware, prefixes, and CORS to multiple routes
- Route Parameters: Capture and validate route parameters
- AJAX Handling: Built-in AJAX-only and traditional route segregation
- Named Routes: Generate URLs using route names and parameters
- CORS Support: Automatic CORS header handling and preflight requests
- Rate Limiting: Configurable request rate limiting per route
- Route Caching: Performance optimization through route caching
View Engine
- Template Inheritance: Blade-like template inheritance with layouts and sections
- Custom Template Tags:
<% %>syntax with PHP logic support - Partial Includes: Component-based development with fragment includes
- Asset Management: Automatic CSS/JS resource loading
- Data Sharing: Share data across multiple views globally
- Loop Directives: Enhanced foreach loops with context variables
Database & ORM
- Multi-Driver Support: MySQL, PostgreSQL, SQLite database drivers
- Query Builder: Expressive, fluent query construction
- Migrations: Built-in migration system for database schema management
- Schema Builder: Create, modify, and drop tables programmatically
- Seeders & Factories: Database seeding and model factories for testing
- Connection Pool: Manage multiple database connections
- Transaction Support: ACID compliance with transaction handling
Authentication & Security
- Session Management: Secure session handling with configurable drivers
- OAuth Integration: Third-party authentication (Google, GitHub, etc.)
- Cookie Management: Secure cookie handling with encryption options
- Password Hashing: Built-in password hashing with bcrypt/Argon2
- CSRF Token Protection: Automatic CSRF token generation and validation
- SQL Injection Prevention: Parameterized queries via query builder
- Encryption: AES encryption/decryption for sensitive data
- JWT Tokens: JSON Web Token support for API authentication
Forms & Validation
- Form Validation: Comprehensive validation rules engine
- Rule Builder: Fluent interface for building complex validation rules
- Password Rules: Special validation rules for password strength
- Error Messages: Custom error messages and localization support
- Form Handler: Server-side form processing and CSRF protection
Queues & Jobs
- Background Job Processing: Defer heavy operations to background queues
- Database Queue Driver: Persist jobs in database for reliability
- Job Dispatcher: Flexible job scheduling and dispatching
- Workers: Process jobs with configurable retry logic
- Event System: Event listeners and viewers for queue events
- Artisan Commands: Generate jobs and manage queue processing
Components
- Component Factory: Create UI components programmatically
- Pre-built Components: Alert, Button, Card, Form, Input, Modal, Nav, ProgressBar
- Component Traits: Reusable component functionality
- Attributes Management: Flexible attribute handling for HTML elements
- CSS Classes Builder: Dynamic CSS class generation
HTTP Layer
- Request/Response Objects: Object-oriented HTTP request and response handling
- Request Utilities: Easy access to GET/POST/FILE data, headers, and server info
- Response Types: JSON, redirects, downloads, streaming responses
- Middleware Support: Stack-based middleware pipeline with arguments
- Header Management: Easy header manipulation and CORS configuration
- Status Codes: Comprehensive HTTP status code support
Logging & Monitoring
- Multi-Channel Logging: Database, file, and event-based logging
- Structured Logging: Log levels (DEBUG, INFO, WARNING, ERROR, CRITICAL)
- Event System: Event listeners for application events
- Error Logging: Automatic logging of exceptions and errors
- Environment-Aware: Different logging behavior for dev/production
Date & Time Handling
- DateTime Handler: Unified date/time manipulation
- Timezone Support: Configurable timezone handling
- Format Support: Multiple date format support
- Utility Methods: Common date operations built-in
Network Utilities
- HTTP Client: cURL-based HTTP client for API calls
- Server Management: PHP built-in server management for development
- Connection Handling: Request/response HTTP utilities
System Requirements
- PHP: 8.2 or higher
- Extensions:
- PDO (for database support)
- cURL (for HTTP client)
- JSON (for API support)
- OpenSSL (for encryption)
- Composer: For dependency management
- Database: MySQL 5.7+, PostgreSQL 10+, or SQLite 3+
Installation
Using Global Installer
The easiest way to create a new Machinjiri project is using the global installer:
We have now introduced an interactive installation process in the installer. Rather than using One line command
Quick Start
1. Create Your First Route
2. Create a Controller
3. Create a View
4. Connect Route to Controller
5. Start Development Server
Visit http://localhost:3000 in your browser.
Project Structure
Core Components
Routing System
The router handles all HTTP requests and directs them to appropriate controllers or callbacks.
Basic Routing:
Middleware:
CORS Configuration:
View Engine
Machinjiri provides a powerful templating engine with a clean, readable syntax.
Template Syntax:
Layout Example:
Usage in Controller:
Database & ORM
Machinjiri provides a powerful query builder and migration system for database operations.
Database Configuration:
Query Builder:
Migrations:
Seeders:
Authentication & Security
Machinjiri provides comprehensive authentication and security features.
Session-Based Authentication:
Login/Logout:
OAuth Integration:
Password Security:
CSRF Protection:
Encryption:
Forms & Validation
Create and validate forms with ease.
Form Validation:
Custom Rules:
Queues & Jobs
Process background jobs asynchronously.
Create a Job:
Dispatch Job:
Process Jobs:
Components
Create reusable UI components programmatically.
Available Components:
⚙️ Configuration
Environment Configuration
Configuration is managed through .env files and config classes:
Application Configuration
Service Provider Configuration
Mail Configuration
API Reference
Application Container
Router API
View API
Request API
Response API
Database API
Error Handling
Machinjiri provides comprehensive error handling with environment-aware output:
Error Handler Features:
- Environment-specific error pages (development vs production)
- Automatic logging of uncaught exceptions
- User-friendly error messages in production
- Detailed stack traces in development
- HTTP status code mapping
- Custom error handlers per exception type
Console Commands (Artisan)
Machinjiri includes an Artisan console for common tasks:
Testing
Run tests with PHPUnit:
Example Test:
Contributing
We welcome contributions! Here's how to get started:
-
Fork the Repository
-
Create a Feature Branch
-
Make Your Changes
- Follow PSR-12 coding standards
- Add tests for new features
- Update documentation
-
Commit and Push
- Open a Pull Request
- Describe your changes clearly
- Reference any related issues
- Ensure tests pass
Development Setup
License
This project is licensed under the proprietor License - see the LICENSE file for details.
Support
- GitHub Issues: Report bugs and request features
- Discussions: Ask questions and share ideas
- Email: [email protected]
Authors
Acknowledgments
- Inspired by Laravel's elegant syntax and structure
- Built on modern PHP 8.2+ features
- Community contributions and feedback
Full Documentation:
Built with ❤️ by the Machinjiri Team
Made for developers, by developers.
All versions of framework with dependencies
phpmailer/phpmailer Version ^7.0.1
symfony/console Version ^5.3
symfony/filesystem Version ^5.3
symfony/process Version ^5.3
predis/predis Version ^3.3.0