Introducing Feathers 4: A framework for real-time apps and REST APIs

David Luecke
The Feathers Flightpath
5 min readAug 27, 2019

--

Today I’m happy to share the release of Feathers 4 (Crow), a framework for real-time applications and REST APIs with JavaScript and TypeScript. 🐦 🎉

The crow has landed. Photo by Kasturi Roy on Unsplash

First of all, a huge thank you to all contributors, beta testers and our sponsors and backers on OpenCollective 🙇. Having some funds available allowed us to give Feathers a new look and put in the extra time to make this version more than just a feature release.

Join the v4 launch party

Coding Garden with CJ is hosting an official v4 online launch party on Tuesday, August 27th 2019 at 6pm PDT. CJ and I will be walking through what Feathers is about, what‘s new in version 4 and answer any questions. You can submit questions at any time before or during the stream at the Feathers Q&A and watch the party here:

So what is Feathers anyway?

Feathers is a web-framework for creating real-time applications and REST APIs using JavaScript or TypeScript with Node.JS, React Native and the browser. It works with any backend supporting many databases out of the box and with any frontend technology like React, VueJS, Angular, Android or iOS.

Feathers acts as the API layer between any frontend and any backend

Feathers takes a different approach to both, traditional MVC frameworks like Rails, Sails or NestJS and low level HTTP frameworks like Sinatra, Express (with which Feathers is fully compatible), Hapi or Koa. Instead of creating routes, controllers or HTTP request and response handlers, Feathers uses services and workflows (hooks) that let you focus on your application logic independently from how it is being accessed.

This makes applications easier to understand and test and allows Feathers to automatically provide REST APIs, websocket real-time APIs (which can often be quite a bit faster) and universal usage on the client and the server. It also makes it possible to add new communication protocols (like HTTP2 or GraphQL) without having to change anything in your application code. Feathers does all that while staying lightweight with a small API surface and codebase, and flexible by letting you use it with the backend and frontend technology that best suits your needs. You can read more about the high level concepts behind Feathers in design patterns for modern web APIs. The full migration guide and new feature overview can be found here.

The highlights of this release are:

📔 TypeScript friendly

The core libraries and database adapters come with TypeScript definitions built in. You can create a TypeScript Feathers application with the CLI and the guide and API documentation examples come in both, JavaScript and TypeScript. Of course you can still use everything with good old JavaScript as well.

🔐 Authentication friendly

Feathers v4 comes with a new, framework-independent authentication mechanism that is more flexible and easier to use. It supports username/password, token (JWT) and oAuth (Facebook, Google, Twitter etc.) authentication and also features

  • Protocol independent, fully customizable authentication strategies
  • An extensible authentication service that can register strategies and create authentication tokens (JWT by default but pluggable into anything else)
  • oAuth (Facebook, Google, Twitter etc.) authentication powered by Grant which supports 180+ providers with no additional setup. It now also has account linking and cross-domain oAuth authentication built in.
  • A new authentication client with many usability improvements and seamless websocket authentication

👥 User friendly

We got a snazzy new homepage and documentation powered by Vuepress. The Feathers guide is more concise while still teaching all the important things about Feathers. You get to create your first REST API and real-time web-application in less than 15 minutes and a complete chat application with a REST and websocket API, a web frontend, unit tests, user registration and GitHub login in under two hours.

The Feathers chat application

The database adapters come with new features and security updates and there have been a lot of other small improvements when it comes to using Feathers overall.

🚀 Future friendly

It has been almost five years since the release of Feathers 1.0 and it is great to see that the basic concepts have held up very well, especially in the sometimes chaotic world of web development. New language features and developments are helping make Feathers better and more mature while keeping the upgrade process as painless as possible.

In the spirit of other minimalist libraries like Express or Koa, Feathers tries to do a few things well and allow an ecosystem to grow around it so most new features coming up will be plugins or add-ons to the Feathers core. Often it is not even necessary to wait for a final version release since everything is pluggable and can be upgraded independently. There are already some interesting features and ideas lined up for the next version, Feathers v5:

  • A new Koa-style middleware/hook system that can be used on any asynchronous JavaScript and TypeScript method
  • The new authentication system now makes it easily possible to add new transport adapters. A KoaJS framework integration and a native high-performance HTTP and HTTP2 adapter are already under development.
  • Basic GraphQL integration with Feathers is the same as with any Express application since for Feathers GraphQL is just another transport mechanism (with the advantage that you can use the Feathers application in resolvers directly). There are also some very interesting things that can be done by combining REST, which is actually intended as an architecture pattern not a specific protocol for defining schemas or querying data, with GraphQL. More about that soon.

If you want to learn more about Feathers check out the docs and some of our other articles in our Medium publication.

Feel free to ask questions or drop by just to say hello on the Feathers Twitter or our Slack group. We’re really friendly and would love to hear what you think about Feathers.

--

--