ApnaPHP

Documentation

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