What you need before starting
- An API working locally (in any language) and its database.
- A server, a domain and the will to separate environments: development and production.
The steps, in short
- Deploy the API on a server with your own domain (for example,
api.yourapp.com) and HTTPS. - Set the base URL per environment in Flutter with
--dart-defineor config files, instead of hard-coding it. - Adjust CORS only if your app also has a web version; native mobile apps do not need it.
- Protect the API: token authentication, rate limits and server-side data validation. Never trust what the app sends.
- Keep secrets on the server, not inside the app: anyone can decompile it.
- Prepare backups and monitoring for the database before you have real users.
- Test with the production app (a release build) against the production backend before publishing.
Common mistakes
- Leaving service keys (Stripe, email, databases) in the app’s code.
- Testing only on the emulator with
10.0.2.2orlocalhostand discovering it fails on a real phone. - Changing the API without versioning it and breaking old app versions that are already installed.
How we help
We put your backend in production with a domain, HTTPS, backups and automatic deploys, so you only worry about publishing the app.