Skip to content

errilaz/grimo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grimo

Postgres-first data framework

⚠️ Under heavy construction, pre-alpha state! ⚠️

⚠️ Working directly on master branch - I will break it! ⚠️

  • Automatically build an API from your database schema and use it directly on the front-end.
  • Stop writing boilerplate HTTP endpoints. Your database has tables, views, and functions.
  • Stop using ORMs, micro-ORMs, & mappers. Your database has types.
  • Stop writing authentication & authorization middleware. Your database has row-level security.
  • A relational database is a great place for "business logic".

Similar Projects

These are much more mature, consider them instead!

Most of these libraries are meant for server-side DB access. Grimo is focused on eliminating the server-side as much as possible (similar to Supabase).

Roadmap

Basic features

  • Schema discovery
  • Strongly typed API generator
  • SELECT and function query builder
  • OpenAPI document generation
  • Example project
  • Tests

Basic SQL operations (@grimo/db-transport)

  • Select queries
  • Inserts
  • Updates
  • Deletes
  • Function calls

Query Builder (@grimo/api-client)

  • Selects
  • Inserts
  • Updates
  • Deletes
  • Function calls
  • Support native Date, BigInt in generated types & queries, convert in/out of transports
  • Joins
  • DISTINCT
  • COUNT
  • GROUP BY
  • Properly type views with updatable/insertable
  • Strongly typed .where values

Schema Discovery & Metadata

  • Tables
  • Views
  • Functions
  • Composite types
  • Enums
  • Domains
  • Primary keys
  • Foreign keys
  • pg_tagged_unions support
  • Binary data types

Middleware

  • middleware-express
  • middleware-koa
  • middleware-hattip
  • middleware-fastify
  • middleware-bun
  • middleware-elysia
  • middleware-hono

Transports

  • transport-web
  • transport-db (partial)
  • transport-supabase (experimental)

Backlog

  • Investigate decoupling from pg-promise - unsure about deno support. postgres supports all three runtimes but does not provide necessary standalone escaping/formatting
  • generate-rescript package
  • Reusable authentication & authorization
  • Realtime streams
  • Tooling/guidance on schema diffing migrations
  • Investigate making a stand-alone server package
  • build-schema package for simple conventional concat/config of .sql files

About

Postgres-first data framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published