$ show marmelab/ra-supabase
ra-supabase is a TypeScript library that integrates react-admin with Supabase. It provides a dataProvider, an authProvider, and OpenAPI-schema-driven UI guessers, allowing developers to generate a complete admin interface from a Supabase project with minimal configuration. The dataProvider translates react-admin CRUD operations into Supabase REST queries, supporting pagination, sorting, filtering, and embedded relationships through a custom `@` syntax. The authProvider wraps Supabase Auth, handling email/password login, OAuth callbacks, password reset, and session management. The guessers fetch the Supabase OpenAPI schema and generate List, Show, Edit, and Create pages, or a full `<AdminGuesser>` scaffold.
The LLM identified 3 files worth highlighting for reuse:
Implements a react-admin data provider on top of the Supabase JS client. Translates getList/getOne/getMany/create/update/delete into Supabase queries, with support for pagination, sorting, filters, and embedded relationships using a custom `@` syntax (e.g. `contact@company_id`). The module is self-contained and can be extracted as a reference for building data providers for other PostgREST backends.
Wraps Supabase Auth into a react-admin auth provider. Handles login, logout, signup, password reset, session refresh, and extraction of access tokens from OAuth callback URLs. Demonstrates a clean adapter pattern between a third-party auth SDK and a framework-specific auth contract.
Fetches and parses the Supabase OpenAPI schema (content-type `application/openapi+json`) to generate CRUD pages and resource configurations. The guesser maps available REST paths to List/Show/Edit/Create components, enabling zero-config admin scaffolding. This is a non-obvious schema-driven code generation pattern that can be reused for any OpenAPI-compatible backend.