tutorial··5 min read·WoWSQL Team

Best Backend for React Apps in 2026 (No Server Needed)

Best backend for React in 2026: Firebase, Supabase, Appwrite, Convex and WoWSQL compared, plus a Vite walkthrough with login, CRUD and a realtime list.

The best backend for a React app in 2026 is usually a backend as a service (BaaS), so you can ship without writing or hosting an API server. The common picks are Firebase, Supabase, Appwrite and Convex; WoWSQL is the Postgres option with auth, an auto-generated REST API, realtime and storage at a flat $0 / $25 / $99 a month. Choose by data model first: documents (Firebase), TypeScript functions (Convex), or SQL tables you can query directly (Supabase, WoWSQL).

Below is an options table with each vendor's free tier, checked on its own pricing page on 21 November 2026, followed by a working Vite + React + TypeScript walkthrough: sign-up and login, create/read/update/delete (CRUD) on a todos table protected by Row Level Security, and a list that updates in realtime. The code compiles against @wowsql/sdk 3.10.0.

Key facts

  • SDK: @wowsql/sdk 3.10.0 on npm. ProjectAuthClient handles sign-up, login and sessions; new WowSQLClient({ projectUrl, apiKey }) gives you .table() queries and .realtime channels; WowSQLStorage handles buckets and files (TypeScript SDK docs).
  • API: PostgREST at https://<project>.wowsqlconnect.com/rest/v1. Send the anon key (wowsql_anon_…) in apikey and the signed-in user's access token in Authorization: Bearer … so RLS applies. The service key bypasses RLS and is server-only. There is no GraphQL API.
  • Realtime: wss://<project>.wowsqlconnect.com/realtime/v1/websocket?apikey=… with INSERT, UPDATE and DELETE events plus broadcast and presence. Enable a table first with POST /realtime/v1/enable. Payloads are capped at 64 KiB (realtime docs).
  • Auth: email and password, magic links, email or phone OTP, OAuth with 19 working providers, TOTP two-factor, optional Cloudflare Turnstile, and anonymous sign-in when enabled (auth docs).
  • Plans (pricing, checked 21 November 2026): Free $0 (1 project, 256 MB database, 512 MB files, 10,000 MAU), Pro $25/month, Scale $99/month. Regions: Mumbai, US East and Frankfurt.

React backend options compared

React only renders the UI. A "backend for React" has to supply four things the browser cannot do safely on its own: user accounts, a database with access rules, file storage, and an API. Each option below covers all four, in different ways.

Data model Free tier (as of Nov 2026) First paid tier Realtime Honest note
WoWSQL PostgreSQL tables + PostgREST $0: 1 project, 256 MB DB, 512 MB files, 5 GB bandwidth, 10,000 MAU Pro $25/month (10 GB DB, 100 GB files, 100,000 MAU) Postgres change events, broadcast, presence Smallest free database here; flat pricing; younger product, smaller community
Supabase PostgreSQL tables + PostgREST $0: 500 MB DB, 1 GB files, 5 GB egress, 50,000 MAU; paused after 1 week idle Pro $25/month plus compute (with $10 credit) Postgres changes, broadcast, presence Larger free tier and the biggest Postgres-BaaS ecosystem
Firebase Firestore documents Spark $0: 1 GiB stored, 50K reads/day, 20K writes/day, Auth to 50K MAU Blaze pay-as-you-go Live document listeners, offline cache Most mature client SDKs; not SQL
Appwrite Tables/documents (TablesDB by default) $0: 2 projects, 2 GB storage, 5 GB bandwidth, 75K MAU; paused after 1 week idle Start $10/month (100K MAU) or Pro $25/month (200K MAU) Realtime subscriptions Very generous MAU; also self-hostable
Convex Documents via TypeScript functions Free & Starter $0: 0.5 GB DB, 1 GB files, 1M function calls Professional $25 per developer/month Reactive queries by default Great DX for TypeScript-first teams; queries are functions, not SQL

Sources: WoWSQL pricing; Supabase pricing; Firebase pricing; Appwrite pricing; Convex pricing. Convex auth is via its own Convex Auth library or providers such as Clerk, Auth0 and WorkOS (Convex auth docs).

How to choose in one minute

  • You think in SQL, or will need joins, constraints and reporting later: Supabase or WoWSQL. Both expose PostgREST, so the REST query syntax (?select=*&status=eq.active) is the same idea on either.
  • Offline-first mobile or a document model: Firebase.
  • You want every query to be a reactive TypeScript function: Convex.
  • Biggest free user allowance: Appwrite (75K MAU) or Supabase and Firebase (50K).
  • Flat, predictable price with a region in Mumbai, US East or Frankfurt: WoWSQL. Its pricing page lists read-only mode when you go over a Free limit, not an inactivity pause.

If you are deciding between platforms more broadly, see What is backend as a service, Supabase vs Firebase and Free backend for your app. For auth-only services such as Clerk and Auth0, see Best auth as a service in 2026.

Walkthrough: a React todo app on WoWSQL

What you will build: a Vite + React + TypeScript app where users sign up, log in, see only their own todos, and watch the list update when a todo changes. No server code. Allow about 20 minutes.

Step 1: Create the project and table

  1. Create a project at app.wowsql.com/signup and choose Mumbai, US East or Frankfurt.
  2. Open Authentication and enable it (the setup asks for a JWT secret of at least 32 characters).
  3. Copy the project slug and the anon key (wowsql_anon_…) from Settings → API. Never put the service key (wowsql_service_…) in a React app.
  4. In the SQL editor, create the table and policies. This follows the pattern in the SDK connection guide and our row level security guide:
create table public.todos (
  id uuid primary key default gen_random_uuid(),
  user_id uuid not null,
  title text not null,
  done boolean not null default false,
  created_at timestamptz not null default now()
);

alter table public.todos enable row level security;

create policy "read own todos"   on public.todos for select using (auth.uid() = user_id);
create policy "insert own todos" on public.todos for insert with check (auth.uid() = user_id);
create policy "update own todos" on public.todos for update using (auth.uid() = user_id);
create policy "delete own todos" on public.todos for delete using (auth.uid() = user_id);

Without a select policy, an RLS-enabled table returns empty results to app users, so do not skip the first policy.

  1. Enable realtime for the table once (from a terminal):
curl -X POST 'https://myproject.wowsqlconnect.com/realtime/v1/enable' \
  -H "apikey: wowsql_anon_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"schema_name":"public","table_name":"todos"}'

Step 2: Create the React app and install the SDK

npm create vite@latest my-todos -- --template react-ts
cd my-todos
npm install @wowsql/sdk@3.10.0

Add .env.local (Vite exposes variables that start with VITE_):

VITE_WOWSQL_PROJECT=myproject
VITE_WOWSQL_ANON_KEY=wowsql_anon_your_key_here

When you run vite build, Vite prints a note that fs and path were "externalized for browser compatibility". Those come from the SDK's Node-only uploadFromPath helper and do not affect the browser code on this page.

Step 3: One file for the WoWSQL clients

src/wowsql.ts creates the auth client, a data client for public reads and realtime, and a small rest() helper that calls the REST API as the signed-in user.

import WowSQLClient, { ProjectAuthClient } from '@wowsql/sdk'

const PROJECT = import.meta.env.VITE_WOWSQL_PROJECT // e.g. "myproject"
const ANON_KEY = import.meta.env.VITE_WOWSQL_ANON_KEY // wowsql_anon_...
const BASE = `https://${PROJECT}.wowsqlconnect.com`

// Auth: sign-up, sign-in, sessions
export const auth = new ProjectAuthClient({ projectUrl: PROJECT, apiKey: ANON_KEY })

// Data client: runs as the anon role (public data) and opens the realtime socket
export const db = new WowSQLClient({ projectUrl: PROJECT, apiKey: ANON_KEY })

// Restore a saved session on page load
const saved = sessionStorage.getItem('wowsql_session')
if (saved) auth.setSession(JSON.parse(saved))

export function saveSession() {
  const { accessToken, refreshToken } = auth.getSession()
  if (accessToken && refreshToken) {
    sessionStorage.setItem('wowsql_session', JSON.stringify({ accessToken, refreshToken }))
  } else {
    sessionStorage.removeItem('wowsql_session')
  }
}

// REST call as the signed-in user, so Row Level Security applies
export async function rest(path: string, init: RequestInit = {}) {
  const { accessToken } = auth.getSession()
  const res = await fetch(`${BASE}/rest/v1/${path}`, {
    ...init,
    headers: {
      apikey: ANON_KEY,
      Authorization: `Bearer ${accessToken}`,
      'Content-Type': 'application/json',
      ...init.headers,
    },
  })
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
  return res.status === 204 ? null : res.json()
}

Why a fetch helper instead of db.table('todos')? In 3.10.0, WowSQLClient sends the API key you give it as both apikey and the bearer token, so its queries run as the anon role. That is right for public tables, but per-user rows need the user's access token in Authorization, which is exactly what the docs describe for authenticated requests. sessionStorage keeps the demo simple; use whatever session storage your app already trusts.

Step 4: Sign-up and login

src/Login.tsx:

import { useState } from 'react'
import { auth, saveSession } from './wowsql'

export function Login({ onLogin }: { onLogin: () => void }) {
  const [email, setEmail] = useState('')
  const [password, setPassword] = useState('')
  const [error, setError] = useState('')

  async function handle(mode: 'signup' | 'login') {
    setError('')
    try {
      const result =
        mode === 'signup'
          ? await auth.signUp({ email, password })
          : await auth.signIn({ email, password })
      if (result.requires2fa) {
        setError('This account has 2FA on — add a TOTP step (verifyTwoFactorLogin).')
        return
      }
      saveSession()
      onLogin()
    } catch (e) {
      setError(String(e))
    }
  }

  return (
    <div>
      <input value={email} onChange={(e) => setEmail(e.target.value)} placeholder="Email" />
      <input value={password} onChange={(e) => setPassword(e.target.value)} type="password" placeholder="Password" />
      <button onClick={() => handle('login')}>Sign in</button>
      <button onClick={() => handle('signup')}>Sign up</button>
      {error && <p>{error}</p>}
    </div>
  )
}

If your project requires email verification before login, signUp may not return a session until the user verifies; check the response and show a "check your inbox" message. Google, GitHub and the other OAuth providers use getOAuthAuthorizationUrl(provider, redirectUri), covered step by step in How to add login to your app.

Step 5: CRUD and a realtime list

src/Todos.tsx reads, adds, toggles and deletes todos through the REST API, then subscribes to changes:

import { useEffect, useState } from 'react'
import { db, rest } from './wowsql'

type Todo = { id: string; title: string; done: boolean; user_id: string }

export function Todos({ userId }: { userId: string }) {
  const [todos, setTodos] = useState<Todo[]>([])
  const [title, setTitle] = useState('')

  async function load() {
    setTodos(await rest('todos?select=*&order=created_at.desc'))
  }

  async function add() {
    await rest('todos', {
      method: 'POST',
      headers: { Prefer: 'return=representation' },
      body: JSON.stringify({ title, user_id: userId }),
    })
    setTitle('')
    load()
  }

  async function toggle(t: Todo) {
    await rest(`todos?id=eq.${t.id}`, { method: 'PATCH', body: JSON.stringify({ done: !t.done }) })
    load()
  }

  async function remove(t: Todo) {
    await rest(`todos?id=eq.${t.id}`, { method: 'DELETE' })
    load()
  }

  useEffect(() => {
    load()
    // Realtime: any change to todos → re-fetch through REST, where RLS decides what this user sees
    const channel = db.realtime.channel('todos-feed')
    channel.on('postgres_changes', { event: '*', schema: 'public', table: 'todos' }, () => load()).subscribe()
    return () => {
      channel.unsubscribe()
    }
  }, [])

  return (
    <div>
      <input value={title} onChange={(e) => setTitle(e.target.value)} placeholder="New todo" />
      <button onClick={add} disabled={!title}>Add</button>
      <ul>
        {todos.map((t) => (
          <li key={t.id}>
            <label>
              <input type="checkbox" checked={t.done} onChange={() => toggle(t)} /> {t.title}
            </label>
            <button onClick={() => remove(t)}>Delete</button>
          </li>
        ))}
      </ul>
    </div>
  )
}

Why re-fetch instead of using the event payload? The realtime socket authenticates with the API key in the URL (browsers cannot set WebSocket headers), not with the user's token, and the SDK notes that anyone who can connect may listen on the channels they join. Treating the event as a "something changed" signal and re-reading through REST keeps RLS in charge of what each user sees. For genuinely public data, such as a shared chat room, you can render payload.new directly.

Step 6: Wire it together

src/App.tsx:

import { useEffect, useState } from 'react'
import { auth, saveSession } from './wowsql'
import { Login } from './Login'
import { Todos } from './Todos'

export default function App() {
  const [userId, setUserId] = useState<string | null>(null)

  async function refreshUser() {
    try {
      const me = await auth.getUser() // GET /auth/v1/me with the stored token
      setUserId(me.id)
    } catch {
      setUserId(null)
    }
  }

  useEffect(() => {
    if (auth.getSession().accessToken) refreshUser()
  }, [])

  async function signOut() {
    await auth.logout()
    saveSession()
    setUserId(null)
  }

  if (!userId) return <Login onLogin={refreshUser} />
  return (
    <main>
      <button onClick={signOut}>Sign out</button>
      <Todos userId={userId} />
    </main>
  )
}

Run npm run dev, sign up, add a todo, and open a second tab signed in as the same user: changes in one tab appear in the other. Access tokens expire (24 hours by default, following the project's JWT expiry setting), so call auth.refreshSession() and saveSession() when a request returns 401.

Bonus: public data with the query builder

For tables the anon role may read, the SDK's query builder is shorter than fetch:

const res = await db.table('announcements')
  .select('*')
  .order('created_at', 'desc')
  .limit(5)
  .get()
console.log(res.data)

Give that table a select policy that allows public reads, and keep writes behind user policies.

What we verified

The SDK calls on this page (ProjectAuthClient, signUp, signIn, getUser, getSession, setSession, logout, refreshSession, WowSQLClient.table(), realtime.channel().on().subscribe()) appear in the TypeScript SDK docs for 3.10.0. We type-checked and built the components above with tsc and vite build against @wowsql/sdk@3.10.0 on 21 November 2026. We did not run them against a live project in this pass, so test on your own project before shipping.

Adding files and going further

FAQ

What is the best backend for a React app in 2026?

A backend as a service is the fastest route. Pick Firebase for documents and offline-first mobile, Convex for reactive TypeScript functions, Appwrite for a large free MAU allowance, and Supabase or WoWSQL for PostgreSQL with REST APIs and Row Level Security. WoWSQL's angle is a flat $0 / $25 / $99 price and regions in Mumbai, US East and Frankfurt.

How do I connect React to a database without a server?

Use a BaaS that exposes the database through an API with per-user rules. On WoWSQL, install @wowsql/sdk, sign the user in with ProjectAuthClient, and call https://<project>.wowsqlconnect.com/rest/v1/<table> with the anon key in apikey and the user's access token in Authorization. RLS policies in Postgres decide which rows each user can see.

What is a good Supabase alternative for React?

WoWSQL is the closest in shape: Postgres, PostgREST, RLS with auth.uid(), realtime and storage, at $0 / $25 / $99 flat. Supabase has a larger free tier and ecosystem. Appwrite and Firebase are alternatives if you do not need SQL.

What is a good Firebase alternative for React?

If you want SQL instead of Firestore documents, use a Postgres BaaS such as WoWSQL or Supabase. If you want to stay close to Firebase's developer experience but self-host, look at Appwrite. Convex suits teams who like Firebase's reactive feel but want TypeScript functions.

Is it safe to put the API key in a React app?

Only the anon key, and only when RLS is enabled with policies on every table the app touches. The anon key is designed for browsers; the service key bypasses RLS and must stay on a server. Realtime authenticates with the API key, so do not stream private rows to every client; re-fetch through REST instead.

Can I use WoWSQL for free with React?

Yes. The Free plan is $0 with 1 project, a 256 MB database, 512 MB of files and 10,000 monthly active users. Over a limit the project becomes read-only. Free has no platform backups, so export your own (pricing, checked 21 November 2026).

Create a free WoWSQL project · Pricing · TypeScript SDK docs