TiloBox
Back to directory
Nhost project preview

Nhost

The Open Source Firebase Alternative with GraphQL, PostgreSQL, and Serverless Functions.

LicenseMIT
GitHub stars9.3k
Last commit1 weeks ago
Tags6 topics
HasuraServerlessSelf HostedGraphqlBaasPostgresql
Overview

Why consider Nhost?

Nhost is an open-source BaaS platform providing PostgreSQL, instant GraphQL APIs (Hasura), authentication, storage, and serverless Node.js/Go functions.

Guided learning

Learn Nhost by building

Practical setup notes, real use cases, and copy-ready examples in one focused guide.

3 min read 11 sections
In this guide11 sections

What is Nhost?

Nhost is an open-source Backend as a Service (BaaS) and developer platform built on top of PostgreSQL, Hasura GraphQL Engine, and Node.js. Positioned as the "GraphQL alternative to Firebase and Supabase," Nhost provides everything developers need to build, scale, and host modern full-stack web and mobile applications.

Nhost integrates a PostgreSQL database, an instant real-time GraphQL API with auto-generated queries, mutations, and subscriptions via Hasura, a complete user authentication service with social logins, S3-compatible file storage with image transformations, and serverless functions runtime.

Who Is It For?

  • GraphQL & React Developers: Building modern web applications with typed GraphQL schemas (Apollo Client, URQL, TanStack Query).
  • Mobile & Full-Stack Developers: Developing Flutter, React Native, or Next.js applications requiring real-time WebSocket subscriptions.
  • Startups: Bootstrapping scalable backend architectures with production PostgreSQL databases without infrastructure management overhead.

Key Features

  • Instant real-time GraphQL API generated automatically from PostgreSQL tables and relationships via Hasura.
  • Integrated authentication service with support for passwordless magic links, SMS OTP, OAuth (Google, GitHub, Apple), and MFA.
  • S3-compatible asset storage with on-the-fly image transformations and granular permission rules.
  • Serverless Functions runtime for executing custom TypeScript, JavaScript, and Go backend code.
  • Official client SDKs for React, Next.js, Vue, Svelte, and Flutter.

Local Development with Nhost CLI

Install the official Nhost CLI to run a full local backend stack on your development machine:

bash
1# Install Nhost CLI
2npm install -g nhost
3
4# Initialize a new Nhost project
5nhost init
6
7# Start the full local BaaS stack (Postgres, Hasura, Auth, Storage, Functions)
8nhost up

Once started, access the local developer dashboard at http://localhost:13374 and the GraphQL endpoint at http://localhost:13374/v1/graphql.

Client Integration Example (Next.js & React)

tsx
1import { NhostClient, NhostProvider, useAuthenticated } from '@nhost/react';
2
3const nhost = new NhostClient({
4 subdomain: 'localhost:13374',
5 region: ''
6});
7
8function App() {
9 return (
10 <NhostProvider nhost={nhost}>
11 <UserProfile />
12 </NhostProvider>
13 );
14}
15
16function UserProfile() {
17 const isAuthenticated = useAuthenticated();
18 return (
19 <div>
20 {isAuthenticated ? <p>Welcome back!</p> : <p>Please log in.</p>}
21 </div>
22 );
23}

Practical Use Cases

1. Real-Time Chat & Collaborative Application

A development team builds a real-time messaging application using Nhost GraphQL subscriptions; new messages stream to connected web and mobile clients instantly over WebSockets.

2. Serverless E-Commerce Backend

A Next.js storefront uses Nhost for customer authentication and product catalogs, utilizing Nhost Serverless Functions to handle Stripe checkout webhooks and invoice generation.

3. Mobile Social Media Platform

A mobile engineer connects a Flutter app to Nhost, managing user profiles, image uploads with automated thumbnails, and database permissions using PostgreSQL row-level security.

Troubleshooting and Limitations

  • Hasura Console Metadata Sync: When modifying database tables via SQL migrations, ensure Hasura metadata is tracked and exported using the Nhost CLI (nhost hasura metadata export).
  • Function Runtime Isolation: Nhost serverless functions run inside isolated Node.js/Go runtimes; ensure all required third-party npm packages are included in your project's functions/package.json.

Official Resources

Related tools

More options with a similar category or technology profile.

Nhost FAQs

Nhost is listed as a Developer Tools tool on TiloBox. Review the overview, features, and official documentation on this page to decide whether it solves your specific workflow.

Start with the project's GitHub repository and official website for supported installation and deployment instructions. Test the setup with representative data or a small project before rolling it out more widely.

Nhost is listed under the MIT license. Read the complete license text and the project's notices before using, modifying, or distributing the software.

Production readiness depends on your requirements. Review maintenance activity, security practices, documentation, backup and upgrade procedures, and compatibility with your stack; then validate it in a non-production environment.

Nhost is listed as an alternative to Supabase. Compare the core workflow, deployment model, integrations, and licensing against your must-have requirements before switching.