Skip to content
/ Veloxide Public template

A template for building easy to maintain, secure and reliable web APIs in Rust

License

Notifications You must be signed in to change notification settings

quickflows-io/Veloxide

Repository files navigation

Veloxide


Veloxide simplifies the web API development process, letting you focus on delivering value to your consumers. With Veloxide, you can enjoy a modern, easy-to-use, and fast technology stack that can be integrated with your business logic.

Its key qualities are:

  • Fast to code: Veloxide increases the speed of development by being simple, flexible and easy to use. Rust naturally shifts bugs left to the compiler, so less time is spent debugging code, and more time is spent delivering value.
  • Fewer bugs: All components of Veloxide are written in Rust, which is known for its safety and reliability [1] [2] [3]
  • Highly performant: Veloxide is built on top of the Tokio async runtime and Axum framework, which leverage the power of Rust's async/await syntax and zero-cost abstractions to give blazingly fast bare-metal performance.
  • Cloud native: Veloxide comes pre-configured with OpenTelemetry for distributed tracing and a /metrics endpoint preconfigured for collection from Prometheus.
  • Standards-based: Veloxide leverages the open standards for APIs: OpenAPI, JSON Schema and GraphQL. You choose how you want your API to be consumed.

Design Patterns

Veloxide comes pre-configured with the following design patterns to support maintainability and flexibility:

  • CQRS: Veloxide uses Command Query Responsibility Segregation (CQRS) to help simplify and optimize the design by separating the read (view) and write (command) models.
  • Event Sourcing: Veloxide uses Event Sourcing to persist domain events to the database. Event sourcing is used to tie the read and write models together, as well as providing a complete and accurate audit trail of changes made to a system, which can be useful for debugging, compliance, and various other purposes.
  • Layered Architecture: The codebase is divided into layers, each with a specific responsibility, as per the principles of Domain-Driven Design. This makes the application more modular, as well as easier to understand and maintain.

Getting started

Install the pre-requisites:

Install the Veloxide CLI:

> cargo install veloxide

Create your own app:

> veloxide init my-app

# Go to the created folder
> cd my-app

# Install the required tools for development
> just install-required

# Set the environment to use the Postgres config, start the supporting containers, and then run the app
> just dev-postgres

# Once done, open `my-app/` in your IDE

# Happy Coding!
  • The OpenAPI interactive documentation will be accessible at http://localhost:8080/swagger-ui/
  • The GraphQL Playground will be accessible at http://localhost:8080/graphql
  • There is a postman-collection that supports both the REST and GraphQL APIs for you to import
  • Additional helper commands can be shown by running just in the root directory.

User guide

The complete guide to Veloxide is accessible at guide.veloxide.org.

Contributors

About

A template for building easy to maintain, secure and reliable web APIs in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published