News & Announcements

Introducing the Netlify Frameworks API

Introducing the Netlify Frameworks API

At Netlify, we firmly believe that a diverse web is a stronger web. That is why we offer first-class support for a wide range of web development frameworks on our platform.

Today, we’re taking that commitment one step further by introducing the Netlify Frameworks API, which gives all frameworks full control over how the sites they generate are deployed to Netlify.

By empowering frameworks to provision the right platform primitives and configure them for optimal integration, we can offer a seamless integration with best-in-class developer experience.

A bit of history

Since its early days, Netlify has always pushed the envelope on developer experience and the ability to solve complex problems with very little effort. For example, dropping a JavaScript file in a specific sub-directory of your project and committing it to version control is all you need to create a backend for your application through a serverless function. Creating a redirects file gets you a powerful routing engine that works regardless of your technology stack.

All of these touchpoints have been carefully designed so that developers get the right level of control with as little setup as possible.

But our platform primitives have evolved and they gradually became the right building blocks for frameworks too. Numerous frameworks use Netlify Functions and Netlify Edge Functions to power their server-side rendering and middleware capabilities, for instance.

At this point, both developers and their frameworks were consumers of these primitives, and we quickly learned that there was no interface that was a perfect fit for both. We don’t want any configurations generated by the framework interfering with what the developer authors or any generated artifacts polluting the project directory.

Over time, we’ve introduced in an ad hoc manner separate configuration interfaces for frameworks to provision things like Edge Functions and Blobs. With the Frameworks API, we’ve revisited those interfaces with a holistic frameworks-specific perspective to consolidate and optimize the experience for framework authors. The capabilities of those interfaces, as well as some new ones, are now available under a cohesive set of API endpoints, clearly documented and versioned, built with and for framework authors.

Power to the adapters

Most open-source frameworks have support for multiple hosting providers through the concept of adapters, like Remix, Astro, Nuxt, Svelte Kit, and Gatsby. You can think of adapters as the dongles you use to connect your electronic devices: on one side you plug in the framework core and the other end connects to whatever platform you want to deploy the site to.

If you decide to move to a different hosting provider, you can just swap the adapter without having to touch how your site is implemented. If you choose a provider for which your framework of choice has no adapter, you and your team can build your own. That’s the beauty of open source.

We really believe in this model, as we think it fosters interoperability across frameworks and providers. It also gives developers vendor independence.

For that reason, we feel it’s our responsibility to make it as simple as possible for anyone to create a framework adapter for Netlify, and the Frameworks API was designed from the ground up with that goal.

The API

The filesystem is the API. As part of the build command, frameworks can provision and configure primitives by writing files to specific directories with well-defined formats, which Netlify then reads and processes further to create a deployment. There are no client libraries that framework authors need to integrate and update.

Consistency and familiarity are also key aspects of the Frameworks API. If you’re already familiar with the Netlify platform and its primitives as a developer, you’ll be able to use them through the Frameworks API very easily, because the concepts, conventions, and syntax are as identical as possible.

Finally, the API is fully versioned, so that older versions of a framework can continue to work while new functionality is added to the platform. Maintaining an open-source project is hard, and while we’re excited for framework authors to use the latest and greatest of Netlify, we want them to update their implementations in their own schedule.

Try it out today

The Frameworks API is available today. It’s already used by the Netlify adapter for Astro, and being implemented by other frameworks.

If you’re an author or collaborator of a framework, or you’re interested in this space, let’s chat! This API was built for you and we’d love to work with you on making it better.

Refer to the documentation to learn more about the API.

Keep reading

Recent posts

How do the best dev and marketing teams work together?