Search

Suggested keywords:
  • Java
  • Docker
  • Git
  • React
  • NextJs
  • Spring boot
  • Laravel

Supabase Released in-browser PostgreSQL with AI Assistance

  • Share this:

post-title

Supabase recently released posgtres.new an in-browser PostgreSQL with AI Assistance. With postgres.new, you can instantly spin up an unlimited number of Postgres databases that run directly in your browser. This Postgres database lives directly in your browser's IndexedDB storage and not in the cloud, so it is only accessible to you. There is no remote Postgres service available and all data will be stored locally inside browser.

posgtres.new is open source and its source is available in Github. It is released under Apache-2 license.

Below are posgtres.new tech stack

PGlite - Run a full Postgres database locally in WASM

Next.js - Primary web application built using NextJS

pg-gateway - Postgres wire protocol for the server-side 

Chart.js - To build charts

ChatGPT - Currently using GPT-4o for AI Assistance


posgtres.new authenticates using Github, Even though databases stored locally, the application has to connect to an API that runs the large language model. In order to prevent abuse, authentication is mandatory. 

AI does pretty much all the job related to database management. Any one can easily transform their excel data in to charts. posgtres.new has support to Generate and export reports, CSV import, Generate charts, Build database diagrams. 

Basically all database are PGLite database and it is paired with large language model. Database does not require any permission, AI has full access. 

We just tried few chat messages and it really works great in the browser.

 

AI Message: create student table

It creates below student table with few fields. We can also provide our own SQL statements or ask AI to create.

create table student (
  id bigint primary key generated always as identity,
  first_name text not null,
  last_name text not null,
  email text unique not null,
  date_of_birth date,
  enrollment_date date default current_date
);

 

AI Message: Add sample data to student table

AI inserts sample data to student table.

 

AI Message: show all records of student table

It displays the records added.

 

AI Message: show students born in the year 2000

It runs below SQL query and displays records of students who born on 2000.

select  * from student
where date_of_birth between '2000-01-01' and '2000-12-31'
limit 5;

 

AI Message: Group students by enrollment year and build chart

It runs below SQL query and displays the chart.

select 
  extract(year from enrollment_date) as enrollment_year,   
  count(*) as student_count 
from student 
group by enrollment_year 
order by enrollment_year;

Editorial Team

About author
This article is published by our editorial team.