PostgREST/postgrest — reverse-engineered prompt
Reverse engineered prompt
Build me a server I can point at an existing PostgreSQL database and have it automatically expose a clean REST API without me hand writing endpoints. I want it to read the database schema and make tables and views available over HTTP with sensible JSON responses, filtering, pagination, inserts, updates, deletes, and proper status codes.
Please make security work in a database first way. It should support JWT authentication and use the current database role or permissions so access control stays defined in Postgres, not duplicated in app code. I also want versioning through database schemas, and an automatically generated OpenAPI description so the API can document itself.
Make it fast, stateless, and suitable to run as a standalone service or in Docker. Include a simple config file, a command line entry point with a help command, and a small example showing it connected to a sample Postgres database. Add enough tests and docs so someone can install it, run it, and understand the main workflow. Look up current docs online if you need to.
Want more depth? Deep Reverse