{"id":44502341,"url":"https://github.com/velkymx/fw","last_synced_at":"2026-02-20T03:01:02.458Z","repository":{"id":337751038,"uuid":"1149411523","full_name":"velkymx/fw","owner":"velkymx","description":"The PHP framework built for speed, simplicity, and vibes.","archived":false,"fork":false,"pushed_at":"2026-02-13T05:04:49.000Z","size":439,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-13T13:27:35.304Z","etag":null,"topics":["framework","php-framework","php8","vibe-coding"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/velkymx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-04T04:42:44.000Z","updated_at":"2026-02-13T05:03:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/velkymx/fw","commit_stats":null,"previous_names":["velkymx/fw"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/velkymx/fw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velkymx%2Ffw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velkymx%2Ffw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velkymx%2Ffw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velkymx%2Ffw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/velkymx","download_url":"https://codeload.github.com/velkymx/fw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velkymx%2Ffw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29639808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T22:32:43.237Z","status":"online","status_checked_at":"2026-02-20T02:00:07.535Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framework","php-framework","php8","vibe-coding"],"created_at":"2026-02-13T07:48:24.181Z","updated_at":"2026-02-20T03:01:02.442Z","avatar_url":"https://github.com/velkymx.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fw Framework\n\n[![PHP Version](https://img.shields.io/badge/php-%3E%3D8.4-8892BF.svg)](https://www.php.net/)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)]()\n\nA high-performance, security-focused PHP 8.4+ MVC framework built for modern web development.\n\n## Features\n\n- **Blazing Fast** - 15,500+ requests/sec with FrankenPHP worker mode\n- **Security First** - Built-in protection against CSRF, XSS, SQL injection, timing attacks\n- **Fiber-Based Async** - Non-blocking I/O with PHP Fibers\n- **Result/Option Types** - Null-safe, exception-free error handling\n- **Active Record ORM** - Elegant database interactions with mass assignment protection\n- **CQRS Support** - Command/Query separation built-in\n- **Modern PHP** - Property hooks, asymmetric visibility, readonly classes\n- **Zero Dependencies** - Core framework has no external dependencies\n\n## Requirements\n\n- PHP 8.4+\n- Composer\n- SQLite, MySQL, or PostgreSQL\n\n## Quick Start\n\n```bash\n# Clone and install\ngit clone https://github.com/yourrepo/fw.git\ncd fw\ncomposer install\n\n# Configure environment\ncp .env.example .env\n\n# Run migrations\nphp fw migrate\n\n# Start development server\nphp fw serve\n```\n\nVisit `http://localhost:8000` to see your app.\n\n## CLI Commands\n\nFW includes a powerful CLI for development tasks:\n\n```bash\nphp fw                              # List all commands\n\n# Code Generation\nphp fw make:model Post -m           # Model + migration\nphp fw make:controller PostController -r  # Resource controller\nphp fw make:migration create_posts_table\nphp fw make:middleware RateLimitMiddleware\n\n# Database\nphp fw migrate                      # Run pending migrations\nphp fw migrate:status               # Show migration status\nphp fw migrate:rollback             # Rollback last batch\nphp fw migrate:fresh                # Drop all \u0026 re-migrate\n\n# Development\nphp fw serve --port=8080            # Start dev server\nphp fw routes:list                  # List all routes\nphp fw cache:clear                  # Clear caches\n\n# Security\nphp fw validate:security            # Scan for vulnerabilities\n```\n\n## Directory Structure\n\n```\napp/\n├── Controllers/      # HTTP request handlers\n├── Models/           # Database models\n├── Views/            # PHP templates\n│   └── layouts/      # Layout templates\n└── Providers/        # Service providers\n\nconfig/\n├── app.php           # Application settings\n├── database.php      # Database configuration\n├── routes.php        # Route definitions\n├── middleware.php    # Middleware configuration\n└── providers.php     # Service provider registration\n\ndatabase/\n└── migrations/       # Database migrations\n\npublic/\n└── index.php         # Application entry point\n\nsrc/                  # Framework core\n├── Console/          # CLI framework \u0026 commands\n├── Core/             # Application, Router, Container\n├── Database/         # ORM, QueryBuilder, Migrations\n├── Model/            # Active Record base\n└── ...\n\nstubs/                # Code generation templates\nfw                    # CLI entry point\n```\n\n## Documentation\n\n- [Controllers](docs/controllers.md)\n- [Models](docs/models.md)\n- [Views](docs/views.md)\n- [Routing](docs/routing.md)\n- [Middleware](docs/middleware.md)\n- [Validation](docs/validation.md)\n- [Result \u0026 Option Types](docs/result-option.md)\n- [Database \u0026 Migrations](docs/database.md)\n- [Service Providers](docs/providers.md)\n- [CQRS](docs/cqrs.md)\n- [Authentication](docs/authentication.md)\n- [Caching](docs/caching.md)\n\n## Core Concepts\n\n### No Null, No Exceptions\n\nFW uses `Result` and `Option` types instead of null and exceptions:\n\n```php\n// Instead of returning null\nUser::find($id)-\u003ematch(\n    some: fn($user) =\u003e $user-\u003ename,\n    none: fn() =\u003e 'Guest'\n);\n\n// Instead of try/catch\n$result = $this-\u003ecreateUser($data);\nif ($result-\u003eisOk()) {\n    return $this-\u003eredirect('/users/' . $result-\u003egetValue()-\u003eid);\n}\nreturn $this-\u003eview('users.create', ['errors' =\u003e $result-\u003egetError()]);\n```\n\n### Simple Routing\n\n```php\n// config/routes.php\nreturn function (Router $router): void {\n    $router-\u003eget('/', [HomeController::class, 'index']);\n    $router-\u003eget('/posts/{id}', [PostController::class, 'show']);\n\n    $router-\u003egroup('/admin', function (Router $router) {\n        $router-\u003eget('/dashboard', [AdminController::class, 'dashboard']);\n    }, ['auth']);\n};\n```\n\n### Elegant Models\n\n```php\nclass Post extends Model\n{\n    protected static ?string $table = 'posts';\n    protected static array $fillable = ['title', 'content', 'user_id'];\n\n    public function author(): BelongsTo\n    {\n        return $this-\u003ebelongsTo(User::class, 'user_id');\n    }\n}\n\n// Usage\n$posts = Post::where('published', true)-\u003eorderBy('created_at', 'desc')-\u003eget();\n```\n\n### Clean Controllers\n\n```php\nclass PostController extends Controller\n{\n    public function store(Request $request): Response\n    {\n        $validation = $this-\u003evalidate($request, [\n            'title' =\u003e 'required|min:3',\n            'content' =\u003e 'required|min:10',\n        ]);\n\n        if ($validation-\u003eisErr()) {\n            return $this-\u003eview('posts.create', ['errors' =\u003e $validation-\u003egetError()]);\n        }\n\n        $post = Post::create($validation-\u003egetValue());\n        return $this-\u003eredirect('/posts/' . $post-\u003eid);\n    }\n}\n```\n\n## Performance\n\nBenchmarked with FrankenPHP worker mode on Apple M3 Pro:\n\n| Endpoint | Requests/sec | Avg Latency | P99 Latency |\n|----------|-------------|-------------|-------------|\n| /health | 15,530 | 12.94ms | 18.2ms |\n| /api/users | 8,240 | 24.31ms | 35.1ms |\n| /dashboard | 5,120 | 39.06ms | 52.3ms |\n\n## Security\n\nFw Framework includes comprehensive security features:\n\n- **CSRF Protection** - Automatic token validation with timing-safe comparison\n- **SQL Injection Prevention** - Parameterized queries and operator whitelisting\n- **XSS Prevention** - Auto-escaping in views, input sanitization\n- **Mass Assignment Protection** - Fillable/guarded attributes with strict mode\n- **Timing Attack Mitigation** - Constant-time comparison for authentication\n- **Serialization Security** - HMAC-signed queue payloads prevent RCE\n- **Rate Limiting** - Built-in request throttling with cache backend\n- **Trusted Proxy Support** - Secure X-Forwarded-* header handling\n\nSee [SECURITY.md](SECURITY.md) for our security policy.\n\n## Testing\n\n```bash\n# Run all tests\ncomposer test\n\n# Run with coverage\ncomposer test:coverage\n\n# Static analysis\ncomposer analyse\n\n# Code style\ncomposer lint\n\n# Full CI pipeline\ncomposer ci\n```\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelkymx%2Ffw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelkymx%2Ffw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelkymx%2Ffw/lists"}