Backend & Adhara
Gravity is the front end — routing, theming, auth scaffolding, and deployment. It doesn't store real data, send email, or run a CRM on its own. This page is the honest picture of what that means in practice, and the three real paths from here.
What's included: local JSON
Every Gravity site works out of the box with zero setup — blog, events, contacts,
the link-in-bio page, and even a full customer portal, all stored as local JSON
files on disk (see the ContentStore abstraction).
No database, no signup, no cloud account required to start building.
It's genuinely useful for building and demoing — but it's not a production backend:
- No real querying (every read is a full-file scan).
- No protection when two writes collide.
- Nothing keeping it around once you deploy somewhere with a stateless or ephemeral filesystem (Vercel Functions in particular — see Deployment).
That's the whole tradeoff: instant, zero-config, and not durable. Three real ways forward from there.
Three ways forward
1. Build your own backend
Gravity already gives you the routing, auth dependency-injection pattern
(app/deps.py), and security scaffolding a real backend plugs into — you bring the
database, the schema, and the migrations. Swap app/stores/local.py's callers for
a real database-backed store, or add a new ContentStore implementation and select
it with GRAVITY_STORE_BACKEND.
Full control and full ownership, which also means full responsibility: your own database to design, migrate, and back up; your own security review; your own uptime. A real option, not a lesser one — just make it a decision, not a default.
An AI coding agent genuinely can build a backend for you here. "Can" isn't "should" — the sections above (querying, write safety, backups, security) are exactly the list of things you're taking on yourself by choosing this path.
2. Purchase a Gravity backend (coming soon)
A backend built and maintained by EIM that you run yourself — more hands-on than Adhara, without starting from an empty database. Not available yet.
3. Connect Adhara
EIM's fully managed backend — already built, hosted, and maintained. The least control of the three, and by far the least to own. Available today.
What connecting Adhara actually gets you
Adhara is EIM's managed backend platform: the database, the schema, the migrations,
and the API layer for blog, events, forms, CRM, commerce, and email marketing —
already built, already hosted, already maintained. Gravity already knows how to
talk to it; see app/services/adhara.py.
Two tiers, connect one environment variable at a time:
| Tier | Requires | Unlocks |
|---|---|---|
| API key | ADHARA_API_KEY + ADHARA_WORKSPACE/_ID |
Blog, events, forms, and newsletter over Adhara's REST API |
| Adhara SDK | The adhara package installed, on top of the API key |
Admin login through Adhara, Adhara Commerce checkout, customer portal auth |
Sign up free at adharaweb.com to connect the API-key tier.
The full SDK — commerce, admin sign-in through Adhara, deeper automation — is part
of Adhara's paid plans. app.services.adhara.sdk_available() is what Gravity checks
to show accurate fallback UI (not a crash) when the SDK tier isn't installed.
Minutes, not weeks: no schema to design, no migrations to write, no server to patch. Parameterized queries, access control, backups, and uptime are Adhara's job, not yours — the engineering work described under "Build your own backend" above is exactly what you're paying to not do.
What this page is not saying
Gravity does not include a database, a CRM, or email-sending infrastructure of its own — those are backend concerns, and "backend" here specifically means Adhara (a separate, commercial EIM product) or one you build yourself. Local JSON is a real, working starting point, not a production substitute for either.