{"id":21767149,"url":"https://github.com/hubertkuch/avocado","last_synced_at":"2025-09-16T20:53:56.237Z","repository":{"id":41309588,"uuid":"473777309","full_name":"HubertKuch/Avocado","owner":"HubertKuch","description":"Simple PHP framework which implements ORM and routing","archived":false,"fork":false,"pushed_at":"2023-03-30T15:18:37.000Z","size":401,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T06:22:00.912Z","etag":null,"topics":["api-server","framework","orm","orm-framework","router","routing"],"latest_commit_sha":null,"homepage":"https://avocadoframework.com","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/HubertKuch.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}},"created_at":"2022-03-24T21:21:46.000Z","updated_at":"2024-05-10T15:45:40.000Z","dependencies_parsed_at":"2023-02-12T17:30:47.733Z","dependency_job_id":null,"html_url":"https://github.com/HubertKuch/Avocado","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubertKuch%2FAvocado","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubertKuch%2FAvocado/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubertKuch%2FAvocado/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubertKuch%2FAvocado/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HubertKuch","download_url":"https://codeload.github.com/HubertKuch/Avocado/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248734045,"owners_count":21153139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api-server","framework","orm","orm-framework","router","routing"],"created_at":"2024-11-26T13:22:31.367Z","updated_at":"2025-09-16T20:53:51.162Z","avatar_url":"https://github.com/HubertKuch.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Avocado Project\n\u003chr\u003e\nAvocado is easy to learn and use framework for PHP8.1 or higher. Heavily inspired by Spring Boot.\n\n## Goals\n\n- Easy and fast way to create applications in PHP.\n- Easy extensible with new features.\n- OOP based application.\n- High abstraction level especially database connection is only a detail.\n- Testable applications.\n- Easy configured app.\n- Fully use PHP attributes from PHP8.0.\n\n## Features\n\u003chr\u003e\n\n- Rest controllers.\n- ORM.\n- Configuration properties in `application.{yaml,json}` file.\n- Database connection is only a detail.\n- Easy writing integration tests.\n- Easy file uploading.\n- JSON serializing and deserializing.\n- Many allowed databases - to connect you only need to set driver class.\n- Middleware.\n- Custom attributes (annotations) interceptors.\n- Parsing request body, params, query, files, attributes into variables (also objects).\n- Fully support for enums.\n- Abstraction level for database.\n- Errors and exceptions handlers.\n- Dependency injection.\n\n## Is Avocado for you?\n\u003chr\u003e\n\nIf you like Java environment (especially Spring boot), OOP, fast \ndevelopment process or fully tests application Avocado is for you.\n\n## First app\n\u003chr\u003e\n\nYou need to redirect all request into main file. In Apache, you can do it\nin `.htaccess` file like this:\n```apacheconf\nRewriteEngine On\nRewriteBase /\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule ^(.+)$ /index.php/$1 [L,QSA]\n```\n\nor in NGINX\n```apacheconf\nserver {\n    listen 80 default_server;\n\n    location / {\n            rewrite ^ /index.php last\n    }\n}\n```\n\nQuick start\n```php\nclass Message {\n    public function __construct(private string $message){}\n}\n\n#[RestController]\nclass GrettingController {\n\n    \n    // response will be JSON { \"message\": \"Hello, \u003cname\u003e!\" }\n    #[GetMapping(\"/gretting/:name\")]\n    public function greet(#[RequestParam(name: \"name\", defaulValue: \"John\")] string $name): Message {\n        return new Message(\"Hello, \" . $name . \"!\");\n    }\n    \n}\n\n#[Avocado]\nclass DemoApplication {\n\n    public static function run(): void {\n        Application::run(__DIR__);\n    }\n    \n}\n\nDemoApplication::run();\n```\n\n## Plans for future\n\u003chr\u003e\n\n- Create a similar system for JPA repositories.\n- Caching data in Redis database.\n\n## License\n\u003chr\u003e\n\nOpen Source on Apache2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubertkuch%2Favocado","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubertkuch%2Favocado","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubertkuch%2Favocado/lists"}