Getting Started
Begin your journey with Yabasi Framework in minutes
Quick Installation
composer create-project yabasi/yabasi your-project-name
One command, and you're ready to build something amazing.
System Requirements
PHP Requirements
- PHP >= 8.1
- PDO PHP Extension
- OpenSSL PHP Extension
Additional Requirements
- Composer
- Mbstring PHP Extension
- Tokenizer PHP Extension
Initial Setup
1. Configure Application
Update your application configuration in config/config.php
:
// Configuration file
return [
'app' => [
'name' => 'Your App Name',
'debug' => true, // Set to false in production
'version' => '1.0.0',
'locale' => 'en'
],
'database' => [
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'your_database',
'username' => 'root',
'password' => ''
],
// Other configurations...
];
Configuration settings are stored in PHP arrays, making them secure and efficient.
2. Setup Storage Permissions
Ensure your storage directories are writable:
chmod -R 775 storage/
Required for caching, logging, and temporary files.
3. Generate Security Key
Create a unique application key for security features:
php yabasi key:generate
This key is used for encryption and security features.
4. Start Development Server
Launch your application using PHP's built-in server:
php -S localhost:8000 -t public
Visit http://localhost:8000
For production, use Apache/Nginx
Project Structure
Core Directories
-
app/
Application core code and logic -
config/
Configuration files -
routes/
Route definitions
Resource Directories
-
public/
Public assets and entry point -
storage/
Cache and generated files -
tests/
Application tests
Create Your First Route
Open routes/web.php
and add your first route:
use Yabasi\Routing\Router;
$router->get('/', function() {
return 'Welcome to Yabasi!';
});
Visit http://localhost:8000
to see your first route in action.
Ready to Build?
Now that you're set up, explore these core concepts: