Hasura by far, lets you point-and-click build your database and table relationships with a web dashboard and autogenerates a full GraphQL CRUD API with permissions you can configure and JWT/webhook auth baked-in.
https://hasura.io/ I've been able to build in a weekend no-code what would've taken my team weeks or months to build by hand, even with something as productive as Rails. It automates the boring stuff and you just have to write single endpoints for custom business logic, like "send a welcome email on sign-up" or "process a payment". It has a database viewer, but it's not the core of the product, so I use Forest Admin to autogenerate an Admin Dashboard that non-technical team members can use: https://www.forestadmin.com/ With these two, you can point-and-click make 80% of a SaaS product in almost no time. I wrote a tutorial on how to integrate Hasura + Forest Admin, for anyone interested: http://hasura-forest-admin.surge.sh For interacting with Hasura from a client, you can autogenerate fully-typed & documented query components in your framework of choice using GraphQL Code Generator: https://graphql-code-generator.com/ Then I usually throw Metabase in there as a self-hosted Business Intelligence platform for non-technical people to use as well, and PostHog for analytics: https://www.metabase.com/ https://posthog.com/ All of these all Docker Containers, so you can have them running locally or deployed in minutes. This stack is absurdly powerful and productive.
I can't agree more about Hasura, I made the jump to GraphQL for my current application and it's been a dream. Their documentation is excellent, helping me get setup with auth0 jwt auth and apollo client despite being new to both.
Metabase was a game changer in my last company, it was so nice to just be able to drop a 50+ line custom SQL query in there with parameters and let users pull what they want. We'd also setup queries to be loaded via Google Sheets cron jobs. That enabled live dashboards most any spreadsheet user could create (pivot, lookups, transforms, etc.).
For Dev and Staging, I use a Postgres Docker container, in Production I use a managed Postgres service.
I have a starter kit that includes a ton of stuff including pre-made JWT auth configured as Hasura Actions, a standard monolith-style Node REST API skeleton, and OpenFaaS serverless handler examples in every major language (Node, Python, Ruby, Java, Go, C#, PHP) you can find here: https://github.com/GavinRay97/hasura-ultimate-starter And really comprehensive docs about setup and architecture + how everything works here: http://hasura-ultimate-starter.surge.sh/#/
Appreciate the kind words! I just wanted to share these tools because I feel they're undervalued and underused, and I reach for them for every new project I start.
So hasura just exposes a Postgres database through GraphQL?
That sounds kinda nifty, but does it then allow you to write custom code to add business logic? Glancing through the documentation, that part wasn't clear to me.
That's one of the most common misconceptions about Hasura.
While it CAN expose an existing Postgres database, where it really shines (in my opinion) is when you're starting a brand new product. Because you can create your whole database and all the relationships, foreign-keys, triggers, permissions, etc through the web console UI incredibly rapidly. And yeah, it takes care of all CRUD and provides an aggregation/statistics API (sum, median, standard deviation, count, mean, variance, etc), and it leaves the pieces of custom business logic up to you to write. It's entirely agnostic to what you use to write these, so long as they expose an HTTP endpoint.
I really want to like Hasura, but very quickly you'll run into limitations of its permission system. Especially when dealing with logic across relationships.
If only Hasura supported some king of Prolog / Datalog instead of their ad-hoc JSON language, then you'd be able to write nearly any possible use cases. Until then, I'll stick to building and maintaining my own backends... manually :(
Sorry, I'm a bit new to GraphQL. Can you explain why this is more existing than starting a brand new product using plain PostgreSQL?
Can you also explain how locked in you are, if you decide you want to migrate away from Hasura, or in general want more flexibility that the use-case of Hasura + ForestryAdmin?
> does it then allow you to write custom code to add business logic
Yes! Like gavinray said, you can create HTTP services in any language of your choice. Hasura can then be configured to call HTTP endpoints when something changes in the DB. And your services can call Hasura anytime of course. Remember that Hasura handles all the authorization for you, so there's no need to "proxy" requests made to it. You end up writing very little compared to traditional frameworks.
This is similar to what we're doing! Hasura + AutoCRUD framework + Metabase is a great stack for putting together a solid business application in no time.
Hey man, really cool to see you comment here! We've chatted in the Hasura Discord briefly, love your work with the React Admin adapter. RA requires more manual work to set up and the aesthetics are different (Material UI), but it also gives you more flexibility.
For anyone looking for a self-hosted solution that can be more easily whitelabeled, highly recommend cpursley's work. You should pop by the server chat more often =D
I've taken your stack one step further, with a completely dockerised solution that uses Firebase as an authentication solution (authentication is missing from the current low-code example). It can be run locally or on a cloud provider that runs containers (e.g. GCP Compute Create-With-Container). See here: https://github.com/dvasdekis/react-admin-hasura-firebase/
This is awesome. I haven't had time to expand react-admin-low-code, so glad to see someone take the general idea and run with it. I'll update the Readme to mention your repo when I have a chance.
What we're doing in our production version of this is using Postgres and Hasura for auth following this approach in order to reduce external dependencies: https://github.com/sander-io/hasura-jwt-auth It's really amazing how far you can get with just Postgres. Writing business logic with code in application middleware always felt hacky to me when we have these powerful and performant relation databases.
Whatever you like. Depending on the nature of your work, you may be a startup or working for an organization that has mockups and design assets for what your frontend needs to look like.
In that case, you'd just build the front-end as usual, but use Hasura to bang out your whole backend and then autogenerate the type-safe query components with graphql-code-generator. When I do products myself, I typically pick a pre-made template/UI kit (Vue is my preference) and then just modify it from there to suit my needs. TailwindUI also looks really nice and I've seen several people build beautiful looking UI's with it for smaller SaaS products in a few days (though given that they're familiar with TailwindCSS and have a knack for this type of thing already): https://tailwindui.com/ https://tailwindcss.com/ Hasura also has a lot of community examples for different front-ends. Ranging from web apps in React/Vue/Angular/Elm to mobile clients in Flutter or Android/iOS: https://hasura.io/learn/ They have several dozen example apps built in all sorts of tech here: https://github.com/hasura/graphql-engine/blob/master/communi...
What are you using for your authentication adapter? I've been looking at picking up hasura but don't like the idea of using something like Auth0. So I've been hunting on the best tool for auth.
https://hasura.io/
I've been able to build in a weekend no-code what would've taken my team weeks or months to build by hand, even with something as productive as Rails. It automates the boring stuff and you just have to write single endpoints for custom business logic, like "send a welcome email on sign-up" or "process a payment".
It has a database viewer, but it's not the core of the product, so I use Forest Admin to autogenerate an Admin Dashboard that non-technical team members can use:
https://www.forestadmin.com/
With these two, you can point-and-click make 80% of a SaaS product in almost no time.
I wrote a tutorial on how to integrate Hasura + Forest Admin, for anyone interested:
http://hasura-forest-admin.surge.sh
For interacting with Hasura from a client, you can autogenerate fully-typed & documented query components in your framework of choice using GraphQL Code Generator:
https://graphql-code-generator.com/
Then I usually throw Metabase in there as a self-hosted Business Intelligence platform for non-technical people to use as well, and PostHog for analytics:
https://www.metabase.com/
https://posthog.com/
All of these all Docker Containers, so you can have them running locally or deployed in minutes.
This stack is absurdly powerful and productive.
Metabase was a game changer in my last company, it was so nice to just be able to drop a 50+ line custom SQL query in there with parameters and let users pull what they want. We'd also setup queries to be loaded via Google Sheets cron jobs. That enabled live dashboards most any spreadsheet user could create (pivot, lookups, transforms, etc.).
I have a starter kit that includes a ton of stuff including pre-made JWT auth configured as Hasura Actions, a standard monolith-style Node REST API skeleton, and OpenFaaS serverless handler examples in every major language (Node, Python, Ruby, Java, Go, C#, PHP) you can find here:
https://github.com/GavinRay97/hasura-ultimate-starter
And really comprehensive docs about setup and architecture + how everything works here:
http://hasura-ultimate-starter.surge.sh/#/
That sounds kinda nifty, but does it then allow you to write custom code to add business logic? Glancing through the documentation, that part wasn't clear to me.
While it CAN expose an existing Postgres database, where it really shines (in my opinion) is when you're starting a brand new product. Because you can create your whole database and all the relationships, foreign-keys, triggers, permissions, etc through the web console UI incredibly rapidly.
And yeah, it takes care of all CRUD and provides an aggregation/statistics API (sum, median, standard deviation, count, mean, variance, etc), and it leaves the pieces of custom business logic up to you to write. It's entirely agnostic to what you use to write these, so long as they expose an HTTP endpoint.
If only Hasura supported some king of Prolog / Datalog instead of their ad-hoc JSON language, then you'd be able to write nearly any possible use cases. Until then, I'll stick to building and maintaining my own backends... manually :(
Continue this thread — 6 replies
Can you also explain how locked in you are, if you decide you want to migrate away from Hasura, or in general want more flexibility that the use-case of Hasura + ForestryAdmin?
Continue this thread — 5 replies
Yes! Like gavinray said, you can create HTTP services in any language of your choice. Hasura can then be configured to call HTTP endpoints when something changes in the DB. And your services can call Hasura anytime of course.
Remember that Hasura handles all the authorization for you, so there's no need to "proxy" requests made to it.
You end up writing very little compared to traditional frameworks.
Combine Hasura (automatic GraphQL on top of PostgreSQL) with React Admin (low code CRUD apps similar to Forest) and you can build an entire back office admin suite or form app (API endpoints and admin front end) in a matter of hours.
This adaptor connects react-admin with Hasura: https://github.com/Steams/ra-data-hasura-graphql
Here's a reference application I put together: https://github.com/cpursley/react-admin-low-code
And we're taking a step further and using Elixir to listen to Postgres table changes for an "Event" style architecture: https://medium.com/hackernoon/get-notified-of-user-signups-a...
For anyone looking for a self-hosted solution that can be more easily whitelabeled, highly recommend cpursley's work.
You should pop by the server chat more often =D
Thanks to gavinray also for the help with this!
What we're doing in our production version of this is using Postgres and Hasura for auth following this approach in order to reduce external dependencies: https://github.com/sander-io/hasura-jwt-auth
It's really amazing how far you can get with just Postgres. Writing business logic with code in application middleware always felt hacky to me when we have these powerful and performant relation databases.
Continue this thread — 2 replies
Continue this thread — 1 reply
In that case, you'd just build the front-end as usual, but use Hasura to bang out your whole backend and then autogenerate the type-safe query components with graphql-code-generator.
When I do products myself, I typically pick a pre-made template/UI kit (Vue is my preference) and then just modify it from there to suit my needs.
TailwindUI also looks really nice and I've seen several people build beautiful looking UI's with it for smaller SaaS products in a few days (though given that they're familiar with TailwindCSS and have a knack for this type of thing already):
https://tailwindui.com/
https://tailwindcss.com/
Hasura also has a lot of community examples for different front-ends. Ranging from web apps in React/Vue/Angular/Elm to mobile clients in Flutter or Android/iOS:
https://hasura.io/learn/
They have several dozen example apps built in all sorts of tech here:
https://github.com/hasura/graphql-engine/blob/master/communi...
Continue this thread — 4 replies
Continue this thread — 12 more replies