Introduction#
RafikiDB is a hosted backend for web and mobile apps. Instead of building your own API server, you get:
| Capability | Description |
|---|---|
| Data API | CRUD over managed PostgreSQL tables with filters, joins, keyset pagination and row-level security |
| Authentication | Project users via email/password and phone OTP |
| Realtime | Push table changes to your app over WebSocket or Server-Sent Events, with event recovery |
| Storage | S3-compatible buckets, objects, folders and presigned upload/download URLs |
| Edge functions | Sandboxed JavaScript/TypeScript functions with deploy + invoke |
| Webhooks | Outbound HTTP notifications with HMAC signing and delivery retries |
| Payments | M-Pesa STK push and Snippe (mobile money + hosted checkout) |
| Environment & secrets | Scoped env vars per environment and encrypted project secrets |
How it fits together#
Your app ──> @rafikidb/sdk ──> RafikiDB API ──> PostgreSQL / Redis / the realtime server / S3
│
└──> webhooks / M-Pesa / Snippe / edge functions
TextThe envelope#
Every API response uses the same envelope:
{
"success": true,
"message": "Request was successful",
"data": { }
}
JSONErrors:
{
"success": false,
"message": "Email must be a valid email address",
"errors": ["Email must be a valid email address"]
}
JSONWhat you need#
- A project in the dashboard (gives you a project id)
- An API key (Access → API Keys)
- Optionally a project-user session for row-level security
Continue to the Quickstart.