ds-supabase provides a JavaScript‑like API for interacting with Supabase’s REST API, featuring an asynchronous query builder, powerful filters, and convenient upserts. It also supports calling Postgres functions (RPC), just like supabase‑js does.
Key Features
Asynchronous Execution
Promise-like structure with .await() returning [data, error]
Or callback-based with .callback(fn)
Powerful Query Builder
Chainable filters (eq, gte, like, in_, etc.)
Modifiers (order, limit, range, etc.)
Upsert with optional conflict handling
Supabase RPC Support
Easily call Postgres functions with .rpc(functionName, params)
Lightweight & Modular
Minimal overhead, easy to integrate in existing FiveM codebases
LuaDoc / JSDoc-style Documentation
Clear, easy-to-read function definitions and usage examples
Ongoing Work
ds-supabase is still under active development. We’re constantly improving the code, adding more examples, and enhancing performance.
We’re finalizing a small resource demonstrating how to insert and query records—a reference point for new developers.
We plan to keep releasing additional free, open-source scripts that integrate well with ds-supabase.
All contributions are welcome—if you discover a bug or want to add a feature, feel free to open an issue or pull request.
Probably not, you’d have to educate ma on what most of this stuff means for me to interpret the value of the features and how to use it. I’m sure the group of people that work with the language this applies to already will understand it, more so just frustrated with myself for not having learned more, yet.
With me having no clue what Supabase is, I looked it up:
Supabase is an open source alternative for Firebase, a dev platform from Google for mobile and web apps. It provides easy to use API functions to deploy an app on multiple platforms.
And looking at the current source code of this script it mostly looks like a wrapper for accessing a database. There is probably a lot more to Supabase, but as OP already said, this is a WIP.
(I probably missed a couple things here and there but I feel like this was the easiest description I could come up with)
But how does this apply to FiveM? From what you’re saying, it seems like something that would be used externally from the server for things like displaying character data on places like twitch or your website from your game servers database
A good release, maybe I will use it in the future. I have been using supabase for my Fivem server, database and storage (I am using my own js wrapper), it is really suitable, light and fast. Currently I am only using its free version but the number of players handled at the same time is about 100 and it is really smooth, no problem. Because of using database via api, my server does not need to install and process database on the server, which helps reduce monthly costs a lot. In the future I may release gamemodes using your supabase script.
Idk what y’all don’t understand. When you make your server, you need a database, everyone is using mysql / mariadb with the oxmysql wrapper.
Other people can prefere using postgres or other database, and this is a wrapper for supabase, which is based on postgres
Hi, I’m one of the developers involved in the creation of this resource.
Supabase is an open-source version of Firebase, which can be self-hosted. The reason this wrapper was created is to facilitate the use of Supabase databases in your resource.
Supabase, in a nutshell, wraps a Postgres database around a RESTful API, allowing you to make fetch / update / upsert / delete / insert requests through the HTTP protocol.
The benefits of Supabase are:
Simplified DB operations by not having to write queries (just push JSON data)
Separate CRUD operations from your resources - it absolves the requirement of having a backend.
Scalability - Supabase can scale up to match your projects size, no matter what the size is.
Enforces security - While RLS and other policies enforced by Supabase are inherent features of Postgres, it wraps it all neatly in a nice frontend, so you can focus more on your project rather than fighting to satisfy security policies.
Separate public/private API keys - With RLS, you can limit certain operations to certain access levels. You can supply players with a public key, who can perform read operations on your database, to build things such as a leaderboard, calculate player’s net worth, etcetera, and your resource can use the private key, which will allow you to perform all operations, delete schemas, etcetera.
Hopefully this helps to answer some of your questions.
so can i replace the local mysql with supabase directly in the server.cfg without needing a database running on my machine? how would the configuration look to make this change?
No, you can’t just swap out MySQL in your server.cfg. ds‑supabase isn’t a drop‑in replacement—it talks to a Supabase Postgres backend over HTTP. You need to set your Supabase URL and API key, then adjust your code to use its API calls instead of MySQL queries.
do you mind helping me out set it up for my fiveM server? it seems like a good admin tool, and I currently host my fiveM server on my physical one, so I’d love to have a place to handle everything.
This really helped me a lot. I’m developing an authentication system for my codes and using Supabase. I was having some difficulties with the connection to PostgreSQL’s RLS, and your code helped me overcome that. Even though I’m not using ox_lib, it was still a great help.