A lightweight, expressive PHP MVC framework built for developers who want full control — without the bloat.
Inspired by Laravel's elegance, built from scratch with PHP 8.2+
- MVC Architecture — clean separation of Models, Views, and Controllers
- Custom Router — define routes with full HTTP method support
- Middleware Support — protect routes with reusable middleware layers
- Database Migrations — version-controlled schema management
- Service Layer — keep your business logic organized and testable
- Blade-style Templating — familiar, expressive view rendering
- Snowflake CLI — Artisan-inspired command line tool for scaffolding
- Environment Config —
.envsupport viavlucas/phpdotenv - Mailer — built-in email support via Symfony Mailer
- HTTP Client — make external API requests via Symfony HTTP Client
- Tailwind CSS — frontend styling out of the box
- PHP 8.2+ — modern PHP, modern code
Install via Composer:
composer create-project amir-icecream/frostel my-app
cd my-appCopy the environment file and configure it:
cp .env.example .envStart the development server using Snowflake:
php Snowflake serve├── app/ # Controllers, Models
├── config/ # App configuration files
├── core/ # Framework engine (Router, Console, Helper, etc.)
├── database/
│ └── migrations/ # Database migration files
├── public/ # Entry point (index.php), assets
├── resource/ # Views and templates
├── routes/ # Route definitions
├── services/ # Business logic service classes
├── storage/ # Logs, cache, uploaded files
├── templates/framework/ # Scaffolding templates used by Snowflake CLI
├── vendor/ # Composer dependencies
├── .env # Environment variables
├── Snowflake # CLI tool
└── tailwind.config.js # Tailwind CSS config
Define your routes in the routes/ directory:
use Core\Router;
Router::get('/home', [HomeController::class, 'index']);
Router::post('/user/create', [UserController::class, 'store']);
// With middleware
Router::get('/dashboard', [DashboardController::class, 'index'])->middleware('auth');Frostel ships with Snowflake, a command-line tool for scaffolding and managing your app.
php Snowflake help # Show all available commands
php Snowflake serve # Start development server
php Snowflake make:controller UserController
php Snowflake make:model User
php Snowflake make:view dashboard
php Snowflake make:middleware AuthMiddleware
php Snowflake make:migration create_users_table
php Snowflake migrate # Run all migrations
php Snowflake migrate:reset # Rollback all migrations
php Snowflake migrate:fresh # Reset and re-run all migrations
php Snowflake view-fresh # Clear cached views
php Snowflake delete-logs # Clear log filesCreate and manage your database schema:
php Snowflake make:migration create_posts_table
php Snowflake migrateCreate middleware to protect routes or modify requests:
php Snowflake make:middleware AuthMiddlewarenamespace App\Middleware;
use Core\Middleware;
class AuthMiddleware extends Middleware
{
public function handle(): void
{
if (!isset($_SESSION['user'])) {
header('Location: /login');
exit;
}
}
}Send emails using the built-in Symfony Mailer integration:
use Services\MailService;
MailService::send(
to: 'user@example.com',
subject: 'Welcome to Frostel',
body: view('emails.welcome')
);All configuration is managed through .env:
APP_NAME=Frostel
APP_ENV=local
APP_URL=http://localhost:8000
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=frostel
DB_USERNAME=root
DB_PASSWORD=
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=
MAIL_PASSWORD=- PHP
^8.2 - Composer
- MySQL or compatible database
| Package | Purpose |
|---|---|
vlucas/phpdotenv |
Environment variable loading |
hekmatinasser/verta |
Jalali/Persian date support |
symfony/mailer |
Email sending |
symfony/http-client |
HTTP client for external APIs |
Frostel is open-source software licensed under the GPL-3.0 License.
Built with ❤️ by amirithm-dev