Skip to content
The feed on iOS, with a liked post

A React Native template with the hard parts done

Bare React Native 0.87 with offline writes that survive a restart, tokens in the Keychain, an architecture the linter enforces, and rules your AI agent follows. It runs with no accounts.
npx create-bareship MyApp

v0.5.0 · MIT · iOS and Android · React Native 0.87

Offline writes that wait

Like a post with no signal and the like shows at once, marked “Waiting to sync”, while a banner says how many changes are waiting. Close the app and reopen it: the change is still there, and it’s sent once the phone reconnects.

How offline writes work →
The feed offline on Android: a banner says one change will sync when you reconnect, and a liked post shows Waiting to sync

Sign in with email, Apple or Google

Tokens are kept in the iOS Keychain and Android Keystore. The Apple and Google buttons follow each provider’s branding rules, work with mock providers until you add your ids, and come out with one command if you don’t want them.

Set up Apple and Google →
Sign-in on iOS with email, Continue with Apple and Continue with GoogleCreate your account on iOS in the dark theme, with Apple and Google

Light and dark, following the phone

Screens are styled with theme tokens, so the dark theme needs no extra work, and the app switches the moment the phone does. Users can also pick a theme in Settings.

How styling works →
The feed on iOS in the dark theme

English and Hindi, ready for right-to-left

Every string comes from a translation file, and dates, numbers and “last week” are formatted in the user’s language. Lint rejects hard-coded text, and a right-to-left language such as Arabic is one setting away.

Languages and right-to-left →
The feed on Android in Hindi

A settings screen that’s already built

Theme, language, notifications, sign-out and account deletion are done. The screen also shows which environment the build talks to, so dev, staging and prod builds are easy to tell apart.

Dev, staging and prod →
Settings on iOS: theme, language, notifications, environment and account

Photo uploads that work offline

Add a photo to a post and it shows at once with its progress. With no signal it waits, keeps through a restart and uploads when the phone reconnects. If the server refuses it, Try again sends it once more without storing the photo twice.

Add uploads to your screens →
On Android, offline: a new post with its photo, marked Waiting to upload, under a banner saying one change will syncOn iOS, a post the server refused, with Couldn't upload this, Try again and Remove

Permission prompts that explain first

Before the system asks, a sheet says why the app needs the permission, because iOS asks only once. If someone said no earlier, the sheet says how to turn it back on and opens Settings. Notifications use it out of the box; add camera or location in a few steps.

Ask for a permission →
On Android, a sheet over Settings explains notifications before the system prompt, with Continue and Not nowOn iOS, after a Don't Allow, the sheet says notifications are off and offers Open settings

Onboarding on first launch

Three swipeable screens with Skip, shown once before sign-in. Change the words in the strings file, or remove the screens if your app doesn’t need them.

The first onboarding screen on iOS, with Skip and Next

You don’t need a backend, a Firebase project or an Apple Developer team to build the app, run it or put it on a phone. Development builds serve sample data from a mock backend inside the app, and every service falls back when its account is missing:

  • No backend: the mock backend answers sign-in (Apple and Google included), the feed and every other request.
  • No Firebase: crash reports and analytics go to the console, feature flags use their defaults, and notifications stay local.
  • No Apple or Google account: debug builds run on simulators and emulators, and a demo APK installs on any Android phone.

When you’re ready, Going live lists what to add and what each step switches on.

Every write in the app picks one of four behaviours, so users always know what happened to what they did.

Pattern What the user sees Use it for
A The change appears at once and syncs in the background Low-stakes toggles
B The change appears at once, marked “Waiting to sync” until it’s sent Likes, comments, edits
C The form is disabled while offline, with the reason Sign-in, payments
D The screen is replaced by an offline message Account deletion, checkout

Writes queued with A or B survive closing the app and are sent in order when the connection returns. An offline banner sits under the header while the phone is offline. How to choose and use a pattern

The rules your team follows are written down where coding agents read them, and the linter checks the result.

  • AGENTS.md holds the commands, architecture rules and conventions. Claude Code, Cursor and Copilot are pointed at it.
  • Skills for adding a feature, a screen or an endpoint run the generators, then walk the agent through fields, offline behaviour, strings and tests. Callstack’s React Native skills are included and pinned.
  • Accessible by default: screens use ARIA roles and labels, so agents that drive the app on a simulator read the screen as text instead of guessing from screenshots.

How agents work with the template

Sign-in, done properly

Email, Apple and Google sign-in, tokens in the Keychain and Keystore, and a session that refreshes itself. Session · Apple and Google

Firebase when you want it

Crashlytics, Analytics, Remote Config and push switch on when you add a Firebase file, and fall back without one. Set up Firebase

Three environments

Dev, staging and prod install side by side, each with its own app id, name, icon badge, URL scheme and .env file. Environments

Generators

pnpm gen feature orders writes a working screen, its API call, mock data, strings, a deep link and tests that pass. Generators

Releases with fastlane

Version bumps on both platforms, release builds, match signing, and uploads to TestFlight and Play internal testing. Releasing

A demo you can remove

A feed, likes and a component showroom show every pattern. pnpm strip-examples removes them and leaves a blank Home tab. Demo code

Also included: English and Hindi with right-to-left support (Languages), permission prompts that explain first (Permissions), offline photo uploads (Photo uploads), and a supply-chain policy that refuses packages younger than 3 days (Decision 0003).

A good fit if you

  • want to own ios/ and android/ and see every native change
  • build an app that has to work offline and keep users’ writes
  • work in a team, or with AI agents, and want the rules checked
  • want to start from working code and remove what you don’t need

Not a fit if you

  • want Expo’s managed workflow or Expo Go: start from an Expo template instead
  • need a backend: this is the app side only, with a mock backend to build against
  • want a UI kit: it has about 15 primitives, not a full component library

Comparing templates? How to choose a React Native template lists eight questions to ask of any of them.

  1. Create the app. It checks your tools first, then installs everything and sets the bundle id (other ways, with the React Native CLI or GitHub’s template: Quick start):

    Terminal window
    npx create-bareship Acme
  2. Start an emulator or simulator, then run the app and sign in with demo@example.com / password123:

    Terminal window
    cd Acme
    pnpm android # or: pnpm ios
  3. When you start on your own screens, remove the demo and add your first feature:

    Terminal window
    pnpm strip-examples
    pnpm gen feature orders

Read the introduction

Do I need a backend to start?

No. Development builds use a mock backend inside the app. When your API is ready, set API_URL and API_MOCKS=false in the environment’s .env file. Use your API

Do I need Firebase?

No. Without a Firebase file the app logs crashes and analytics to the console, uses default feature flags and shows notifications locally. Add the file when you want the real services.

Which platforms and versions does it support?

iOS 15.1 and later, and Android 7.0 (API 24) and later, on React Native 0.87 with the New Architecture. Version matrix

Can I move to Expo later?

Every change to ios/ and android/ is listed with its Expo equivalent in Native changes, and native libraries sit behind small interfaces, so the app code doesn’t depend on how the native side is built.

How do I get template updates into my app?

Your app owns its copy of the code, so nothing updates on its own. Each version is published to npm and listed in the changelog; copy the changes you want.

What does it cost?

Nothing. It’s open source under the MIT license.

If Bareship saves you a week, a star on GitHub helps other React Native developers find it.

Star on GitHub

Made by , Senior React Native engineer