January 2024 Summaries
12 posts from Supabase
Filter
Month:
Year:
Post Summaries
Back to Blog
FerretDB is an open source document database that provides MongoDB compatibility to other database backends like Postgres and SQLite. It allows developers to use familiar MongoDB features, syntax, and commands for various use cases. In this guide, we covered running FerretDB locally via Docker, testing the connection with mongosh and the MongoDB Node.js client, and deploying it to Fly.io for a production-ready setup. We also discussed how to insert documents into FerretDB, update document records, inspect JSONB data in the Supabase Dashboard, and deploy to Fly.io. Overall, FerretDB offers flexibility by enabling MongoDB workloads on Postgres and SQLite, allowing developers to avoid vendor lock-in while maintaining control over their data architecture.
Jan 31, 2024
619 words in the original blog post.
The latest release of pgvector (0.6.0) introduces significant improvements in HNSW index building speed. Parallel builds for HNSW indexes have made the process up to 30 times faster, particularly for unlogged tables. This enhancement is expected to improve search accuracy and performance while tuning HNSW build parameters. The benchmark results show that the new version can build an index for a million vectors in just 9.5 minutes, compared to over an hour with the previous version. Additionally, using unlogged tables can further reduce building time by up to 31 times.
Jan 30, 2024
644 words in the original blog post.
Supabase offers a robust platform for integrating a full Postgres database with Ruby on Rails applications, leveraging the built-in Postgres adapter that Rails provides. This guide walks through the process of creating a new Rails project, connecting it to a Supabase Postgres database, and interacting with it via the Rails Console. It highlights the benefits of Supabase as a cost-effective alternative to Heroku Postgres, complete with a migration tool for easy transition. The setup involves creating a Rails project with a Postgres database using Supabase, configuring the connection details, and utilizing Rails' Active Record for database migration and interaction. Additionally, it covers deploying the application using Fly.io, including provisioning and setting the database connection string as a secret environment variable. The post concludes by emphasizing Supabase's stability and the range of extensions it offers, encouraging users to explore its capabilities for their Rails applications.
Jan 29, 2024
586 words in the original blog post.
In this tutorial, we will create a collaborative design canvas using Flutter and Supabase. We will learn how to implement real-time communication between multiple clients using the Broadcast feature of Supabase Realtime, and how to broadcast the shape and cursor data to other connected clients in real-time. The app will allow users to draw shapes and move those shapes around while keeping the states in sync with other users.
To create this collaborative design canvas, we will follow these steps:
1. Set up a new Flutter project
2. Create the data models for UserCursor and CanvasObject
3. Implement a custom painter to draw objects on the canvas
4. Initialize the Supabase client and set up real-time listeners
5. Create the canvas page with all necessary widgets and methods
6. Run the application
By following these steps, you will learn how to create a collaborative design app using Flutter and Supabase Realtime Broadcast feature.
Jan 26, 2024
3,849 words in the original blog post.
The Postgres extension `pg_graphql` reads the SQL schema in a database and exposes it as a GraphQL schema through a SQL function `graphql.resolve(...)`. The GraphQL interface is made available to any programming language without requiring additional servers, processes, or libraries. When a client sends a GraphQL request to `pg_graphql`, it gets parsed into an abstract syntax tree (AST) using the `graphql-parser` crate. The AST is then validated against the reflected GraphQL schema to ensure its correctness and executed by transpiling it into SQL. pg_graphql uses caching and memoization to optimize performance, and it provides a JSON response to the client after executing the query. Understanding how `pg_graphql` works internally can help developers make informed decisions about using GraphQL APIs and contribute to its development.
Jan 24, 2024
1,992 words in the original blog post.
Supabase provides a robust platform with a full Postgres database, making it an excellent choice for Laravel PHP applications due to Laravel's built-in Postgres adapter. The process involves creating a new Laravel application from scratch, setting up user authentication using the Laravel Breeze starter kit, and connecting it to the Supabase Postgres database. Supabase is highlighted as a strong free alternative to Heroku Postgres, with tools available for easy migration. Users are advised to update their PHP and Composer versions before scaffolding a new Laravel project and to secure their database credentials when setting up the Supabase project. Additionally, adjustments in the schema settings and running database migrations are necessary steps to align the Laravel application with Supabase's configurations. The guide emphasizes the utility and ease of using Supabase for managing Postgres databases alongside Laravel's authentication and user management features.
Jan 22, 2024
419 words in the original blog post.
SAML is a protocol that simplifies the complex process of verifying identities across different platforms by allowing organizations to centralize employee data using identity providers, which can then authenticate with service providers. SAML uses XML format to store encrypted data related to authenticated users and requires both parties to exchange public keys for verification. While SAML is often confused with Single Sign-On (SSO), the two are distinct concepts where SSO is a broader approach to simplifying user experiences across multiple systems, whereas SAML specifically addresses secure data exchange for authentication. The process of setting up SAML involves exchanging information between identity providers and service providers, including X.509 certificates, Entity IDs, URLs, and attribute mappings. This can be achieved through the use of SAML Metadata XML documents, which expose much but not all of this information. By combining SAML with Row-Level Security (RLS), organizations can gain fine-grained control over data access while improving security and meeting regulatory requirements.
Jan 17, 2024
1,537 words in the original blog post.
TanStack Query (React Query) is an open-source state management library for React applications. It handles caching, background updates, and stale data out of the box with zero configuration, making it ideal to use with Supabase-js and auto-generated REST APIs. The article provides a step-by-step guide on how to integrate TanStack Query with Next.js, including creating a React Query client, generating TypeScript types for database schema, creating Supabase clients for both client and server components, automating query key management with Supabase Cache Helpers, and writing reusable queries. The conclusion emphasizes that using React Query with Server Components makes sense in specific scenarios, such as migrating to Server Components without rewriting data fetching or needing a familiar programming paradigm while benefiting from Server Components.
Jan 12, 2024
922 words in the original blog post.
AWS is set to start charging for IPv4 addresses on February 1st, 2024, with a cost of $0.005 per hour, which translates to around $4 per month. This change will likely have a significant impact on infrastructure companies that rely heavily on AWS, such as Supabase, which may need to implement workarounds or switch to IPv6 to avoid increased costs. The main challenge in adopting IPv6 is ISP support, with many ISPs not currently supporting the protocol, and this lack of support can lead to difficulties in resolving domain names and connecting to servers. Additionally, developer tools such as Docker require significant changes to support IPv6, making it a complex process for companies to adopt the new protocol. To mitigate these issues, Supabase is offering three solutions for its customers, including a paid add-on for IPv4 addresses and support from the company itself.
Jan 12, 2024
863 words in the original blog post.
Elixir's libcluster provides a powerful feature that allows multiple nodes to communicate between them without extra services in the middle, reducing overall system complexity. However, connecting servers can be challenging due to name discovery. To address this, Supabase has released its approach by open-sourcing libcluster Postgres Strategy. This strategy uses Postgres' event system to facilitate connection and communication between Elixir nodes. By utilizing Postgres, Supabase aims to be cloud-agnostic and accessible for self-hosting options. The strategy involves sending a NOTIFY message to a channel with the node's address, listening for new messages, and connecting to the node received in the payload. A heartbeat is also configured to enable libcluster to heal the cluster if needed.
Jan 09, 2024
693 words in the original blog post.
Launch Week X concluded with the release of numerous updates and features by Supabase. Day 1 saw a major update to Supabase Studio, emphasizing SQL-first approach and user-centric development. On Day 2, Edge Functions gained native npm modules and Node built-in APIs support. Day 3 introduced Supabase Branching, allowing separate database instances for each feature of an application. Supabase Auth received new features on Day 4, including Identity Linking, Session Control, Leaked Password Protection, and Auth Hooks with Postgres functions. Day 5 marked the introduction of Read Replicas, useful for serving data closer to users or distributing loads across multiple databases. The Launch Week X Hackathon saw a record number of submissions, with Supafork winning Best Overall project. Additional updates included Fly Postgres, Supabase Libraries V2, Supavisor 1.0, Postgres Language Server, and more. Community highlights featured tutorials, articles, podcasts, and videos related to Supabase. The company is hiring for various positions.
Jan 05, 2024
559 words in the original blog post.
The Launch Week X Hackathon winners have been announced, with Supafork by @0xChroxify winning Best Overall Project. Other notable projects include fastify-supabase by @psteinroe for Best Use of AI and Supabase CLI for Visual Studio Code by @anas_araid for Most Technically Impressive. The winners will receive a Launch Week X Keyboard, while runners-up will be awarded a limited edition swag kit.
Jan 04, 2024
525 words in the original blog post.