A requirements document answers the question the product spec leaves open: what do we need to build this? Services, a data model, security rules, server functions, purchases, permissions and the analytics that will tell you if it works. Writing it before the build is the cheapest moment to find out you need an account deletion flow, a consent screen or a server-side check for a costly feature. This page gives a template and a method, drawn from MobileKit’s requirements stage. It follows from an MVP spec for a mobile app.
The template
# Requirements: <app>
## 1. Service map
| Story | Auth | Database | Storage | Server functions | AI | Purchases | Push | Native |
## 2. Data model and rules
Collections or tables, fields, indexes. Security rules intent, in plain words.
## 3. Server-side work
| Function | Trigger | Input / output | Secrets | App check |
## 4. AI features (if any)
Contract per feature.
## 5. Monetization
Entitlements, products per store, offerings.
## 6. Platform requirements
iOS and Android capabilities, permissions, strings, extensions.
## 7. Analytics
Events and funnels.
## 8. Inputs needed from you
Accounts, identifiers, decisions.
## 9. Risks and spikes
1. Map every story to services
For each feature in the spec, list the pieces of your stack it touches: authentication, database, file storage, server functions, AI, purchases, push notifications and native extensions. Anything not covered by your chosen stack needs a justification and a recorded decision. This map is what shows you the backend you are really building.
2. The data model and the rules
List the collections or tables, their fields and types and the indexes each query needs. A sensible default is one record per user with sub-collections for data they own. Then write the security rules intent in plain words, before the rules themselves, for example: “a user reads and writes only their own data; nobody writes entitlement records from the client.” Note offline behaviour and how conflicts resolve. See Firebase and Flutter with Claude Code and the mobile app security checklist.
3. Server-side work
For each function, state the trigger (callable, database, scheduled or webhook), the input and output, the secrets it needs and whether app attestation is enforced. Typical ones: account deletion, AI calls that must stay server-side, a webhook or sync from your purchase provider and scheduled recaps or notifications. Anything that costs money per call needs a per-user limit.
4. AI features
For every AI feature, write its contract:
- client or server side,
- the model role (fast or reasoning),
- input and output shape,
- streaming or not,
- per-tier usage limits,
- the fallback when it fails, and
- the estimated cost per call and per active user per month, with the method shown.
The store rules apply: user input sent to a model is shared with a third party. See guideline 5.1.2 and the Google Play AI-generated content policy. The Santa Radar run kept AI server-side only, set per-user daily and monthly caps and recorded the AI consent requirement at this stage.
5. Monetization
- The entitlement ID at your purchase provider, usually one called
pro. - The products for each store, with intro offers and trial lengths, matching the spec.
- The offering layout, and how the server learns about entitlements: a sync or a webhook.
See RevenueCat Flutter integration.
6. Platform requirements
- iOS: capabilities (push notifications, Sign in with Apple, app groups for widgets, background modes), the permission purpose strings with their exact user-facing text, privacy manifest entries and any extensions such as a widget.
- Android: permissions, notification channels, widget receivers and foreground services.
- Minimum OS versions, taken from the current requirements of your SDKs and packages. Check them. Do not recall them from memory.
7. Analytics
Define the events, the funnel and the dashboards before you build, because you can only measure what you instrumented. The funnel from install to onboarding to the aha moment to paywall to purchase is the one you will read every week. See the weekly app monitoring routine.
8. Inputs needed from you
Make a list of what only you can supply, and record the answers: the developer accounts and their state, the bundle and package identifiers, the support address, the countries you launch in, the legal entity. The Santa Radar run’s requirements flagged blockers here: the developer program enrolment, the testers needed for Google Play’s closed test and the billing setup for the backend. See how to find beta testers.
9. Risks and spikes
List the things that could sink the plan and run a small experiment, called a spike, for each before committing. A risk with no plan is a surprise waiting for a launch date.
Store requirements belong here
This is where store policy becomes a requirement, so it is cheap. Add: account deletion if accounts exist, a privacy policy URL, consent for any data shared with a third party including AI, per-country consent ages where relevant and the declarations you will have to make in both stores. See the App Store privacy labels guide and the Google Play Data safety form guide.
Using Claude Code
Claude Code can draft each section from your spec and your stack file, and it is good at spotting a story that has no service behind it. Ask it to flag every place a story needs a server, a permission or a store declaration. Then decide. Do not let it choose services silently: every service outside your standard stack needs your explicit yes and a line in your decision record.
Where MobileKit fits
The pack’s requirements stage writes this document and the analytics plan from the approved spec, and ends at a gate. See Build a Flutter app with Claude Code.