{"id":28181772,"url":"https://github.com/juanbenitez/supabase-api","last_synced_at":"2025-05-16T03:13:47.492Z","repository":{"id":58438903,"uuid":"530143365","full_name":"juanbenitez/supabase-api","owner":"juanbenitez","description":"Minimal PHP implementation of the Supabase REST API","archived":false,"fork":false,"pushed_at":"2023-10-09T12:34:23.000Z","size":53,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-14T13:11:40.242Z","etag":null,"topics":["api","php","postgresql","postgrest","supabase"],"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/juanbenitez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":"juanbenitez"}},"created_at":"2022-08-29T09:06:40.000Z","updated_at":"2024-11-07T18:48:19.000Z","dependencies_parsed_at":"2024-11-14T13:20:48.762Z","dependency_job_id":null,"html_url":"https://github.com/juanbenitez/supabase-api","commit_stats":{"total_commits":20,"total_committers":4,"mean_commits":5.0,"dds":0.4,"last_synced_commit":"ee626653db6804c95b49bf18d8b73bbdf8c4d951"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"spatie/package-skeleton-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanbenitez%2Fsupabase-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanbenitez%2Fsupabase-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanbenitez%2Fsupabase-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanbenitez%2Fsupabase-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juanbenitez","download_url":"https://codeload.github.com/juanbenitez/supabase-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459032,"owners_count":22074606,"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","php","postgresql","postgrest","supabase"],"created_at":"2025-05-16T03:13:47.355Z","updated_at":"2025-05-16T03:13:47.486Z","avatar_url":"https://github.com/juanbenitez.png","language":"PHP","funding_links":["https://github.com/sponsors/juanbenitez"],"categories":[],"sub_categories":[],"readme":"# A minimal PHP implementation of the Supabase API (WIP)\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/juanbenitez/supabase-api.svg?style=flat-square)](https://packagist.org/packages/juanbenitez/supabase-api)\n[![Tests](https://github.com/juanbenitez/supabase-api/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/juanbenitez/supabase-api/actions/workflows/run-tests.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/juanbenitez/supabase-api.svg?style=flat-square)](https://packagist.org/packages/juanbenitez/supabase-api)\n\nThis is a minimal PHP implementation of the [Supabase API](https://supabase.com/docs/guides/api) wich is supported by [PostgREST](https://postgrest.org/en/stable/index.html). It contains only the methods I needed. However, I'm open to PRs that add extra methods to the client.\n\nSupabase-api is built with help of the awesome [Saloon](https://docs.saloon.dev/) package.\n\n__Be aware that is a work in progress, it's in pre-alpha state, use it at your own risk.__\n\nHere are a few examples on how you can use the package:\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require juanbenitez/supabase-api\n```\n\n## Usage\n\nDefine a request class for a table in your DB.\n\n```php\nuse Juanbenitez\\SupabaseApi\\Request\\ReadRowsRequest;\n\nclass UsersReadRowsRequest extends ReadRowsRequest\n{\n    protected ?string $table = 'users';\n}\n```\n\n```php\n$connector    = new SupabaseConnector('https://testbaseurl.supabase.co/rest/v1/', 'TEST_SUPABASE_SERVICE_KEY');\n$usersRequest = $connector-\u003erequest(new UsersReadRowsRequest());\n\n$usersRequest-\u003eselect(['last_name', 'first_name', 'age'])\n            -\u003ewhere('age', '18')\n            -\u003eorderBy('created_at', 'desc')\n            -\u003elimit(5);\n\n$response = $usersRequest-\u003esend();\n$response-\u003ethrow();\n\necho \"status:\". $response-\u003estatus() . PHP_EOL;\nprint_r ($response-\u003ejson());\n\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Juan Benitez](https://github.com/juanbenitez)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanbenitez%2Fsupabase-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuanbenitez%2Fsupabase-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanbenitez%2Fsupabase-api/lists"}