jankx / jankx
Jankx is a powerful WordPress theme framework. High performance, compatible, easy to use and develop
2.0.0
2025-08-03 17:58 UTC
Requires
- php: >=7.4
- illuminate/container: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- jankx/dashboard-framework: *
- jankx/option-adapter: *
- league/plates: ^3.6
- psr/container: ^1.0|^2.0
Requires (Dev)
- brain/monkey: ^2.6
- mockery/mockery: ^1.5
- phpunit/php-code-coverage: ^9.2|^10.0
- phpunit/phpunit: ^9.5|^10.0
- yoast/phpunit-polyfills: ^1.0
Suggests
- jankx/dashboard-framework: Official option framework for Jankx theme
- monolog/monolog: Allows more advanced logging of the application flow
README
Chào mừng đến với tài liệu Jankx Framework! Đây là nơi chứa tất cả các hướng dẫn, API reference, và best practices cho việc phát triển với Jankx Framework.
📚 Tài liệu có sẵn
Core Framework
- Getting Started - Hướng dẫn bắt đầu với Jankx Framework
- Architecture Overview - Tổng quan kiến trúc framework
- Service Providers - Hướng dẫn tạo và sử dụng service providers
- Configuration - Cấu hình framework và ứng dụng
Integrations
- WooCommerce Integration - Tích hợp với WooCommerce
- Gutenberg Integration - Tích hợp với Gutenberg blocks
- WordPress Integration - Tích hợp với WordPress core
Development
- Block Development - Phát triển custom blocks
- Template Engine - Sử dụng template engine
- Asset Management - Quản lý CSS, JS, và assets
- Testing Guide - Hướng dẫn testing
Advanced Topics
- Performance Optimization - Tối ưu hóa hiệu suất
- Security Best Practices - Bảo mật và best practices
- Deployment Guide - Hướng dẫn deploy
- Troubleshooting - Xử lý sự cố
🚀 Bắt đầu nhanh
1. Cài đặt
# Clone repository git clone https://github.com/your-org/jankx-framework.git # Install dependencies composer install npm install
2. Cấu hình
// config/app.php return [ 'name' => 'Your Theme', 'version' => '1.0.0', // ... other config ];
3. Tạo Service Provider
// includes/app/Providers/YourServiceProvider.php <?php namespace App\Providers; use Jankx\Foundation\Application; use Jankx\Support\Providers\ServiceProvider; class YourServiceProvider extends ServiceProvider { public function register(Application $app) { // Register services } public function boot(Application $app) { // Bootstrap services } }
4. Đăng ký Provider
// config/providers.php 'frontend' => [ App\Providers\YourServiceProvider::class, ],
📖 Cấu trúc Framework
includes/
├── app/ # Application code
│ ├── Providers/ # Service providers
│ ├── Services/ # Business logic
│ ├── Http/ # HTTP kernels
│ └── Console/ # Console commands
├── framework/ # Core framework
│ ├── Foundation/ # Application foundation
│ ├── Support/ # Support classes
│ ├── Gutenberg/ # Gutenberg integration
│ └── Services/ # Core services
└── config/ # Configuration files
├── app.php
├── providers.php
└── ...
🛠️ Development Tools
Composer Scripts
# Install dependencies composer install # Update dependencies composer update # Run tests composer test # Code style check composer cs-check # Code style fix composer cs-fix
NPM Scripts
# Install dependencies npm install # Build assets npm run build # Watch for changes npm run watch # Development build npm run dev
🔧 Configuration
Environment Variables
# .env
WP_DEBUG=true
JANKX_TEMPLATE_ENGINE=jankx
JANKX_TEMPLATE_CACHE=false
Application Config
// config/app.php return [ 'name' => env('APP_NAME', 'Jankx Theme'), 'version' => env('APP_VERSION', '1.0.0'), 'debug' => env('WP_DEBUG', false), 'template_engine' => env('JANKX_TEMPLATE_ENGINE', 'jankx'), ];
📝 Coding Standards
PHP
- PSR-12 coding standard
- Type declarations
- DocBlocks for all methods
- Dependency injection
JavaScript
- ES6+ syntax
- JSDoc comments
- ESLint configuration
- Prettier formatting
CSS/SCSS
- BEM methodology
- SCSS variables
- Mobile-first approach
- Autoprefixer
🧪 Testing
Unit Tests
# Run unit tests composer test:unit # Run with coverage composer test:coverage
Integration Tests
# Run integration tests
composer test:integration
E2E Tests
# Run end-to-end tests
npm run test:e2e
📦 Deployment
Production Build
# Build for production
npm run build:prod
composer install --no-dev --optimize-autoloader
Docker
# Dockerfile FROM wordpress:latest COPY . /var/www/html/wp-content/themes/jankx/
🤝 Contributing
Pull Request Process
- Fork repository
- Create feature branch
- Make changes
- Add tests
- Submit pull request
Code Review
- All code must be reviewed
- Tests must pass
- Documentation must be updated
- Coding standards must be followed
📞 Support
Getting Help
- 📖 Check documentation
- 🐛 Search GitHub issues
- 💬 Join Discord community
- 📧 Contact team
Reporting Issues
- Use GitHub issues
- Provide reproduction steps
- Include environment details
- Add relevant logs
📄 License
This project is licensed under the GPL v3 or later License - see the LICENSE file for details.
🙏 Acknowledgments
- WordPress community
- Laravel framework inspiration
- All contributors
- Beta testers
Cập nhật lần cuối: 2024-01-01 Phiên bản: 2.0.0 Tác giả: Jankx Team