Prompt
How do I set up authentication, database, and file storage for a mobile app without building my own backend?
Latest observation
If you want to avoid building your own backend, the usual approach is to use a Backend-as-a-Service (BaaS). That gives you hosted authentication, database, and file storage APIs so your mobile app can talk directly to the service.
Good options
Popular choices include:
- Firebase — very common for mobile apps, especially Flutter/React Native
- Supabase — open-source, Postgres-based, great if you want SQL
- AWS Amplify — powerful, more complex
- Appwrite — open-source BaaS with auth, database, storage
- PocketBase — lightweight, simple, self-hostable
Typical setup
Most BaaS platforms follow the same pattern:
1. Authentication
Use the provider’s auth system for:
- email/password
- OAuth login (Google, Apple, Facebook, etc.)
- magic links or phone auth
Your app handles login UI, and the provider issues a session token/JWT.
2. Database
Store app data in the hosted database:
- Firebase: NoSQL document database
- Supabase/Appwrite: SQL-like or document-style depending on platform
You usually define:
- user profiles
- app records
- relationships between records
3. File storage
Use the built-in object storage for:
- profile photos
- uploads
- attachments
- media
The app uploads files directly to the storage service using SDKs, then stores the file URL/path in the database.
Recommended stack by use case
If you want the easiest mobile dev experience:
Firebase
- Auth + database + storage all integrated
- Excellent SDKs for iOS/Android/Flutter/React Native
- Fastest to get started
If you want SQL and relational data:
Supabase
- Built on Postgres
- Strong for structured data, joins, and querying
- Auth and storage included
If you want open-source and self-hostable:
Appwrite
- Good all-in-one backend platform
- Nice mobile SDKs
- Easier to self-host than AWS
Basic implementation flow
- Create a project in the BaaS dashboard
- Enable auth providers
- Create your database tables/collections
- Create storage buckets/containers
- Add the SDK to your mobile app
- Configure security rules/policies
- Use SDK calls from the app for:
- sign up / sign in
- CRUD database operations
- upload/download files
Important security note
Even without your own backend, you still need to configure:
- authorization rules
- database row-level security / access rules
- storage permissions
Otherwise users may access data they shouldn’t.
Simple architecture
Mobile app → BaaS SDK → Auth / Database / Storage
No custom server required unless you need:
- custom business logic
- third-party API secrets
- payment orchestration
- advanced background jobs
If you want the shortest path
For most mobile apps:
- Firebase if you want fastest setup and lots of tutorials
- Supabase if you want SQL and more control
- Appwrite if you want open-source/self-hostable
If you want, I can also give you:
- a step-by-step setup guide for Firebase or Supabase, or
- a recommended schema + auth flow for your specific app idea.