Mobile app backend starter

Your app's backend, already built.

Ship the iOS/Android app — the backend is done.

Mobile app backend

Tap sign in. The backend does the rest.

Apple, Google and passwordless sign-in, a bearer-token JSON API, profiles and per-user data — the whole backend your app needs, on plain PHP and SQLite. No Firebase bill, no SDK to babysit.

  • Provider id_tokens verified server-side (JWKS)
  • Bearer app tokens — hashed, revocable per device
  • A real JSON API over per-user data to clone
A NATIVE APP + ITS BACKEND, ALREADY WIRED

A native iOS and Android app — and the backend they run on.

This download ships two real native apps (SwiftUI + Liquid Glass on iOS, Jetpack Compose + Material 3 on Android) already wired to one PHP backend. It verifies Apple/Google/passwordless sign-in, hands the app a bearer token, and serves a clean JSON API over per-user data. Set one URL and run — no Firebase bill, no SDK to babysit.

Native Apple & Google sign-in, verified

The backend proves a login really came from Apple or Google before trusting it, so a forged sign-in can't impersonate a user. The app sends the provider proof token (id_token); the backend verifies its signature against Apple/Google's public keys (JWKS) before trusting a single claim, then finds-or-creates the user through the same identity-linking path the web login uses. No client claim is taken on faith.

Passwordless email, no password store

app_request_code emails a 6-digit code; app_verify_code checks it and returns a token. It reuses the exact login-code mechanism the website uses, so there is one auth pipeline to reason about and no passwords anywhere in the database.

Bearer app tokens, hashed not stored

Sign-in mints a long random at_ token returned once. Only a peppered HMAC-SHA256 hash and the device label hit the database; last_used_at is stamped per call, and any device can be revoked. A leaked DB hands an attacker nothing usable.

A real JSON API, not a stub

app_me, app_profile_update, app_logout and a full app_items CRUD ship as working, per-user-scoped endpoints with consistent JSON envelopes, status codes and validation. Clone app_items into your own models and keep the shape.

Per-token rate limits, 429 + Retry-After

Each app token is throttled by a fixed-window limiter in SQLite — 300 requests per 60s out of the box, one env var to change. Over the line returns 429 with a Retry-After header. No Redis, no sidecar.

An operator console to run it

The member app is a backend console: app users with their auth provider and last-seen, the live app data, which sign-in methods are enabled, issue/revoke app tokens, and a copy-paste cURL + Swift quickstart. Subscriptions are wired for in-app plans.

Two native apps, in the box

A SwiftUI + Liquid Glass iOS app and a Jetpack Compose + Material 3 Android app ship in clients/, already wired to this exact API and to RevenueCat — social + email sign-in, a dashboard reading app_me, profile edit, a per-user items CRUD, and an in-app paywall. Set your backend URL in one config file, open in Xcode / Android Studio, and run. Auth just works.

Sign in once, call the API

Apple token in, an app token out — then real JSON.

Your app sends the provider id_token; the backend verifies its signature, finds-or-creates the user, and returns a bearer app token the app stores. Every call after that is one header.

api.yoursite.com/api.php
# 1. Sign in: the app posts the Apple/Google id_token.
curl -X POST https://api.yourapp.com/api.php?action=app_auth_apple \
  -d '{"id_token":"eyJ...","nonce":"a1f3","device":"iPhone 15"}'
{ "ok": true, "token": "at_9f2a…",
  "user": { "id": 51, "email": "ada@app.dev" } }
# 2. Every call after: one Authorization header.
curl https://api.yourapp.com/api.php?action=app_items_list \
  -H "Authorization: Bearer at_9f2a…"
{ "ok": true, "items": [ { "id": 12, "title": "Hello" } ] }
A mobile backend, by the numbers

Auth, tokens and data — wired before you open Xcode

Every figure here is how the backend actually behaves the moment you deploy it — not a sales chart.

3 sign-in methods your app can call: Apple, Google, and passwordless email codes
0 passwords or raw tokens stored — only peppered HMAC-SHA256 hashes touch the database
300 app-API requests per 60s window per token, out of the box — one env var to change
1 header Authorization: Bearer is the entire auth contract for every app call after sign-in
Keep the infrastructure small. Make the product yours.
This store and its demos use the same PHP and SQLite foundation included in your download.
1 SQLite database
web_build_stepnone
source_codeincluded
hostingyour own server
database_modeSQLite WAL
Superadmin, not a spreadsheet

A real admin console — have a poke around.

Every install ships with this. Search users, replay webhooks, inspect billing and revoke keys — server-rendered, access-gated, no second app.

app.yoursaas.com/admin superadmin
MRR£4,820▲ 12%
Active subs138▲ 6
Credits today29,400spent
Signups · 7d52▲ 18%
UserPlanStatusJoined
ada@example.comProactive2d ago
grace@example.comScaleactive5d ago
linus@example.comStarterpast due3w ago
margaret@example.comProactive1mo ago
blocked@example.comFreeblocked1mo ago
processedinvoice.paidevt_1Q8x…a3
processedcustomer.subscription.updatedevt_1Q8w…f1
processedcheckout.session.completedevt_1Q8w…7c
retryinginvoice.payment_failedevt_1Q8v…02
refundedcharge.refundedevt_1Q8u…9d
curl -H "Authorization: Bearer ss_live_••••" \
     https://app.yoursaas.com/api.php?resource=notes

{
  "ok": true,
  "data": [ "note_18f2", "note_18f9" ],
  "rate_limit": "58/60",
  "credits_left": 1840
}
From download to charging cards

Preview locally. Connect services. Launch.

01

Unzip & copy

copy a template folder

02

Install & connect

composer install · Stripe + SES

03

Ask your agent

rebrand · plans · run doctor

04

Deploy & charge

NGINX + PHP-FPM · take cards

Try the local app before configuring billing or email. Provider approval and deployment take additional time.

Pricing you control

Tiers, access levels and credits from one config file.

Define plans in app/subscriptions.php, attach Stripe price IDs, and the checkout flow stays generic across every project.

Included

Free

£0

Default access for new users and trial accounts.

Access 025 starter credits
Subscription

Starter

$19/mo

For a small paid SaaS tier.

Access 10100 credits/mo
Subscription

Pro

$49/mo

For heavier usage and premium features.

Access 20500 credits/mo
Subscription

Scale

$149/mo

For power users and high-credit products.

Access 302,000 credits/mo
Questions

The honest FAQ.

Get started

You’re already inside.

This is a live, fully interactive demo — explore every screen. Nothing you do is saved and no payments are real.

Get Simple Stack Launch offer · £49