Skip to main content

Praxis

Meaner. Better. Faster. Stronger.

Praxis is a light and extensible Ruby framework that allows you to design and create powerful, consistent and preformant REST APIs at unprecedented development speed

Truthful & Beautiful Docs

Automatically generate Open API 3.x documents from the actual functioning code, and rest assured they're always correct.

GraphQL Flexibility, REST Simplicity

Allow customers to specify which fields they want to receive using the GraphQL syntax, but exposing them through well known REST endpoints.

Fast Runtime, Blazing Fast Development

Deploy your API using one of the best Ruby performing frameworks and take advantage of an unprecedented development speed.

API Design-First Philosophy

Craft and visualize your API design upfont, without writing a single line of code. Forget about implementing API validations, the framework fully takes care of it from your design specs.

Feature Rich and Fully Customizable

Take advantage of best practices, proven methods, standards and features that the frameworks comes with, or pick and choose only the ones you want to enable.

Hardnened & Battle Tested

Rest assured you'll get the advertised results as this framework has been deployed in production environments since before 2014.

Build APIs with clean and powerful querying capabilities
# For example, retrieve the list of users that:
# - have their Date Of Birth(dob) later than Jan 1st, 2000
# - paginated in groups of 50 by email order(from start)
# - sort results by ascending email, then descending dob
# - return only their id, email, dob and friend collection
# - with each friend only returning their name and phone
$ curl 'http://localhost:9292/api/users' -G \
--data - urlencode "filters=dob>2000-01-01" \
--data - urlencode "pagination=by=email,items=50" \
--data - urlencode "order=email,-dob" \
--data - urlencode "fields=id,email,dob,friends{name,phone}" \
[
{
"id": 33,
"email": "koolcat@example.com",
"dob": "2005-05-05",
"fiends": [
{ "name": "Mr. Mouse", phone: "555-1234" },
{ "name": "Duck", phone: "555-2222" },
]
},
{
"id": 1,
"email": "loosemoose@example.co,",
"dob": "2009-01-15",
"fiends": [
{ "name": "Chicken", phone: "555-9999" }
]
},
...
The implementation of the example above requires literally no controller code, or manual crafting of DB queries to be written, when several of the add-ons have been enabled.

With batteries included

  • Automatic enforcement of your API design
  • Automatic generation of Open API 3.x docs
  • Built-in GraphQL-style field selection
  • Integrated pagination and ordering
  • Seamless and consistent filtering of results
  • Smart, autogenerated and predictable DB queries
  • Fast runtime results with Ruby's readibility
  • Built atop of Rack, and based on standards
  • Fully configurable, include only features you need
  • Embeddable with Rails, to reuse your existing code
  • Fast and flexible routing, API versioning, etc...
  • API design separate from implementation details
  • and the list goes on...
$ gem install praxis
$ praxis example myapi && cd myapi
$ rackup -p 9292
And access the API from another terminal or using your favorite tool:
$ curl http://localhost:9292/something/here

How can I get all this?

Glad you asked! Get the Praxis gem, maybe start by generating and playing with a simple pre-canned example app, and read the official documentation.

Frequently Asked Questions

Can I use it in my existing Rails App?

You Bet! For already existing ruby apps like Rails, you can embed it seamlessly as a Praxis middleware, and take advantage of sharing any existing models and business logic that you have written. It is the perfect way to quickly build an API for your already existing app.

Is it GraphQL compatible?

Not exactly, a Praxis app will not act as a full GraphQL server as it is still a RESTful API. However, any listing action can natively support the normal GraphQL syntax for defining which fields and nested subresource fields to return within a single API call. In other words, it supports one of the most desired and used features of GraphQL itself, while still enjoying the many advantages and simplicity of a RESTful design.