PHPackages                             cakedc/cakephp-supabase - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. cakedc/cakephp-supabase

ActiveCakephp-plugin

cakedc/cakephp-supabase
=======================

A CakePHP 5 plugin for Supabase integration using a custom API client.

02PHP

Since Nov 14Pushed 6mo agoCompare

[ Source](https://github.com/CakeDC/cakephp-supabase)[ Packagist](https://packagist.org/packages/cakedc/cakephp-supabase)[ RSS](/packages/cakedc-cakephp-supabase/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

CakePHP Supabase Plugin
=======================

[](#cakephp-supabase-plugin)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

A CakePHP 5 plugin for integrating with Supabase. This plugin provides a lightweight, custom API client to interact with Supabase services (Auth, Storage, Functions) and a flexible JWT authenticator, without relying on any external, unmaintained Supabase SDKs.

**Core Philosophy:** This plugin uses CakePHP's built-in `Cake\Http\Client` for all API interactions, ensuring long-term maintainability and stability. It assumes your main application connects directly to the Supabase PostgreSQL database via the standard CakePHP datasource configuration.

---

1. Installation
---------------

[](#1-installation)

1. **Install via Composer:**

    ```
    composer require cakedc/supabase
    ```
2. **Load the Plugin:**In your `src/Application.php`, load the plugin in the `bootstrap()` method:

    ```
    public function bootstrap(): void
    {
        parent::bootstrap();

        // Load the Supabase plugin
        $this->addPlugin('CakeDC/Supabase');
    }
    ```

---

2. Configuration
----------------

[](#2-configuration)

### Database Connection

[](#database-connection)

This plugin does not manage your database connection. You should configure your primary datasource in `config/app.php` to connect directly to your Supabase PostgreSQL database, just as you would with any other PostgreSQL database.

### Plugin Configuration

[](#plugin-configuration)

1. **Copy the Configuration File:**Copy the plugin's configuration file from `plugins/cakedc/supabase/config/supabase.php` to your application's main config directory: `config/supabase.php`.
2. **Set Environment Variables:**Customize `config/supabase.php` and provide your Supabase credentials, preferably using environment variables.

    Your `config/supabase.php` should look like this:

    ```
