storage
realtime
storage | realtime | |
---|---|---|
19 | 54 | |
654 | 6,470 | |
10.2% | 0.8% | |
8.4 | 9.2 | |
8 days ago | 14 days ago | |
TypeScript | Elixir | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
storage
-
Supabase Storage: now supports the S3 protocol
[3] https://github.com/supabase/storage/issues/439
The Supabase Storage Engine is fully open source and is one of the few storage solutions that offer 3 interoperable protocols to manage your files:
-
What's the simplest solution to sell digital downloads via SvelteKit?
For instance, consider a supabase setup where you place your photos in storage and your orders in a table. Then, have a function run automatically whenever a new row is added to the orders table. That function would be responsible for identifying what the customer bought and delivering it to them.
-
Managify: Manage Your Teams Easily
In this page, I used Supabase Storage to store the files uploaded by the users
-
HELP -> ERROR: function st_point(double precision, double precision) does not exist (SQLSTATE 42883)
-- Create a table for public profiles CREATE TABLE profiles ( id UUID REFERENCES auth.users ON DELETE CASCADE PRIMARY KEY, updated_at TIMESTAMP WITH TIME ZONE, username TEXT NULL, full_name TEXT, profile_image_url TEXT, bio TEXT, sex SMALLINT DEFAULT 0, CONSTRAINT username_length CHECK (CHAR_LENGTH(username) >= 3) ); -- Create a table for channeles CREATE TABLE channeles ( id SERIAL PRIMARY KEY, userRefId UUID REFERENCES auth.users(id), channel TEXT, updated_at TIMESTAMP WITH TIME ZONE ); -- Create a table for geo location CREATE TABLE user_geo ( id SERIAL PRIMARY KEY, userRefId UUID REFERENCES auth.users(id), location GEOGRAPHY(point) NOT NULL, updated_at TIMESTAMP WITH TIME ZONE ); create index user_geo_index on public.user_geo using GIST (location); -- Set up Row Level Security (RLS) -- See https://supabase.com/docs/guides/auth/row-level-security for more details. ALTER TABLE profiles ENABLE ROW LEVEL SECURITY; CREATE POLICY "Public profiles are viewable by everyone." ON profiles FOR SELECT USING (TRUE); CREATE POLICY "Users can insert their own profile." ON profiles FOR INSERT WITH CHECK (auth.uid() = id); CREATE POLICY "Users can update own profile." ON profiles FOR UPDATE USING (auth.uid() = id); -- Set up Row Level Security (RLS) -- See https://supabase.com/docs/guides/auth/row-level-security for more details. ALTER TABLE channeles ENABLE ROW LEVEL SECURITY; CREATE POLICY "Public channeles are viewable by everyone." ON channeles FOR SELECT USING (TRUE); CREATE POLICY "Users can insert their own channeles." ON channeles FOR INSERT WITH CHECK (auth.uid() = userRefId); CREATE POLICY "Users can update own channeles." ON channeles FOR UPDATE USING (auth.uid() = userRefId); -- Set up Row Level Security (RLS) -- See https://supabase.com/docs/guides/auth/row-level-security for more details. ALTER TABLE user_geo ENABLE ROW LEVEL SECURITY; CREATE POLICY "Public geo_location are viewable by everyone." ON user_geo FOR SELECT USING (TRUE); CREATE POLICY "Users can insert their own geo_location." ON user_geo FOR INSERT WITH CHECK (auth.uid() = userRefId); CREATE POLICY "Users can update own geo_location." ON user_geo FOR UPDATE USING (auth.uid() = userRefId); -- See https://supabase.com/docs/guides/auth/managing-user-data#using-triggers for more details. CREATE OR REPLACE FUNCTION public.handle_new_user() RETURNS TRIGGER AS $$ BEGIN INSERT INTO public.profiles ( id, updated_at, username, full_name, profile_image_url, bio, sex, ) VALUES ( NEW.id, NOW(), NEW.raw_user_meta_data->>'username', NEW.raw_user_meta_data->>'full_name', NEW.raw_user_meta_data->>'profile_image_url', NEW.raw_user_meta_data->>'bio', COALESCE(CAST(NEW.raw_user_meta_data->>'sex' AS SMALLINT), 0), ); INSERT INTO public.channeles (userRefId, channel, updated_at) VALUES (NEW.id, NEW.raw_user_meta_data->>'expoToken', NOW()); INSERT INTO public.user_geo (userRefId, location, updated_at) VALUES ( NEW.id, ST_Point(CAST(NEW.raw_user_meta_data->>'lat' AS FLOAT), CAST(NEW.raw_user_meta_data->>'lng' AS FLOAT)), NOW() ); RETURN NEW; END; $$ LANGUAGE plpgsql SECURITY DEFINER; CREATE TRIGGER on_auth_user_created AFTER INSERT ON auth.users FOR EACH ROW EXECUTE FUNCTION public.handle_new_user(); -- Set up Storage! INSERT INTO storage.buckets (id, name) VALUES ('profile_images', 'profile_images'); -- Set up access controls for storage. -- See https://supabase.com/docs/guides/storage#policy-examples for more details. CREATE POLICY "profile_image images are publicly accessible." ON storage.objects FOR SELECT USING (bucket_id = 'profile_images'); CREATE POLICY "Anyone can upload a profile_image." ON storage.objects FOR INSERT WITH CHECK (bucket_id = 'profile_images');
-
Supabase alternatives
For example the storage-api. I was on version supabase/storage-api:v0.29.1 for a long time, until I realized, that there is a new version of it (0.40.1). Fast forward, upgraded everything, checked my application and everything storage related stopped working. From now on it's always the same procedure. Debugging the errors, digging through the code on GitHub, checking commits, issues, etc. After a while I found a bug from 2019 which had exactly the same error as I, tested the workaround and it worked again (partially, workaround).
-
A Rounded Solution to Image Handling on the OpenSauced Dashboard
Alternatively, we could use imagemagick (cli tool for image transforms) + supabase storage to do the same for free.
-
AWS Amplify Is a Grift
[5] https://supabase.com/docs/guides/storage
-
Building a Startup from Scratch: My Mistakes as CTO
Storage
-
Any idea how to limit file upload size ?
We'll probably need to upload other types of assets in the future, so having a way to set the limit per bucket would be nice... There's an issue for this - I may make a PR to implement it at some point.
realtime
-
A Technical Dive into PostgreSQL's replication mechanisms
You can LISTEN/NOTIFY. Or you can use logical replication and a custom subscriber.[1] Supabase uses the latter.[2]
[1]: https://www.postgresql.org/docs/current/logical-replication....
[2]: https://github.com/supabase/realtime
-
Supabase Studio: AI Assistant and User Impersonation
Supabase Realtime is great for building collaborative applications. You can receive database changes over websockets, store and synchronize data about user presence, and broadcast any data to clients via "channels".
-
Unpacking Elixir: Observability
We use :telemetry to collect usage data per tenant for Supabase Realtime.
We do this for rate limiting but it also makes it very easy for us to attach a listener (https://github.com/supabase/realtime/blob/main/lib/realtime/...) which ships these (per second) aggregates to BigQuery (via Logflare), which then the billing team can aggregate further to display and actually bill people with.
-
All the ways to capture changes in Postgres
Yo :D This is what Supabase Realtime does!
https://github.com/supabase/realtime
Spin up a Supabase database and then subscribe to changes with WebSockets.
You can play with it here once you have a db: https://realtime.supabase.com/inspector/new
-
Supabase Local Dev: migrations, branching, and observability
Every project is a Postgres database, wrapped in a suite of tools like Auth, Storage, Edge Functions, Realtime and Vectors, and encompassed by API middleware and logs.
- Sync client state globally over WebSockets in Realtime
-
Writing a chat application in Django 4.2 using async StreamingHttpResponse
Where can I learn more about this? I've been thinking of trying to integrate Supabase Realtime (https://github.com/supabase/realtime) into my Django app (without the rest of Supabase), but I'd also like to keep things even simpler if possible.
Also, what was the reason not to go with Gevent?
- Supabase Realtime – Broadcast, Presence, and Postgres Changes via WebSockets
-
How to Listen to Database Changes Using Postgres Triggers in Elixir
I believe #2 was the main driver for the supabase team to build their real-time component: https://github.com/supabase/realtime
Background/announcement: https://supabase.com/blog/supabase-realtime-multiplayer-gene...
-
How To Kill A Fly With A Shotgun
As a minor note, one of the linked articles talks about having used RethinkDB for its changefeeds and I made a mental note a bit back that if I ever want that supabase's realtime ( https://github.com/supabase/realtime ) provides something rather like that atop Postgres and I should try that before doing anything clever.
What are some alternatives?
supabase - The open source Firebase alternative.
supabase-js - An isomorphic Javascript client for Supabase. Query your Supabase database, subscribe to realtime events, upload and download files, browse typescript examples, invoke postgres functions via rpc, invoke supabase edge functions, query pgvector.
debezium - Change data capture for a variety of databases. Please log issues at https://issues.redhat.com/browse/DBZ.
auth - A JWT based API for managing users and issuing JWT tokens
blockscout - Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
nextjs-auth0 - Next.js SDK for signing in with Auth0
Appwrite - Your backend, minus the hassle.
postgrest - REST API for any Postgres database
litestream - Streaming replication for SQLite.
fastify-multipart - Multipart support for Fastify
Hasura - Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.