Explore Gaudi features

Explore Gaudi features in more details

Data modeling on steroids

Define your models and extend them with queries, computed values or assign custom data using hooks

bookreviews.gaudi — bookreviews
model Author {
field name { type string }
relation books { from Book, through author }
query books_count { from books, count }
}

model Book {
reference author { to Author }
field title { type string, validate { min 4, max 40 } }
}

Data models

Describe your data models and relations using intuitive, human-readable and database agnostic language

bookreviews.gaudi — bookreviews
model BookReading {
reference book { to Book }
reference author { to Author }
field pages_read { type integer }

computed pages_total { book.pages }
computed pages_left { pages_total - pages_read }
}

Expression fields

Extend your models using powerful and expressive expression language with type-safe support for models, fields and relations

bookreviews.gaudi — bookreviews
query top_5_popular_books {
from books,
filter { review_score > 0 },
order by { positive_reviews_count desc },
limit 5
}

Query fields

Use the full power of query language to query your model's relations and create dynamic query fields. Use query fields in other query selects nad filters just as any other field.

bookreviews.gaudi — bookreviews
hook nameAndDesc {
arg test query {
select { name, description }
}
inline "test.name + ': ' + test.description"
}

Custom hook properties

If Gaudi queries and expressions are not enough you can even write your properties using custom code hooks.

Application with batteries included

Write customizable and secure APIs and seamlessly integrate with other parts of your or third-party stack

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

get endpoint {}
update endpoint {}
// delete endpoint {} // eg. NO delete endpoint
}

CRUD API

Expose only CRUD APIs that you actually need. With a single line of Gaudi

bookreviews.gaudi — bookreviews
entrypoint books {
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
}
} } }

Custom API

CRUD is not always enough. Extend default or write custom APIs using Gaudi or even custom hooks code.

bookreviews.gaudi — bookreviews
auth {
method basic {}
}
api {
entrypoint Author {
authorize {
@auth.id is not null and @auth.name is "Asimov"
}
}
}

Authentication

Secure your application using authentication and authorization rules that fully support Gaudi expression langugage. Support for local auth, social, OAuth 2.0, ...

create_book.ts
Gaudi client library screenshot

Client library

Build client library from your APIs with a few lines of Gaudi code and get type-safe integration with your or third-party libraries.

https://your.domain/api-docs/#
OpenAPI screenshot

OpenAPI

Build an OpenAPI specification from your APIs and seamlessly integrate with any OpenaAPI compliant client.

Supercharge your development

Gaudi brings a set of modern development tools that promote best practices and enhance productivity.

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.

CLI

Use Gaudi CLI commands to run and/or automate your project's actions

demo-project.gaudi
Gaudi project init screenshot

New project init

Initialize your next project in no-time and get completely setup Gaudi project ready for development.

Terminal - user@gaudi:~/gaudi-project
user@gaudi:~/gaudi-project $ npx gaudi-cli build Building entire project ... Compiling Gaudi blueprint ... Starting command: node --enable-source-maps --stack-trace-limit=30 --stack-size=2048 node_modules/@gaudi/engine/engine.js Pushing DB change ... Copying static resources ...

Compiler

Gaudi compiler analyzes your code and writes best possible code and SQL queries tailored specifically for your app.

Terminal - user@gaudi:~/gaudi-project
user@gaudi:~/gaudi-project $ npx gaudi-cli dev Starting project dev build ... Starting Gaudi project ... ~/gaudi/demo-project Compiling Gaudi blueprint ... Starting command: node --enable-source-maps --stack-trace-limit=30 --stack-size=2048 node_modules/@gaudi/engine/engine.js Pushing DB change ... Copying static resources ... Starting command: node_modules/@gaudi/engine/node_modules/.bin/nodemon --enable-source-maps --stack-trace-limit=30 --stack-size=2048 --watch false node_modules/@gaudi/runtime/runtime.js [nodemon] starting `node --enable-source-maps --stack-trace-limit=30 --stack-size=2048 node_modules/@gaudi/runtime/runtime.js` App is started on localhost:3001

Development mode

Development mode gives you automatic code rebuild, application restart, database sync, ... and many more tasks that allow you to concentrate on your ideas.

demo-project.gaudi
Gaudi IDE extension screenshot

IDE extension

Gaudi syntax checking, highlighting and error reporting in your VSCode IDE.

bookreviews.gaudi — bookreviews
Database migrations

Database migrations

Iterate your ideas during development and automatically sync your database. Once happy with your changes, create migration scripts, review them and apply to your production when ready.

bookreviews.gaudi — bookreviews
Database populator

Database populator

Need a small set of data for development, a strict set of data for tests or a large amount of randomized data for application demo? Use populators to always have your database populated with appropriate data.

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

No spam. No ads. Just Gaudi.