About & Architecture
PgArachne™ serves as a lightweight, high-performance web server that sits between your HTTP clients and the PostgreSQL database. It eliminates the need for traditional backend languages (like Python, Node.js, or PHP) by mapping HTTP requests directly to database functions.
Core Technical Capabilities
- JSON-RPC 2.0 Gateway: All API interactions follow the strict JSON-RPC 2.0 specification. There are no REST endpoints to design; you simply call SQL functions by name via POST requests.
- Native DB Authentication: No separate user tables. Users log in with their actual PostgreSQL credentials to receive a JWT. Alternatively, service accounts can use persistent API Tokens.
- Role Masquerading: PgArachne™ connects as a proxy user but executes every
request using
SET LOCAL ROLEto switch to the authenticated user’s identity. Row-Level Security (RLS) works automatically. - Static File Server: PgArachne™ can serve static assets (HTML, JS, CSS), allowing you to host Single Page Applications (SPAs) or the Explorer tool directly.
- Real-time Notifications (SSE): Subscribe to PostgreSQL
NOTIFYchannels over SSE for live updates without polling.
This architecture dramatically simplifies the stack: Database ↔ PgArachne ↔ Frontend.
API Endpoint Format: All database functions are exposed at:
POST http://{server}:{port}
/api
/{database_name}
Method is specified in the JSON-RPC body.