You need a backend if your app has user accounts, shares data between people, keeps data across devices, takes payments, or sends notifications. If none of those apply, you can ship a frontend-only app. If some do, you usually don't need to write a backend: a backend as a service (BaaS) such as WoWSQL, Supabase or Firebase gives you the database, login and APIs ready-made, and you only write server code for the parts that must stay secret.
Below is a five-question test you can answer in a minute, the three paths that follow from it, and a worked example of the middle path. Vendor facts were checked on each vendor's own pages on 22 November 2026.
Key facts
- The test: accounts, shared data, data across devices, payments, push or email notifications. Any "yes" means some backend; payments and secret API keys mean some server-side code.
- WoWSQL plans (pricing, checked 22 November 2026): Free $0 (1 project, 256 MB database, 512 MB files, 10,000 monthly active users); Pro $25/month (dedicated Postgres, 10 GB database, 100,000 MAU, daily backups kept 7 days, Edge Functions); Scale $99/month.
- WoWSQL auth (auth docs): email and password, magic links, email or phone OTP, OAuth with 19 working providers, TOTP two-factor, Cloudflare Turnstile, and anonymous sign-in when enabled (TypeScript SDK).
- WoWSQL API: an auto-generated REST API (PostgREST) at
https://<project>.wowsqlconnect.com/rest/v1. The anon key goes in theapikeyheader; a signed-in user's token goes inAuthorization: Bearerso Row Level Security applies. No GraphQL API.- Regions: Mumbai (
ap-south-1), US East (us-east-1), Frankfurt (eu-central-1).
The five-question test
Answer yes or no for the app you want to ship in the next three months, not the one you imagine in three years.
| # | Question | If yes, you need… |
|---|---|---|
| 1 | Do people sign in? | An auth service that issues tokens and stores passwords safely |
| 2 | Do people see data created by other people (a feed, a shared board, a marketplace)? | A shared database with rules about who can read and write what |
| 3 | Must data follow the user to another phone, browser or laptop? | Cloud storage for their data, tied to their account |
| 4 | Do you take payments or call APIs with secret keys (Stripe, OpenAI, an SMS provider)? | Server-side code the user can't read or modify |
| 5 | Do you send push notifications, emails or scheduled jobs? | Something that runs when the app is closed |
All five "no": you don't need a backend. A calculator, a single-player game, a static portfolio, a tool that keeps data on the device or exports a file all work frontend-only.
Only 1–3 "yes": you need a backend, but you can almost certainly get it from a BaaS without writing server code. Auth, a database with access rules, and storage are exactly what these services package.
4 or 5 "yes": you need at least a little server-side code. That can be serverless functions on your BaaS, a small API you host, or both. The secret key for Stripe or an AI provider must never ship inside a mobile app or JavaScript bundle; anyone can extract it.
Three paths
Path A: No backend
Ship static files to any host. Store data in the browser (localStorage, IndexedDB) or on the device. It costs nothing to run and nothing breaks at 3 a.m.
The catch is in the test: the day you add accounts or sync, you need a backend anyway, and data stored only on one device is lost when the device is. If you expect to add accounts soon, start on Path B; free tiers make that cheap.
Path B: A backend as a service
You create a project and get a hosted database, sign-up and login, file storage and an API generated from your tables. Your frontend calls the API directly. Access rules live in the database, so a user can only read their own rows even though the browser talks to the database's API.
This is the right default for most new apps, MVPs and side projects. You still design the schema and the access rules, and you add server code only where question 4 or 5 forces you to.
Path C: Your own backend
You write and run an API server (Node.js, Python, Go, whatever your team knows) in front of a database you manage or rent. You get full control over logic, data model and hosting.
Choose this when your core logic is heavy and must run on the server (complex pricing, matching, long-running jobs), when you must self-host for a contract, or when you already have backend engineers. Many teams start on Path B and add a custom service later for the one part that outgrows it; with a Postgres-based BaaS, your data is already in standard Postgres, so that move doesn't mean rewriting the data layer.
How the paths compare
| No backend | Backend as a service | Custom backend | |
|---|---|---|---|
| Accounts and login | No | Built in | You build or buy it |
| Shared data and sync | No | Built in, with access rules | You build it |
| Secret keys and payments | Not safely | Via functions (plan-dependent) | Yes |
| Time to a first version | Hours | Days | Weeks |
| Running cost to start | $0 | $0 on free tiers | Server and database costs |
| Ops work | None | Low; the vendor runs it | You run it |
| Lock-in risk | None | Depends on the vendor's data model | Low, but you own everything |
Free tiers for Path B (checked 22 November 2026)
| Service | Free tier | Paid entry | Database model | Source |
|---|---|---|---|---|
| WoWSQL | 1 project, 256 MB database, 512 MB files, 10,000 MAU; read-only when over a limit | Pro $25/month (adds Edge Functions) | PostgreSQL | wowsql.com/pricing |
| Supabase | 2 active projects, 500 MB database, 1 GB files, 50,000 MAU; paused after 1 week of inactivity | Pro from $25/month | PostgreSQL | supabase.com/pricing |
| Firebase | Spark: Firestore 1 GiB stored, 50K reads and 20K writes a day, 50K MAU with Identity Platform | Blaze pay-as-you-go (needed for Cloud Functions) | Firestore (NoSQL) | firebase.google.com/pricing |
Where others are better: Supabase's free tier allows more users (50,000 MAU vs WoWSQL's 10,000) and a bigger database, and Firebase includes push messaging (FCM) at no cost. Where WoWSQL fits: you get Postgres rather than a NoSQL store, a flat $25 step to a dedicated database, and a choice of Mumbai, US East or Frankfurt. Also note what free tiers don't include: on WoWSQL, Edge Functions start on Pro, and on Firebase, Cloud Functions need the Blaze plan. If your test answer to question 4 is "yes", budget for a paid plan or a separate function host.
A worked example of Path B with WoWSQL
Say you are building a notes app: people sign in (question 1) and their notes follow them across devices (question 3). No payments yet. Here is the whole backend.
1. Create a project at wowsql.com, choose a region close to your users, open Authentication and enable it. Copy the project slug and the anon key (wowsql_anon_…). The anon key is safe in frontend code; the service key bypasses access rules and belongs on a server only.
2. Create the table and its access rule in the SQL editor:
create table notes (
id bigint generated always as identity primary key,
user_id uuid not null,
body text not null,
created_at timestamptz not null default now()
);
alter table notes enable row level security;
create policy "own notes" on notes
for all
using (auth.uid() = user_id)
with check (auth.uid() = user_id);
auth.uid() returns the signed-in user's id from their token on WoWSQL (and Supabase); it is not part of stock PostgreSQL. With this policy, each user can only read and write their own notes (an insert must carry the user's own id in user_id), even though the app talks to the database API directly. The row level security guide explains using vs with check.
3. Sign the user in and read their notes with the TypeScript SDK (npm install @wowsql/sdk@3.10.0):
import { ProjectAuthClient } from '@wowsql/sdk'
const projectUrl = 'myproject' // → https://myproject.wowsqlconnect.com
const apiKey = 'wowsql_anon_your_key_here' // anon key: safe in the browser
const auth = new ProjectAuthClient({ projectUrl, apiKey })
const { session } = await auth.signIn({
email: 'user@example.com',
password: 'SecurePassword123',
})
// Call the REST API as this user so the RLS policy applies
const res = await fetch(
`https://${projectUrl}.wowsqlconnect.com/rest/v1/notes?select=id,body,created_at&order=created_at.desc`,
{ headers: { apikey: apiKey, Authorization: `Bearer ${session?.accessToken}` } },
)
const notes = await res.json()
Why plain fetch for the data call? In SDK 3.10.0, WowSQLClient sends the key you give it as the bearer token, so to run a query as the signed-in user you call the REST API with the anon key in apikey and the user's access token in Authorization. That's it: accounts, cross-device data and per-user access, with no server of your own.
When question 4 turns into "yes" (say you add Stripe), keep the secret key out of the app: put the webhook handler in a server function (Edge Functions on WoWSQL Pro and Scale) or a small API you host, and use the service key only there.
For the full sign-up flow with magic links, OTP and OAuth, see How to add login to your app. For React components, see Best backend for React apps.
Common mistakes
- Shipping secret keys in the frontend. Anything in a JavaScript bundle or app binary is public. Only the anon key belongs there.
- Turning on a database API without access rules. With RLS off, anyone holding the anon key can read the table. Write the policy first.
- Building Path C for a Path B app. Weeks spent on auth and CRUD endpoints are weeks not spent on the product.
- Choosing a NoSQL store for relational data because it was first in a tutorial. If your data has users, orders and items that reference each other, a relational database saves pain later.
- Ignoring region. Put the database near your users and your server code; see Indian SaaS selling to the US: pick your DB region and, for the UK, Backend for UK apps.
Related guides
- What is backend as a service?
- How to launch an app without building a backend
- Free backend for your app: 2026 free tiers compared
- Supabase vs Neon (2026): backend platform or database?
- pgvector on Postgres: vector search for AI apps
FAQ
Do I need a backend for my app?
Only if it has user accounts, shared data, data that syncs across devices, payments or secret API keys, or notifications. If none apply, a frontend-only app is fine. If some apply, a backend as a service like WoWSQL, Supabase or Firebase covers accounts, the database and APIs without you writing a server.
Can I build an app without a backend?
Yes, if the app keeps data on the device and has no accounts, sharing or payments. Calculators, single-player games and static sites work this way. As soon as users sign in or share data, you need a backend, but a BaaS means you don't have to build one yourself.
Should I use a backend as a service or build my own backend?
Start with a backend as a service for most new apps and MVPs: it is faster and free to start. Build your own when heavy server-side logic is your core product, a contract requires you to self-host, or you already have backend engineers. With a Postgres BaaS such as WoWSQL, your data stays in standard Postgres if you move later.
Is it safe to talk to the database directly from the frontend?
It is safe only with access rules. On WoWSQL and Supabase, enable Row Level Security and write policies, use the anon key in the app, and send each user's token so the policies see who is asking. Never put the service key or third-party secret keys in frontend code.
What is the cheapest way to add a backend to my app?
Use a free tier. WoWSQL Free is $0 with a 256 MB Postgres database and 10,000 monthly active users; Supabase Free allows 50,000 MAU but pauses after a week of inactivity; Firebase Spark is free within daily Firestore limits. Plan for a paid plan once you need server functions.
Does WoWSQL work with GraphQL?
No. WoWSQL provides an auto-generated REST API (PostgREST) plus SDKs, realtime over WebSockets and a hosted MCP server, but no GraphQL API.