{"id":48683665,"url":"https://github.com/zaxwebs/accelio","last_synced_at":"2026-04-11T03:41:48.187Z","repository":{"id":339176472,"uuid":"1160783831","full_name":"zaxwebs/accelio","owner":"zaxwebs","description":"A lean AI-built PHP framework designed for AI-assisted development.","archived":false,"fork":false,"pushed_at":"2026-02-18T14:44:04.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-18T15:50:00.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaxwebs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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-18T11:17:02.000Z","updated_at":"2026-02-18T14:48:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zaxwebs/accelio","commit_stats":null,"previous_names":["zaxwebs/accelio"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zaxwebs/accelio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxwebs%2Faccelio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxwebs%2Faccelio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxwebs%2Faccelio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxwebs%2Faccelio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaxwebs","download_url":"https://codeload.github.com/zaxwebs/accelio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxwebs%2Faccelio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31668050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"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":[],"created_at":"2026-04-11T03:41:47.407Z","updated_at":"2026-04-11T03:41:48.174Z","avatar_url":"https://github.com/zaxwebs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Accelio\n\nA lightweight PHP 8.3+ framework for web and API apps, designed for both developers and AI agents.\n\nPredictable structure, explicit behavior, small abstractions — easy to understand and extend for humans and coding agents alike.\n\n## Quick Start\n\n```bash\ncomposer install\nphp -S localhost:8000 -t public\n```\n\nThen open \u003chttp://localhost:8000\u003e. Run tests with `composer test`.\n\n## Project Layout\n\n```\nsrc/\n  Core/          Application, Config, Container, Environment, Kernel, Router, View\n  Http/          Request, Response, Method, Middleware, Pipeline\n  Error/         ErrorCode\n  Support/       helpers.php\nconfig/app.php   App configuration\nroutes/web.php   Route definitions\nresources/views/ PHP templates\npublic/index.php Entrypoint\ntests/           Pest test suite\n```\n\n## Architecture\n\n| File | Role |\n|------|------|\n| `Application.php` | Bootstraps typed `Config`, container, kernel |\n| `Config.php` | Readonly value object with `Environment` enum |\n| `Kernel.php` | Request lifecycle, middleware pipeline, trace IDs, security headers |\n| `Router.php` | Route registration (`Method` enum), path params, structured 404/405 |\n| `Container.php` | DI container — `bind`, `singleton`, `make`, `has` |\n| `View.php` | Template rendering, isolated scope, directory traversal prevention |\n| `Request.php` | Query/body/session/route params, flash helpers, bearer token |\n| `Response.php` | HTML/JSON/redirect/error factories |\n| `Method.php` | HTTP method enum (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) |\n| `Middleware.php` | Middleware interface (`handle` + `$next` pattern) |\n| `Pipeline.php` | Chains middleware around a core handler |\n| `ErrorCode.php` | Machine-readable error codes with HTTP status mapping |\n| `helpers.php` | `view`, `json`, `redirect`, `back`, `created`, `no_content`, `e`, `csrf_token`, `csrf_field` |\n\n## Routing\n\n```php\n$router-\u003eget('/users/{id}', function (Request $request, $id) {\n    return json(['id' =\u003e $id]);\n});\n```\n\nSupports `GET`, `POST`, `PUT`, `PATCH`, `DELETE`. Returns structured `405` with `Allow` header when method is wrong.\n\n## Error Responses\n\nAll errors use a consistent envelope:\n\n```json\n{\"ok\": false, \"error\": {\"code\": \"ROUTE_NOT_FOUND\", \"message\": \"No route matches GET /path.\"}}\n```\n\nCodes: `ROUTE_NOT_FOUND`, `METHOD_NOT_ALLOWED`, `VALIDATION_FAILED`, `INTERNAL_ERROR`, `UNAUTHORIZED`, `FORBIDDEN`, `RATE_LIMITED`, `CSRF_MISMATCH`.\n\n## Middleware\n\n```php\n$kernel-\u003emiddleware(new MyMiddleware());\n```\n\nImplement `Accelio\\Http\\Middleware` with `handle(Request $request, Closure $next): Response`.\n\n## Typical Tasks\n\n**Add a page:** create `resources/views/mypage.php`, then `$router-\u003eget('/mypage', fn() =\u003e view('mypage'))`.\n\n**Add a JSON endpoint:** `$router-\u003epost('/api/items', fn(Request $r) =\u003e created(['id' =\u003e 1]))`.\n\n**Add middleware:** create a class implementing `Middleware`, register via `$kernel-\u003emiddleware(...)`.\n\n## Conventions\n\n- One concern per file. Keep handlers readable in `routes/web.php`.\n- Use `e($value)` in templates for XSS-safe output.\n- Use `Response::error(ErrorCode::case, 'message')` for structured errors.\n- Prefer helpers (`json`, `created`, `redirect`, `back`) for consistency.\n- All responses automatically include `X-Trace-Id` and security headers.\n- PHP 8.3 baseline — use strict types, enums, readonly classes.\n\n## Requirements\n\n- PHP `^8.3`, Composer, Pest PHP (dev)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaxwebs%2Faccelio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaxwebs%2Faccelio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaxwebs%2Faccelio/lists"}