Build better apps in a fraction of time

Gaudi is a declarative programming language and a backend framework that makes it easier to build and maintain web application APIs. Describe your models and APIs in a declarative way and instantly get your app with batteries included.

With Gaudi out of the box you get expressive data modeling, customizable APIs, automatic database migration and population, powerful declarative database query engine, full stack type-safety, client library generators and much more.

bookreviews.gaudi
model Author {
field name { type string }

relation books { from Book, through author }
query top_5_popular_books {
from books,
filter { review_score > 0 },
order by { count(review_score) },
limit 5
}
}

entrypoint Author {
response {
id,
name,
top_5_popular_books {
id,
title,
review_score
}
}

create endpoint {}
list endpoint {}
get endpoint {}
update endpoint {}
delete endpoint {}
}

What is Gaudi?

Gaudi is a declarative, domain specific and type-safe programming language that makes it easier to build and maintain web application backends. Write your backend using declarative language and focus on what needs to be done, instead of how. This approach allows Gaudi to understand the intention behind your code and lets it write optimized code and automate a lot of the work around it.

Let's see how it all works ...

Describe your models

Create a simple text file in your favorite IDE (eg. bookreviews.gaudi) and describe your data models and relationships between them using intuitive, human-readable and database agnostic language. Enrich your models through first-class support for computed fields, custom query relationships or even custom code hooks.

bookreviews.gaudi — bookreviews
model Author {
field name { type string }
relation books { from Book, through author }
computed books_count { count(books) }
query bestsellers { from books, filter { is_bestseller is true }}
}

model Book {
reference author { to Author }
field title { type string, validate { min 4, max 40 } }
field is_bestseller { type boolean, default false }
hook goodreads_rating {
source fetchRating from "./hooks/goodreads.js"
}
}

Query your data

Query your data using powerful, expressive and type-safe query language. Traverse, filter, slice and transform your data as needed and Gaudi will produce a custom query plan optimized for maximum performance.

bookreviews.gaudi — bookreviews
fetch as authors {
query {
from Author,
filter { count(books) > 0 },
order by { count(books) desc },
limit 20,
select {
name,
top_5_popular_books { title, review_score }
} } }

Expose your APIs

Expose your data through default CRUD endpoints with a single line of Gaudi code. Customize default behaviour or go beyond CRUD and write completely custom endpoints using full declarativeness and type-safety of Gaudi or even custom code hooks.

bookreviews.gaudi — bookreviews
entrypoint Author {
list endpoint {}

entrypoint books {

get endpoint {}
list endpoint {}
update endpoint {}
create endpoint {
authorize { @auth.id is not null }

action {
create as book {}
create book.reviews as review {
set is_positive true
set reviewer book.author
} } } } }

Build your app

Gaudi analyzes your code and automatically generates the optimized code and SQL queries laser-focused on your app's specific needs and runs it in a highly optimized web server environment with focus on performance and security. Your app automatically comes with things like logging, error handling, authorization and much more.

Run your code through Gaudi compiler and it will instantly build your app and you can run it, publish it or deploy it directly to your server. And that's it! :)

https://your.domain/api/authors
[
{
"id": 1920, "name": "Isaac Asimov",
"books": [
{ "id": 1950, "title": "I, Robot", "review_score": 31138 },
{ "id": 1985, "title": "Robots and Empire", "review_score": 2048 }
]
}
// ...
]

Tools that supercharge your development

Gaudi comes with a set of modern development tools that promote best practices aimed at improving your productivity and development experience.

Let's go through some of them ...

Faster project setup and development

Most of Gaudi's tools are easily available through Gaudi CLI. Whether you want to setup your next project, re/build your existing Gaudi project or start developing in development mode ... all available with one line of Gaudi CLI.

Terminal - user@gaudi:~/gaudi-project
user@gaudi:~/gaudi-project $ npx gaudi-cli gaudi-cli <command> [arguments] Commands: gaudi-cli build Build entire project. Compiles Gaudi blueprint, pushes changes to DB and copies files to output folder gaudi-cli dev Start project dev builder which rebuilds project on detected blueprint changes. gaudi-cli start Start Gaudi project gaudi-cli init Init new Gaudi project gaudi-cli db Executes a database command. Run 'gaudi-cli db' for more info.

Easy database migrations

Gaudi offers first-class database migration support both in development and in production.

Quickly iterate your ideas, add new or change existing models, run tests or even switch between Git branches with completely different database models ... Gaudi will make sure your database is always in sync with current model and populated with appropriate data.
No database hassle, just code!

Once satisfied with your changes, create migration scripts and apply them to your production at your own time and convenience.

Terminal - user@gaudi:~/gaudi-project
user@gaudi:~/gaudi-project $ npx gaudi-cli db -h gaudi-cli db <command> Executes a database command. Run 'gaudi-cli db' for more info. Commands: gaudi-cli db push Push model changes to development database gaudi-cli db reset Reset DB gaudi-cli db populate Reset DB and populate it using populator gaudi-cli db migrate Create DB migration file gaudi-cli db deploy Deploy migrations to production database

Type-safe APIs and client libraries

Gaudi automatically generates OpenAPI specifications and client libraries that are type-safe, self-documented and seamlessly integrate into your frontend app, another backend API, development tools or third party integrations.

create_book.ts
Gaudi API client screenshot

Ready to start your new Gaudi project?

Stay in touch! Don't miss Gaudi news and updates

No spam. No ads. Just Gaudi.