Help for owners
My app has no backend and I need an API for it
Short answer
An API is the part that lets your app, website or partners read and write shared data on a server. Adding one means deciding what data is shared, who may see it and how users log in. Plan those three things first, then build the API next to the live app without breaking it.
Does this sound like your situation?
- Data lives only on each phone and does not sync.
- I want a web dashboard or a second app that shows the same data.
- The app talks straight to a database or a spreadsheet.
- A partner wants to connect to my system.
- I want accounts and login that work across devices.
Why does this happen?
The app was built to work alone
Without a server, each install has its own copy of the data. Sharing it needs a central place.
Calling a database directly is risky
If an app talks straight to a database or sheet, the access keys are inside the app where others can find them. A server in between keeps them private.
Browsers add their own rules
A web client can be blocked from calling a server on another address until the server allows it.
Technical detail: The browser blocks your API response: no Access-Control-Allow-Origin header
What can I do about it today?
- List what must be sharedWhich records, between whom. For example orders between customers and staff.
- Decide who can see whatWrite down the roles, such as customer, staff and admin, and what each can do.
- Keep your current app runningThe API is built beside it, so users are not affected until it is ready.
- Check where the data is todayWhich phone, sheet, tool or server holds it, and who controls that account.
- Do not put secret keys in the appAnything inside an app can be extracted. Keys belong on a server.
When should I bring someone in?
- The app handles payments, orders or personal data.
- You have users already and a change must not lose their data.
- Several apps or partners must use the same data.
How do I handle it?
- Design the data and the endpointsI write down the records, the rules and the calls the app will make.
- Build with login and roles from the startAccess control is part of the first version, not added later.
- Move existing data safelyExisting records are copied across and checked before anyone depends on them.
- Switch the app over in stepsA small update points the app at the new API, with a rollback ready.
- Add monitoring and backupsSo that you know when something fails and can recover.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Do I have to rebuild the app?
Usually not. The app is updated to call the API, and the screens can stay.
Which language will the API use?
I choose based on your team and the app, and tell you why.
Can existing users keep their accounts?
Yes, accounts and data are moved and checked before the switch.
How was this page made?
I drafted this page with AI assistance. It is general guidance for business owners, not advice for your own system. Found a mistake? Tell me.
For your developer: the technical fixes
Access to fetch at 'https://api.example.com/orders' from origin 'https://app.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.The browser blocks your API response: no Access-Control-Allow-Origin headerJsonWebTokenError: jwt malformedjsonwebtoken rejects a token: invalid signature, jwt expired or jwt malformed504 Gateway Time-outnginx gives up waiting for the app and returns 504