Installation
Get started with ApnaPHP in seconds! Our official boilerplate includes everything you need to start building modern PHP applications.
Requirements
Before you begin, ensure you have the following installed:
- PHP 8.1+ - ApnaPHP requires PHP 8.1 or higher
- Composer - For dependency management
- Database - MySQL, PostgreSQL, SQLite, or MongoDB (optional for getting started)
Quick Start
1. Create New Project
composer create-project alsocoder/apnaphp my-app
cd my-app
2. Configure Environment
cp .env.example .env
Edit the .env file with your database settings:
DB_DRIVER=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=my_database
DB_USERNAME=root
DB_PASSWORD=password
3. Start Development Server
php apna serve
Visit http://localhost:3000 to see your application! š
What You Get
The boilerplate includes:
- ā Complete ApnaPHP Framework (everything included)
- ā Ready-to-use project structure
- ā Pre-configured environment files
- ā Sample welcome page
- ā Database configuration
- ā CLI tools ready to use
Project Structure
my-app/
āāā app/
ā āāā page.apna.php # Your main page
āāā config/
ā āāā app.php # App configuration
ā āāā database.php # Database configuration
āāā models/ # Your models directory
āāā public/
ā āāā index.php # Entry point
āāā storage/ # Storage directory
āāā .env.example # Environment variables template
āāā composer.json # Dependencies (framework auto-included)
āāā apna # CLI executable
No Manual Setup Required
Unlike other frameworks, you don't need to:
- ā Manually download the framework
- ā Set up complex project structure
- ā Configure routing manually
- ā Install additional dependencies
Everything is pre-configured and ready to use! š
Next Steps
- Configuration - Learn about environment setup
- Project Structure - Understand the framework architecture
- Your First API - Create your first API endpoint
