Build your own app series · Part 2 of 4 · 3 September 2026
Fitness App Infrastructure: Hosting, Data and Backups
Hosting can be cheap. Keeping every client's information available, isolated and recoverable is the work a demo does not show.
The minimum architecture behind the app
A coach creates a program, a client uploads a progress photo and someone records a load. Underneath that simple sequence are the interface, an API, a database, file storage, authentication and third-party services.
AI development platforms can configure much of this infrastructure, which is a real advantage. Someone must still decide what data exists, who may change it, how long it remains and how to recover it.
| Layer | Purpose | Decision you still own |
|---|---|---|
| Interface | What coaches and clients use. | What each role can do and how mistakes are prevented. |
| Backend | Validates and executes operations. | Which rules must never depend on the browser. |
| Database | Stores accounts, plans, sessions and progress. | Relationships, permissions, history and deletion. |
| Files | Stores photos, videos and documents. | Access, size, retention and delivery. |
| Authentication | Establishes who the person is. | Recovery, sessions and stronger verification. |
| External services | Send email, notifications, payments or AI requests. | What happens when a provider fails or repeats an action. |
Hosting means more than renting a server
Hosting includes deploying every release, serving it over HTTPS, managing domains and secrets, controlling abuse and keeping enough capacity when users arrive together.
A managed platform may handle certificates, deployments and scaling better than a solo builder. The honest question is not whether managed hosting is good, but exactly where the provider's responsibility ends.
- Limits: what happens when requests, storage, transfer or job quotas are exceeded?
- Region: where are data processed and which suppliers take part?
- Outages: does the app degrade clearly or leave a blank screen?
- Exit: can you export code, data and files if prices or conditions change?
The database is the business, not a large spreadsheet
Workout products quickly develop delicate relationships: coaches add collaborators, clients change plans, published programs are edited, metrics need history and shared exercises must not expose private notes.
Later changes require data migrations. A migration must transform old records, preserve compatibility during rollout, validate the result and provide a safe way back.
Photos and videos change cost and risk
Text is small. Exercise videos, progress photos and documents multiply storage and transfer. A login in front of a page does not protect a file if its permanent URL is public.
- Can anyone open a copied link?
- Are all copies removed when the user deletes a file?
- Are file type and size checked before upload?
- Can interrupted or malicious uploads be contained?
- Can video be delivered efficiently without exposing the original?
Backup and restoration are different jobs
A backup setting does not tell you how much recent data you might lose or how long recovery takes. Restoration also means reconnecting services, validating permissions and communicating the outage.
A rehearsal proves that the backup opens, includes the files, still has the required keys and can be restored by someone who knows the procedure. If it has never been restored, it is a hope rather than a plan.
- Separate development, test and production environments.
- Keep private keys out of browser-delivered code.
- Test access for coach, collaborator, client and unrelated user.
- Use authorised, expiring access for private files.
- Give database changes a migration and rollback plan.
- Test restoration of both records and files.
- Maintain a usable export path.
The complete series
- Part 1: real cost and when it makes sense
- Part 2: hosting, database, files and backups
- Part 3: security, privacy and client data
- Part 4: maintenance, observability, updates and support
Frequently asked questions
How much hosting does a small workout app need?
Often very little at first, and many providers offer free or inexpensive entry tiers. The harder work is not raw server capacity but access design, data recovery and predictable behaviour when a dependency fails. Video, progress photos, notifications and AI jobs can change consumption quickly.
Does a managed database remove maintenance?
It removes valuable server-administration work. It does not decide your data model, permissions, retention, migrations or recovery process. Managed means the provider operates one layer; it does not own the meaning and safety of your client data.
Do backups guarantee I can recover?
No. A useful backup must contain the right data and files, be protected, be retained long enough and have a tested restoration path. You also need to know how much recent work you could lose and how long returning to service would take.
Should videos be stored in the database?
Usually the file lives in object or video storage while the database keeps its reference and permissions. Large files need upload limits, compression, controlled delivery and deletion rules. Treating them like ordinary text fields creates cost and performance problems.
Primary source
Clients need the system to work, not to know who hosts it
TrainerStudio operates the shared infrastructure while you work on programming, progress, nutrition, forms and communication. Start with up to three clients free and no card.