simy/framework

Simy - A minimal, lightweight PHP framework for building web applications and APIs

v1.0.3 2025-08-29 14:16 UTC

This package is auto-updated.

Last update: 2025-09-01 14:20:36 UTC


README

A minimal, dependency-free PHP framework for building web applications and APIs.

โœจ Why Simy?

  • Zero Dependencies - Pure PHP, no bloat
  • PSR-7 Ready - Built-in HTTP message implementation
  • Modern PHP 8 - Leverages latest PHP features
  • Lightning Fast - Minimal overhead, maximum performance
  • Easy Learning - Simple and intuitive API

๐Ÿš€ Get Started in 60 Seconds

1. Download & Install

git clone https://github.com/almhdy24/simy.git
cd simy
  1. Create Your First Route

Edit routes/web.php:

$route->get('/', function() {
    return 'Hello World! ๐ŸŽ‰';
});
  1. Start Developing
php -S localhost:8000 -t public

Open http://localhost:8000 and see your app running!

๐Ÿ’ก Examples

Basic Routing

// Simple response
$route->get('/hello', fn() => 'Hello Simy!');

// JSON API response
$route->get('/api/users', fn() => [
    'users' => [
        ['id' => 1, 'name' => 'John'],
        ['id' => 2, 'name' => 'Jane']
    ]
]);

// Route parameters
$route->get('/user/{id}', fn($req) => 
    "User ID: " . $req->getAttribute('id')
);

Handle Form Data

$route->post('/contact', function($request) {
    $data = $request->getParsedBody();
    return "Hello, " . ($data['name'] ?? 'Guest');
});

๐Ÿ—๏ธ Project Structure

your-app/
โ”œโ”€โ”€ app/           # Your controllers & providers
โ”œโ”€โ”€ core/          # Framework core (PSR-7, Router, DI)
โ”œโ”€โ”€ public/        # Web server root
โ”œโ”€โ”€ routes/        # web.php & api.php
โ””โ”€โ”€ storage/       # Logs & cache (auto-created)

๐Ÿ› ๏ธ Development Commands

# Run tests
composer test

# Start development server  
composer serve

# Run with custom port
php -S localhost:3000 -t public

๐Ÿ“– Learn More

ยท Full Documentation - Detailed guides and examples ยท API Reference - Complete class reference ยท GitHub Repository - Star us! โญ

๐Ÿค Support

Found a bug? Have a question? Create an issue on GitHub!

Built with โค๏ธ by Elmahdi Abdallh MIT Licensed - Free for personal and commercial use