cd /news/developer-tools/bareship-an-offline-first-react-nati… · home › topics › developer-tools › article
[ARTICLE · art-155421] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Bareship: an offline-first React Native template for teams and AI agents

A developer released Bareship, a free MIT-licensed template for bare React Native 0.87 apps that ships offline-first write handling, lint-enforced architecture rules, and agent-facing files like AGENTS.md so coding agents follow the same conventions as human teams. The template defines four offline write patterns, persists queued writes to disk with idempotency keys for replay after restart, and enforces layer and feature boundaries through ESLint and dependency-cruiser. It runs without a backend, Firebase project or Apple account, serving mock data until real services are added.

by read4 min views4 publishedOct 22, 2026

Bareship is a free, MIT-licensed template for bare React Native 0.87 apps. One command, npx create-bareship Acme, gives you an iOS and Android app where a like or an edit made offline is saved, survives a restart and is sent once when the phone reconnects; where the folder rules are checked by ESLint instead of code review; and where Claude Code, Cursor or Copilot get the same rules as your team. It runs with no backend, Firebase project or Apple account until you need them.

Every new React Native app I've started began the same way: a week or two rebuilding the plumbing before the first real feature. A queue for writes made without signal, somewhere safe for the auth token, folder rules everyone agrees on and nobody checks. Each time I built them a little differently, and each time the gaps showed up later, in a bug report from a user with a bad connection or in a feature folder that had quietly started importing from three others. I wanted to make those decisions once, properly, and start from there.

Most starters get you to a running screen fast. The parts that cost time later are the ones a demo never touches: what happens to a write when the phone has no signal, where the auth token lives, and whether the folder structure you agreed on in week one still holds in month six, with three developers and a coding agent all adding code. Bareship is my answer to those, decided once and written down.

Every write in the app picks one of four patterns, so a user always knows what became of what they did:

Pattern Without a connection Use it for
A The change appears at once and is sent later Low-stakes toggles
B The change appears at once, marked "Waiting to sync" Likes, comments, edits
C The form is disabled, with a note saying why Sign-in, payments
D The content is replaced by an offline message Account deletion, checkout

Queued writes are saved to disk, replayed in the order they were made after a restart, and carry one idempotency key for every attempt, so a write sent twice is applied once. A banner under the header counts the changes waiting to sync. A write that picks no pattern fails at once offline, so nothing is queued by accident.

The architecture is in the linter, not a wiki page. Layers import downward only, features can't reach into each other's files, text on screen must go through translations, and accessibility uses one set of ARIA props everywhere. ESLint and dependency-cruiser fail the check otherwise. When a rule is wrong for your app, you change it in one place and write down why: the decisions behind the template are kept as ADRs in the repo.

The repo ships an AGENTS.md, its decision records and React Native agent skills, plus generators (pnpm gen feature | screen | endpoint) that write a schema, API hooks, a mock, strings and a test the way the rest of the code does. An agent that follows them writes code that passes the same checks as your team's.

I built much of Bareship with Claude Code, so these files were tested on an agent from the start: when it broke a rule, the fix went into the linter or AGENTS.md, not into a comment on a pull request.

The dev build serves sample data from a mock backend inside the app, so you can sign in, scroll the feed and test offline mode on a simulator or a phone before any backend exists. Crashlytics, Analytics, Remote Config and push turn on when you add a Firebase file and fall back to logging without one. Tokens are stored in the Keychain and Keystore from day one.

Also included: light and dark themes, English and Hindi (with right-to-left support you can switch on), deep links, force-update and maintenance screens, environments for dev, staging and prod, fastlane release lanes and a demo build you can install on a phone.

npx create-bareship Acme
cd Acme
pnpm android   # or: pnpm ios

create-bareship checks your tools first, asks for a bundle id and display name, installs everything and makes the first commit.

Sped up: the real run took 1 min 15 s to create the app. The full-quality video is on my blog. The first Android build compiles the native libraries and takes a while (about 20 minutes on my 8 GB M1, a few minutes on a faster machine); builds after that are quick.

Bareship is at 0.3.2. Next on the list: turning CI back on in the repository, and a series of posts on how the pieces work, starting with the offline queue and idempotency keys. If it saves you a week, a star on GitHub helps other people find it, and issues are the best way to tell me what's missing.

In short:

npx create-bareship Acme creates a bare React Native 0.87 app for iOS and Android in one command.AGENTS.md, ADRs, skills and generators give AI coding agents the same rules as your team.

── more in #developer-tools 4 stories · sorted by recency
── more on @bareship 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/bareship-an-offline-…] indexed:0 read:4min 2026-10-22 · —