Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. REST
  3. postgrest

postgrest

MITHaskellv14.15

Automatically generates a standards-compliant RESTful API from any PostgreSQL database schema.

Visit WebsiteGitHubGitHub
27.5k stars1.2k forks0 contributors

What is postgrest?

PostgREST is a standalone web server that automatically generates a RESTful API from an existing PostgreSQL database. It reads the database schema and creates corresponding HTTP endpoints for tables, views, and stored procedures, eliminating the need for manual backend development. It solves the problem of building and maintaining custom API layers by providing a standards-compliant, high-performance interface directly from the database.

Target Audience

Backend developers, database administrators, and teams building applications with PostgreSQL who want to quickly expose a secure, performant API without writing boilerplate code. It's also suitable for projects prioritizing a single declarative source of truth for data and API logic.

Value Proposition

Developers choose PostgREST because it dramatically reduces development time by auto-generating a robust API, ensures data integrity through PostgreSQL constraints, and delivers exceptional performance via its Haskell foundation and efficient database communication. Its declarative approach centralizes security and business logic in the database, simplifying maintenance.

Overview

REST API for any Postgres database

Use Cases

Best For

  • Rapidly prototyping a backend API from an existing PostgreSQL database
  • Building microservices that require direct, secure database access
  • Creating internal tools or admin panels that need a ready-made API
  • Projects where data integrity and security are enforced at the database level
  • Teams wanting to avoid ORM overhead and manual CRUD endpoint coding
  • Generating self-documenting OpenAPI specs directly from database schema

Not Ideal For

  • Projects requiring integration with non-PostgreSQL databases or polyglot persistence layers
  • Applications with complex, stateful business logic that doesn't fit well into stored procedures or database views
  • Teams lacking in-depth PostgreSQL expertise for managing role-based permissions and JWT authentication setup

Pros & Cons

Pros

Automatic REST Endpoints

Generates CRUD endpoints for tables, views, and stored procedures without manual coding, eliminating boilerplate backend development as highlighted in the key features.

High Performance Architecture

Built in Haskell with the Warp HTTP server and uses PostgreSQL's binary protocol, delivering subsecond response times for up to 2000 requests/sec on Heroku free tier, per performance benchmarks.

Integrated Security Model

Handles authentication via JSON Web Tokens and delegates authorization to PostgreSQL's role-based permissions, creating a single declarative source of truth for security.

Self-Documenting API

Automatically generates OpenAPI-compliant documentation, allowing interactive exploration with tools like Swagger-UI directly from the database schema.

Cons

PostgreSQL Lock-In

Exclusively tied to PostgreSQL, making migration to other databases difficult and limiting use in environments requiring heterogeneous data sources.

Complex Debugging Overhead

Pushing business logic into the database can obscure errors in SQL rather than application code, increasing debugging complexity for developers unfamiliar with PostgreSQL.

Steep Initial Setup

Requires upfront configuration of JWT, database roles, and schema design, which can be a barrier for teams without PostgreSQL administration experience.

Frequently Asked Questions

Quick Stats

Stars27,472
Forks1,216
Contributors0
Open Issues339
Last commit10 hours ago
CreatedSince 2014

Tags

#haskell#database#rest#postgres#api#database-api#http#rest-api#server#postgrest#data-integrity#openapi#postgresql#jwt-authentication#automatic-api#backend#self-hosted#api-generation

Built With

H
Haskell
P
PostgreSQL
W
Warp
D
Docker

Links & Resources

Website

Included in

REST3.9k
Auto-fetched 2 hours ago

Related Projects

prestprest

PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new, MCP server

Stars4,599
Forks312
Last commit21 hours ago
MySQL HTTP pluginMySQL HTTP plugin

Simple REST-like / CRUD server for any MySQL database

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub