simy / framework
Simy - A minimal, lightweight PHP framework for building web applications and APIs
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.0
Requires (Dev)
- phpunit/phpunit: ^9.0
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
- Create Your First Route
Edit routes/web.php:
$route->get('/', function() { return 'Hello World! ๐'; });
- 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