Skip to main content

Claude/ChatGPT Prompt to Architect a Production React Native App

Design a production React Native architecture: typed navigation, state, networking, offline sync, push, crash reporting, and OTA updates.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt

                                

What this prompt does

This prompt asks the AI to act as a senior mobile engineer and specify a production React Native architecture tightly enough to build from, with a real directory tree and concrete library choices. You provide the [app_type], your [state_pref], the [api_style], and the [distribution] channel, and it returns the directory tree, a decisions table, and key wiring snippets in fenced blocks.

The five deliverables cover the load-bearing decisions: a folder structure for features, navigation, services, hooks, and components with a one-line purpose per directory; typed navigation via React Navigation; state using your [state_pref] plus server-state via TanStack Query and a typed API client for your [api_style]; an offline sync strategy that caches, queues mutations, and reconciles on reconnect; and push, crash reporting, and OTA updates wired to your [distribution], each with a decisions table entry (choice, why, tradeoff). The structure forces the model to lock navigation typing and offline behaviour up front, which is brutal to retrofit later.

When to use it

  • You are starting a new React Native app and want the architecture decided before the first screen.
  • You need typed navigation routes and params rather than stringly-typed navigation.
  • Your app must work offline and reconcile mutations when the network returns.
  • You want push notifications, crash reporting, and OTA updates wired to a specific distribution channel.
  • You are bringing React habits to mobile and want patterns that respect a phone is not a browser.

Example output

You get a directory tree showing features, navigation, services, hooks, and components with a one-line purpose each; a decisions table listing every infrastructure choice with its rationale and tradeoff; and wiring snippets for typed navigation, the TanStack Query setup, the API client for your [api_style], and the offline sync queue.

Pro tips

  • Set [state_pref] to what your team already knows; the prompt honours your choice and pairs it with TanStack Query for server state, so do not duplicate server data in your client store.
  • Match [api_style] precisely (REST, GraphQL, JWT vs session) so the generated typed API client fits your backend.
  • Decide what happens to in-flight mutations when the network drops before writing the first screen - that single choice shapes the whole offline layer.
  • Tie [distribution] to your real channel so the OTA, push, and crash-reporting wiring matches your build pipeline.
  • Treat the decisions table as a living doc; the tradeoff column is where you catch choices you will regret.
  • If navigation params come back untyped, push back - typed routes are the cheapest bug prevention you get on mobile.
  • Keep each top-level directory's one-line purpose in the tree; it is the cheapest onboarding doc you will ever write for a new contributor.
  • Pin concrete library versions in the decisions table, since a phone build is far more sensitive to native dependency drift than a browser app.

Frequently Asked Questions

Does this prompt respect my preferred state management library?
Yes - it takes your `[state_pref]` and builds the client-state layer around it rather than forcing a default. It then pairs that with TanStack Query for server state, so remote data is cached and synced separately from your local UI state.
How does the architecture handle offline use?
It asks for an offline sync strategy that caches data, queues mutations while offline, and reconciles them on reconnect. The prompt deliberately surfaces the question of what happens to in-flight mutations when the network drops, since that decision shapes the rest of the design.
Why does it require typed navigation?
Typed routes and params via React Navigation catch a whole class of navigation bugs at compile time instead of at runtime on a user's phone. Retrofitting types onto stringly-typed navigation later is far more painful than starting typed.
Will it pick specific libraries or stay generic?
The prompt demands concrete library choices and a decisions table with each choice, its rationale, and its tradeoff. That said, you should still weigh those picks against your team's experience and your `[distribution]` constraints before committing.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Mobile App Development Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support