A blazing-fast GraphQL API layer for PostgreSQL, powering the Vibetype event community platform.
This is a production-ready PostGraphile v5 server that automatically generates a powerful GraphQL API directly from your PostgreSQL schema. It's a core service of the Vibetype platform, seamlessly converting database changes into a secure, performant GraphQL interface.
- π Auto-Generated GraphQL API: Full CRUD operations from your PostgreSQL schema
- π PostGIS Support: Built-in geospatial capabilities with
@graphile/postgis - π JWT Authentication: ES256 ECDSA-signed tokens with claim-based authorization
- β‘ Grafast Optimizations: Deep SQL query optimization and N+1 prevention
- π¨ Amber Preset: Sensible defaults for a modern development experience
- π¦ TypeScript Ready: Full type safety from database to API
- π³ Docker Native: Containerized with automatic pnpm setup
Node.js, PostgreSQL with Vibetype schema migrations applied via sqitch, and pnpm.
pnpm install # Install dependencies
pnpm run lint # Lint code
# Docker
docker build -t maevsi/postgraphile .This service is part of the Vibetype platform, an event community ecosystem:
βββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (Nuxt) β
ββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β GraphQL
ββββββββββββββββΌβββββββββββββββββββββββββββββββ
β GraphQL API (PostGraphile) β
ββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β SQL queries and mutations
ββββββββββββββββΌβββββββββββββββββββββββββββββββ
β Database (PostgreSQL) β
ββββββββββββββββ²βββββββββββββββββββββββββββββββ
β SQL schema
ββββββββββββββββ΄βββββββββββββββββββββββββββββββ
β Migrations (Sqitch) β
βββββββββββββββββββββββββββββββββββββββββββββββ
See maevsi/stack for the full Docker setup.
src/
βββ graphile.config.ts # Main PostGraphile configuration
βββ graphile.ts # Scripted logic
βββ environment.ts # Type-safe environment utilities
Authentication uses ES256 (ECDSA) for signing JWTs; tokens use postgraphile as both issuer and audience and are represented in PostgreSQL by the composite type vibetype.jwt.
The signing keys and related secrets are best configured via environment variables in maevsi/stack.
The included docker-entrypoint.sh automatically:
- Loads environment variables from
/run/environment-variables(Docker secrets) - Installs dependencies in development mode
- Passes control to the
postgraphilecommand
- π PostGraphile Documentation
- πΊοΈ PostGIS Reference
- π PostgreSQL Docs
- πͺ Vibetype Platform
- ποΈ Full Stack (Docker Compose)
Questions or Issues? Open an issue, we're here to help!