Back to all articles

We build full-stack projects without writing back-end code

Artem Rudenko

Artem Rudenko

Software engineer, founder of ottofeller.com

Since the middle of 2019, we stopped writing back-end (server-side) code but we still deliver full-stack solutions. We produce the same value (and even more!) as we did with custom back-end coding, but without writing any back-end code at all. How is that possible?

One tool to rule them all

First of all, it's worth mentioning that all our projects use the GraphQL protocol to communicate with servers. We also stick with PostgreSQL as our primary database. Needless to say that from project to project we had to duplicate a lot of CRUD (Create Remove Update Delete) boilerplate code, or reuse some poorly coupled 3rd party, or self-written tools and libs.

Things changed after we started using Hasura. This tool is a standalone server that sits between an app and its database and provides a comprehensive GraphQL API to the database. Out of the box it gives CRUD to all the tables of the connected DB. No need to code anything. Just sync the DB with Hasura by a click of a button in the web UI and that's it! You get a GraphQL interface to your DB with select, update, and insert operations for all of your tables. Moreover, you get nested queries (with SQL joins under the hood), aggregation, and real-time subscription. Without writing a single line of code you get the things which would normally take weeks of work.

In addition to DB operations, Hasura has strict access restrictions mechanism. Its permissions framework allows creating multiple user roles and delegating different sets of permissions to each one of them. It is extremely comprehensive and makes it easy to describe even complex conditions. A single permission check may involve validating properties of multiple DB entities and can be called before data read, insert or update operation.

What if we still need a very custom back-end?

Even though Hasura's main goal is to reduce boilerplate code, writing custom code is still very possible. The CRUD replication saves you from writing many lines of code so you have more time and energy to write the custom functionalities that aren't predictable. Two major features that help make this possible are remote schemas and remote joins.

Remote schemas

Are a way for Hasura to work with multiple GraphQL APIs as if they were a single server. The diagram below demonstrates this idea.

Creating the CRUD boilerplate for a single database won't be enough for most applications as multiple data sources are common. This is where remote schemas come in. All you have to do is to pick as many URLs as you want in the dashboard and that's it — Hasura will merge all the separated GraphQL APIs into a single one!

https://hasura.io/docs/1.0/graphql/manual/remote-schemas/
https://hasura.io/docs/1.0/graphql/manual/remote-schemas/

Remote joins

Aims to merge different data sources, REST APIs, XML, RPC, SOAP, or others, in a response of a single GraphQL server. The diagram below visualizes how remote joins work.

One difficulty with modern web development is dealing with the number of potential data sources that must be integrated. Working with multiple 3rd party APIs, and getting data from them can be a pain. Remote joins aim to turn data integration into something enjoyable rather than something grinding. Whether it's data from users in Stripe, Facebook, or Linkedin, you'll be able to join them all in your Hasura API as if they came from one source.

https://hasura.io/blog/remote-joins-a-graphql-api-to-join-database-and-other-data-sources/
https://hasura.io/blog/remote-joins-a-graphql-api-to-join-database-and-other-data-sources/

You may have noticed a pattern. Using these features allows you to bring multiple data sources into a single API, the Hasura API. From custom code, to remote databases, to third-party APIs, to even SOAP endpoints, integrating custom code is no problem in Hasura projects.

These features are just the beginning as the Hasura project was funded by $10kk at the beginning of 2020. Thus, we should expect more and more to come soon. It is robust, rapidly evolves and has a vibrant community. It's worth trying it in your next project!

The future of code is no-code?

Developers are problem solvers and many of them have been solving the same problems for years. CRUD operations, database queries, and API creation. While building back-end software, engineers have been repeating the same code from project to project, and this is why Hasura has emerged. It encapsulates everything developers need on the server-side and simply delivers it in a shape of a pluggable service, no code needed!

So, is the future of code, no-code? This is a controversial topic with polarizing opinions. What Hasura has shown with tangible evidence is that back-end coding can be automated with great success. We no longer write back-end code, we simply use Hasura.


Other articles

Streaming real-time data into Snowflake using Kinesis Streams

Significant growth of a product’s user base always leads to challenges for data engineering teams. The volume of events produced by millions (or billions) of users makes it almost impossible to use standard solutions for ingestion as is. It’s always nuanced and adjusted for particular situation.

Gradual rollouts with AWS Lambda

Learn how to mitigate deployment risks using AWS Lambda's gradual rollout feature, enabling safer, incremental updates to your product's backend.