juzdy / juzdy
Easy start http project
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/juzdy/juzdy
Requires
- php: >=8.0
- juzdy/core: ^1.0
This package is not auto-updated.
Last update: 2026-01-30 12:48:12 UTC
README
A modern, lightweight PHP project template built on the Juzdy Core framework. Get started quickly with a clean architecture, dependency injection, PSR-compliance, and event-driven design.
🚀 Quick Start
Prerequisites
- PHP >= 8.0
- Composer
- MySQL (optional, for database functionality)
Installation
-
Clone or use this template:
composer create-project juzdy/juzdy my-project cd my-project -
Install dependencies:
composer install
-
Start the development server:
php -S localhost:8000 -t pub
-
Visit your application: Open http://localhost:8000 in your browser. You should see "Hello from Index Handler!"
Using Docker
For a complete development environment with PHP and MySQL:
./bin/docker-start.sh
Visit http://localhost:8080 to see your application. See DOCKER.md for more details.
📖 Documentation
Complete documentation is available in the doc/ directory:
- Getting Started - Installation and first steps
- Architecture - Understanding the framework structure
- Configuration - Managing application configuration
- HTTP Handlers - Creating request handlers and routes
- Middleware - Using and creating middleware
- Database - Working with models and database
- Layouts & Views - Template rendering and assets
- Docker Development - Docker setup and workflow
- Deployment - Deploying to production
- Examples - Code examples and patterns
✨ What's Included
This template provides a ready-to-use structure with:
- ✅ HTTP Request Handling - PSR-15 middleware and routing
- ✅ Dependency Injection - Advanced DI container with attributes
- ✅ Configuration System - Flexible, file-based configuration
- ✅ Error Handling - Built-in error handler with custom pages
- ✅ Layout System - Template rendering with asset management
- ✅ Docker Support - Complete Docker development environment
- ✅ PSR Compliance - Following PHP standards (PSR-4, PSR-11, PSR-14, PSR-15)
📁 Project Structure
juzdy/
├── app/ # Application code
│ ├── layout/ # View templates
│ │ ├── default/ # Default layout templates
│ │ └── errors/ # Error page templates
│ └── src/ # Source code
│ └── Http/ # HTTP layer
│ └── Handler/ # Request handlers
├── bin/ # Executable scripts
├── doc/ # Documentation
├── etc/ # Configuration
│ └── config/ # Config files
│ ├── config.php # Main configuration
│ ├── db.php # Database configuration
│ ├── layout.php # Layout configuration
│ └── middleware.php # Middleware configuration
├── pub/ # Public directory (web root)
│ ├── .htaccess # Apache rewrite rules
│ └── index.php # Application entry point
├── var/ # Variable data (logs, cache)
├── composer.json # Dependencies
└── README.md # This file
🎯 Core Features
Request Handlers
Create HTTP handlers by extending the base Handler class:
namespace App\Http\Handler; use Juzdy\Http\Handler; use Juzdy\Http\RequestInterface; use Juzdy\Http\ResponseInterface; class MyHandler extends Handler { public function handle(RequestInterface $request): ResponseInterface { return $this->response() ->header('Content-Type', 'application/json') ->body(json_encode(['message' => 'Hello World'])); } }
Access via: http://localhost:8000/MyHandler
Middleware Pipeline
Configure middleware in etc/config/middleware.php:
return [ 'middleware' => [ 'global' => [ \Juzdy\Http\Middleware\CorsMiddleware::class, \Juzdy\Http\Router::class ], ], ];
Dependency Injection
Dependencies are automatically resolved:
class MyHandler extends Handler { public function __construct( private MyService $service, private DatabaseConnection $db ) {} }
🔗 Links
- Core Framework: juzdy/core
- Example Project: skibimad/http
- Full Documentation: doc/
📝 License
This project is open-sourced software licensed under the MIT license.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
💡 Getting Help
- Read the documentation
- Check the examples
- Review the juzdy/core documentation
- Open an issue on GitHub
Built with ❤️ using Juzdy Core