Build web apps on top of a PostgreSQL database

Connect WeWeb to PostgreSQL to read, write, and manage structured data.

Table of Contents
Start building today with WeWeb!
Build your first application in no time!

Query, insert, update, and delete data

You can query, insert, update, and delete data from your frontend while keeping full control over schema, relationships, and business logic:

  • Connect WeWeb to an existing PostgreSQL database
  • Read and write data using SQL-based queries
  • Work with relational data, joins, and constraints
  • Power dynamic pages, forms, and data tables
  • Combine PostgreSQL with your existing backend or API layer
  • Scale your app without changing your data foundation

What WeWeb supports natively

Category Feature What it does
Data sources SQL plugin for Postgres Connects WeWeb to a PostgreSQL server so you can run raw SQL queries.
Data sources Supabase plugin Provides CRUD and RPC actions on a managed Postgres database without writing SQL.
CRUD actions Select / Insert / Update / Delete / Upsert Runs standard database operations from workflows and collections.
Functions Call a Postgres function Executes stored procedures and returns their results.
Collections Table-backed collections Uses tables or views as data sources for lists and grids.
Joins & views Postgres views and joins Handles complex joins in the database and exposes them like tables.
Data binding Bind data to UI Binds query results to UI elements like lists, inputs, and charts.
Security RLS and auth Respects Supabase Row Level Security and authentication rules.

Why use WeWeb with PostgreSQL

You keep PostgreSQL as your source of truth, while WeWeb handles how data is displayed, edited, and interacted with.

Perfect for:

  • Admin dashboards backed by PostgreSQL
  • Internal tools for managing structured business data
  • Customer portals with relational data models
  • SaaS products with complex schemas and permissions
  • Reporting and analytics interfaces on top of PostgreSQL

And more…

Integrating PostgreSQL with WeWeb

Integrating PostgreSQL with WeWeb is straightforward:

  1. Open your project in the WeWeb Dashboard
  2. Add a PostgreSQL data source
  3. Configure your database connection
  4. Define queries and map results to your UI

Learn more about WeWeb x PostgreSQL integration

Best practices 

  • Use parameterized queries to avoid security issues
  • Limit exposed queries to what your app actually needs
  • Manage permissions at the database or API layer
  • For complex logic, consider pairing PostgreSQL with a backend service

FAQs

1. What’s the recommended way to use PostgreSQL with WeWeb?

While you can connect directly with the SQL data source, most teams use Supabase as a managed Postgres layer, then connect WeWeb to Supabase via its native plugin.​ This gives you built‑in auth, Row Level Security, and no‑code CRUD/RPC actions while keeping raw SQL and security rules in the backend.

2. How do I query Postgres tables from WeWeb using Supabase?

Create a collection or workflow action using the Supabase “Database | Select” action and point it at the desired table or view. You can apply filters, ordering, and limits in the action config, and then bind the resulting rows to repeaters, data grids, or other elements.

3. Can I call Postgres functions (stored procedures) from WeWeb?

Yes, Supabase exposes Postgres functions as RPC endpoints, and WeWeb has a “Call a Postgres function” workflow action for them. You pass parameters from variables, run the function, and capture its return value in a variable for use in the UI or subsequent logic.

4. How do security and Row Level Security (RLS) interact with WeWeb?

RLS policies defined in Supabase apply to all Postgres queries made from WeWeb, including selects and function calls. You must explicitly allow access in RLS for the roles/tokens used by WeWeb, or queries will fail or return no rows.

5. When would I use the generic SQL data source directly with PostgreSQL?

Direct SQL connections are mainly used for internal tools, trusted environments, or quick prototypes where exposing SQL from the client is acceptable. For public apps, consider hiding Postgres behind Supabase or a custom API because of security, IP allow‑listing, and query‑exposure risks.

6. Can I mix Postgres data with other backends inside WeWeb?

Yes, Postgres/Supabase collections can be combined with other collections (REST, Xano, etc.) using WeWeb’s “joining data” and formula tools. This allows patterns like enriching Postgres rows with external API data or joining across multiple sources before rendering dashboards.

Start building for free

Sign up now, pay when you're ready to publish.