Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Database Tools
  3. PostgREST

PostgREST

MITHaskellv14.15

PostgREST instantly generates a RESTful API from any PostgreSQL database, providing a standards-compliant and performant alternative to custom backends.

Visit WebsiteGitHubGitHub
27.5k stars1.2k forks0 contributors

What is PostgREST?

PostgREST is a standalone web server that automatically turns any PostgreSQL database into a RESTful API. It eliminates manual backend development by providing CRUD operations, authentication, and authorization directly through the database, ensuring a clean, fast, and secure API layer that leverages PostgreSQL's capabilities.

Target Audience

Backend developers and teams building APIs for PostgreSQL-based applications who want to minimize custom server code and leverage database-centric architecture.

Value Proposition

Developers choose PostgREST for its ability to automatically generate a fully RESTful API from PostgreSQL schemas, reducing development time and ensuring data integrity by making the database the single source of truth for data, business logic, and security.

Overview

REST API for any Postgres database

Use Cases

Best For

  • Rapidly prototyping or building APIs for PostgreSQL databases without writing custom backend code.
  • Creating secure, self-documenting REST APIs that automatically reflect database schema changes.
  • Implementing role-based authentication and authorization directly at the database level using PostgreSQL permissions.
  • Ensuring high-performance API responses with subsecond latency, leveraging efficient connection pooling and the Warp HTTP server.
  • Maintaining data integrity across applications by relying on PostgreSQL's declarative constraints rather than application-layer validation.
  • Versioning APIs through database schemas to allow backward-compatible changes via views and tables.

Not Ideal For

  • Applications requiring complex, stateful business logic outside the database (e.g., real-time processing or external integrations that can't be handled via SQL)
  • Teams needing GraphQL, WebSocket, or other non-REST API protocols, as PostgREST only generates RESTful endpoints
  • Projects where database-agnostic architecture is critical, due to tight coupling with PostgreSQL

Pros & Cons

Pros

Instant REST API Generation

Automatically creates REST endpoints for all tables and views with built-in filtering, sorting, and pagination, eliminating manual backend coding as highlighted in the README under 'Instant REST API'.

High Performance Architecture

Built in Haskell with the Warp HTTP server and efficient connection pooling via Hasql, enabling subsecond response times for up to 2000 requests/sec, as benchmarked in the Performance section.

Integrated Security Model

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

Automatic OpenAPI Documentation

Generates OpenAPI specifications for self-documenting APIs, allowing interactive exploration with tools like Swagger-UI, as mentioned in the Self-documentation part of the README.

Cons

PostgreSQL Lock-in

Tightly coupled with PostgreSQL; migrating to another database system would require a complete rewrite of the API layer and business logic embedded in the database.

Limited API Customization

Auto-generated endpoints may not cover all use cases, and creating custom endpoints or complex business logic often requires database workarounds like views or stored procedures, which can be cumbersome.

Steep Learning Curve

Requires deep PostgreSQL expertise for roles, permissions, and constraints to implement security and logic effectively, posing a barrier for teams accustomed to application-layer development.

Frequently Asked Questions

Quick Stats

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

Tags

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

Built With

H
Haskell
P
PostgreSQL
W
Warp
D
Docker

Links & Resources

Website

Included in

PostgreSQL11.8kDatabase Tools5.1k
Auto-fetched 3 hours ago

Related Projects

Hasura GraphQL EngineHasura GraphQL Engine

Blazing fast, instant realtime GraphQL APIs on all your data with fine grained access control, also trigger webhooks on database events.

Stars32,042
Forks2,931
Last commit9 hours ago
PrismaPrisma

💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]

Stars16,384
Forks839
Last commit3 years ago
PostGraphilePostGraphile

🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!

Stars12,935
Forks620
Last commit1 day ago
DatasetteDatasette

An open source multi-tool for exploring and publishing data

Stars11,302
Forks885
Last commit9 days ago
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