Skip to main content

Introduction

NextBase is an open-source backend for Next.js. It runs inside your app and gives it a Postgres database, authentication, access rules and a REST API, with a typed client SDK for the browser, server components and server actions. Whether you are building a blog, a team workspace or a SaaS product, there is no separate backend to deploy, host or keep in sync, so you can focus on your app instead of its plumbing.

warning

NextBase is in early development and not recommended for production yet. Until version 1.0, releases may change the API and the database layout, and upgrading may need manual steps described in the changelog.

Features​

NextBase aims to be everything an app needs from a backend, without leaving Next.js. It provides the essentials out of the box, from your data and who may access it to signing users in. Here are some of the features:

CollectionsTables you define at runtime, with typed fields, validation, relations and indexes, stored in Postgres.
REST APIList, filter, sort, paginate, expand relations, create, update and delete, for every collection.
Access rulesWho may list, view, create, update or delete, per collection, in a small filter language.
AuthenticationEmail and password sign-in, database-backed sessions you can revoke, and superusers.
Server componentsRead the signed-in user and their data on the server, through an HttpOnly session cookie.
Typed client SDKOne SDK for the browser and the server, with safe filters and typed errors.

Documentation​

Whether you learn by reading or by doing, start where it suits you: