First of a stack. Groundwork only — additive, no behavior change, nothing else in the tree touched. The notebook content schema is the contract shared with the API and the agent tool surface, so it is where source parameters and their validation belong. A follow-up PR has the runtime query-source registry borrow from here instead of keeping its own parallel definitions, which had already drifted (different discriminant, different field names, a narrower set of relative units). ## What changed - **`timeRangeSchema` is exported**, and picks up the two validations that existed only in the registry's copy and not here: a positive integer `amount`, and an absolute range whose end follows its start. - **`databaseSourceSchema` / `logsSourceSchema`** give each backend's parameters a single definition. They are spread flat into their cells with `...shape` rather than nested under a `source` key, so the JSON an agent has to author stays shallow. - **`database_identifier`** lets a database cell persist a read-replica selection, which it previously had no field for. Named that rather than `identifier` because every cell already carries an `id`. - **`queryCellBaseSchema`** holds what every runnable cell shares (`title`, `view`, `chart`), which was duplicated across `database_cell` and `log_cell`. `sql` deliberately stays on the members so the domain transform can brand it per dialect and generic code holding a query cell can't hand it to the wrong wire boundary. - **`CELL_KINDS` + `isQueryCell`** classify cells for query-generic UI. The `satisfies Record<Cell['_tag'], CellKind>` clause makes this the registration point for a new backend: adding a cell type fails to compile until it is classified, and `QueryCell` widens on its own once it is. ## Wire compatibility The only wire shape change is the new optional `database_identifier`, so `schema_version` stays at 1 and no persisted content needs migrating. Notebooks are still behind the `explorer` flag, so there is no saved `user_content` to worry about either way. `view` keeps master's current handling — optional on the wire, defaulted to `'table'` in the domain transform — and `chart` stays persisted independently of it, so switching to the table view and back returns the user's chart settings rather than rebuilding them. ## Tests `notebook-schema.test.ts` covers the new validations (unit set, non-positive/fractional amounts, absolute ordering, which field an invalid bound is reported against), `database_identifier`, `isQueryCell` narrowing, and that a chart survives alongside `view: 'table'`. Typecheck, Prettier, and the lint ratchet all clean; 120 tests pass across `data/content/notebooks` and `lib/ai/tools`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for database identifiers in notebook query configurations. - Improved handling of database and log query cells for more consistent notebook behavior. - Preserved chart configuration when switching to a table view. - **Bug Fixes** - Time ranges now require valid dates, positive whole-number relative amounts, and correctly ordered absolute start and end times. - Validation errors now identify the specific time-range field with invalid date values. - **Tests** - Expanded coverage for query-cell detection, time-range validation, optional database identifiers, and chart settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Supabase
Supabase is the Postgres development platform. We're building the features of Firebase using enterprise-grade open source tools.
- Hosted Postgres Database. Docs
- Authentication and Authorization. Docs
- Auto-generated APIs.
- Functions.
- File Storage. Docs
- AI + Vector/Embeddings Toolkit. Docs
- Dashboard
Watch "releases" of this repo to get notified of major updates.
Documentation
For full documentation, visit supabase.com/docs
To see how to Contribute, visit Getting Started
Community & Support
- Community Forum. Best for: help with building, discussion about database best practices.
- GitHub Issues. Best for: bugs and errors you encounter using Supabase.
- Email Support. Best for: problems with your database or infrastructure.
- Discord. Best for: sharing your applications and hanging out with the community.
How it works
Supabase is a combination of open source tools. We’re building the features of Firebase using enterprise-grade, open source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool. If the tool doesn't exist, we build and open source it ourselves. Supabase is not a 1-to-1 mapping of Firebase. Our aim is to give developers a Firebase-like developer experience using open source tools.
Architecture
Supabase is a hosted platform. You can sign up and start using Supabase without installing anything. You can also self-host and develop locally.
- Postgres is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
- Realtime is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Realtime polls Postgres' built-in replication functionality for database changes, converts changes to JSON, then broadcasts the JSON over websockets to authorized clients.
- PostgREST is a web server that turns your PostgreSQL database directly into a RESTful API.
- GoTrue is a JWT-based authentication API that simplifies user sign-ups, logins, and session management in your applications.
- Storage a RESTful API for managing files in S3, with Postgres handling permissions.
- pg_graphql a PostgreSQL extension that exposes a GraphQL API.
- postgres-meta is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.
- Envoy is a cloud-native, high-performance edge and service proxy.
Client libraries
Our approach for client libraries is modular. Each sub-library is a standalone implementation for a single external system. This is one of the ways we support existing tools.
| Language | Client | Feature-Clients (bundled in Supabase client) | ||||
|---|---|---|---|---|---|---|
| Supabase | PostgREST | GoTrue | Realtime | Storage | Functions | |
| ⚡️ Official ⚡️ | ||||||
| JavaScript (TypeScript) | supabase-js | postgrest-js | auth-js | realtime-js | storage-js | functions-js |
| Flutter | supabase-flutter | postgrest-dart | gotrue-dart | realtime-dart | storage-dart | functions-dart |
| Swift | supabase-swift | postgrest-swift | auth-swift | realtime-swift | storage-swift | functions-swift |
| Python | supabase-py | postgrest-py | gotrue-py | realtime-py | storage-py | functions-py |
| 💚 Community 💚 | ||||||
| C# | supabase-csharp | postgrest-csharp | gotrue-csharp | realtime-csharp | storage-csharp | functions-csharp |
| Go | - | postgrest-go | gotrue-go | - | storage-go | functions-go |
| Java | - | - | gotrue-java | - | storage-java | - |
| Kotlin | supabase-kt | postgrest-kt | auth-kt | realtime-kt | storage-kt | functions-kt |
| Ruby | supabase-rb | postgrest-rb | - | - | - | - |
| Rust | - | postgrest-rs | - | - | - | - |
| Godot Engine (GDScript) | supabase-gdscript | - | - | - | - | - |
Badges
[](https://supabase.com)
<a href="https://supabase.com">
<img
width="168"
height="30"
src="https://supabase.com/badge-made-with-supabase.svg"
alt="Made with Supabase"
/>
</a>
[](https://supabase.com)
<a href="https://supabase.com">
<img
width="168"
height="30"
src="https://supabase.com/badge-made-with-supabase-dark.svg"
alt="Made with Supabase"
/>
</a>
Translations
- Arabic | العربية
- Albanian / Shqip
- Bangla / বাংলা
- Bulgarian / Български
- Catalan / Català
- Croatian / Hrvatski
- Czech / čeština
- Danish / Dansk
- Dutch / Nederlands
- English
- Estonian / eesti keel
- Finnish / Suomalainen
- French / Français
- German / Deutsch
- Greek / Ελληνικά
- Gujarati / ગુજરાતી
- Hebrew / עברית
- Hindi / हिंदी
- Hungarian / Magyar
- Nepali / नेपाली
- Indonesian / Bahasa Indonesia
- Italiano / Italian
- Japanese / 日本語
- Korean / 한국어
- Lithuanian / lietuvių
- Latvian / latviski
- Malay / Bahasa Malaysia
- Norwegian (Bokmål) / Norsk (Bokmål)
- Persian / فارسی
- Polish / Polski
- Portuguese / Português
- Portuguese (Brazilian) / Português Brasileiro
- Romanian / Română
- Russian / Pусский
- Serbian / Srpski
- Sinhala / සිංහල
- Slovak / slovenský
- Slovenian / Slovenščina
- Spanish / Español
- Simplified Chinese / 简体中文
- Swedish / Svenska
- Thai / ไทย
- Traditional Chinese / 繁體中文
- Turkish / Türkçe
- Ukrainian / Українська
- Vietnamese / Tiếng Việt
- List of translations



