An open API service indexing awesome lists of open source software.

https://github.com/maximcoding/react-native-bare-starter

Bare React Native starter with TypeScript, feature-first structure, TanStack Query, MMKV, i18n, theming, CI, and offline-ready support.
https://github.com/maximcoding/react-native-bare-starter

bare-react-native biome boilerplate-template feature-first-architecture i18next mmkv offline-ready react-native react-native-bare-starter react-navigation starter tanstack-query zustand

Last synced: about 2 months ago
JSON representation

Bare React Native starter with TypeScript, feature-first structure, TanStack Query, MMKV, i18n, theming, CI, and offline-ready support.

Awesome Lists containing this project

README

          

# React Native Bare Starter

[![Use this template](https://img.shields.io/badge/Use%20this%20template-2ea44f?logo=github&logoColor=white)](https://github.com/maximcoding/react-native-starter/generate)
![CI](https://github.com/maximcoding/react-native-starter/actions/workflows/ci.yml/badge.svg)
![React Native](https://img.shields.io/badge/React%20Native-0.82.1-61DAFB?logo=react&logoColor=white)
![TypeScript](https://img.shields.io/badge/TypeScript-5.8-3178C6?logo=typescript&logoColor=white)
![License](https://img.shields.io/badge/license-MIT-green)

React native starter project (no Expo) - modern state management, fast storage, and a production-minded foundation.

## โœจ Features Included

- **๐Ÿงฑ Bare React Native 0.82.1** โ€” full native control, (no Expo lock-in)
- **๐Ÿงญ React Navigation 7.x** โ€” stacks, tabs, modals, predefined presets and options
- **๐Ÿ“ฆ TanStack Query 5.x** โ€” Framework agnostic powerful server data fetching library. Caching, updating, retries, invalidation, and persistence.
- **๐Ÿชถ Zustand 5.x** โ€” A small 1KB size, fast state management hook-based API. Eliminating boilerplates and prop drilling.
- **โšก MMKV Storage 4.3** โ€” `react-native-mmkv` via Nitro Modules, commonly described as up to **30ร— faster than AsyncStorage**
- **๐Ÿ“ก Offline-ready** โ€” query persistence, queue/replay, cache restore, and transport-level offline mode for a solid experience on flaky networks
- **๐Ÿ”Œ Pluggable transport** โ€” adapters for REST, GraphQL, WebSocket, and Firebase, so you can change backend strategy without rewiring the app
- **๐ŸŽจ Theming** โ€” light/dark mode with semantic tokens, ```ThemeProvider``` and ```useTheme()``` hook.
- **๐ŸŒ i18next 25.x** โ€” typed translations with a typed `useT()` hook
- **๐Ÿ–ผ๏ธ SVG via script** โ€” `react-native-svg 15.x` with scripted icon generation ```npm run gen:icons```
- **๐Ÿš€ BootSplash 6.x** โ€” Shows a splash screen, put your icon into assets/logo.png and execute ```npm run bootsplash:generate```.
- **๐Ÿงช Developer experience** โ€” Biome 2.x, Jest 29.x, GitHub Actions CI, and Maestro E2E
- **AI / agent workflow docs** โ€” includes `.claude` agents and repo rules for more consistent AI-assisted changes

[![Demo video](thumbnail.png)](https://github.com/user-attachments/assets/f7e1c02d-bdcd-4ecc-96f8-ad315038b1eb)

## ๐Ÿงญ Project structure

Feature-first structure with clear boundaries.

```text
src/
โ”œโ”€โ”€ config/ # Env, constants, feature flags
โ”œโ”€โ”€ navigation/ # App navigation, it's persistence and helpers
โ”œโ”€โ”€ session/ # App bootstrap and session flow
โ”œโ”€โ”€ i18n/ # Localization setup and typed translations
โ”œโ”€โ”€ shared/ # Cross-app code used by multiple features
โ”‚ โ”œโ”€โ”€ components/
โ”‚ โ”œโ”€โ”€ hooks/
โ”‚ โ”œโ”€โ”€ services/
โ”‚ โ”œโ”€โ”€ stores/ # Global UI state only
โ”‚ โ”œโ”€โ”€ theme/ # context, provider , tokens
โ”‚ โ”œโ”€โ”€ types/
โ”‚ โ””โ”€โ”€ utils/
โ””โ”€โ”€ features/ # auth, home, settings, user

assets/
โ”œโ”€โ”€ svgs/ # Source SVGs
โ”œโ”€โ”€ logo.png # BootSplash source of truth (`npm run bootsplash:generate`)
โ”œโ”€โ”€ bootsplash/ # Splash PNGs + manifest (`npm run bootsplash:generate`)
โ””โ”€โ”€ icons.ts # Auto-generated icon registry
```

* **Repository layout** โ†’ [docs/development.md#repository-layout](docs/development.md#repository-layout)
* **Code rules & ownership** โ†’ [AGENTS.md](AGENTS.md)

## ๐Ÿ› ๏ธ Getting started

### Prerequisites

Standard bare react native toolchain:

- Node.js โ‰ฅ 20
- Xcode for iOS
- Android Studio + SDK for Android
- CocoaPods for iOS

```bash
git clone https://github.com/maximcoding/react-native-starter.git
cd react-native-starter
npm install
npx pod-install ios
cp .env.example .env
```

**Launcher icon (optional):** `npm run gen:app-icon` is independent from splash generation and uses `assets/app-icon.png`. See [docs/development.md](docs/development.md#assets--guards).

Edit `.env` as needed, then:

```bash
npm start # Metro bundler
npm run ios # or: npm run android
```

## ๐Ÿ” Environment variables

Values are read at build time via `react-native-config`.
See [`.env.example`](.env.example). Rebuild the app after changing `.env`.

| Variable | Required | Purpose |
| ------------------------------------------- | ------------ | ----------------------------------------------------- |
| `API_URL` | For real API | Backend base URL |
| `USE_MOCK_API` | No | `true` / `1` uses the mock transport in dev |
| `WS_URL` | No | WebSocket base URL |
| `ENV` | No | Runtime label: `development`, `staging`, `production` |
| `SENTRY_DSN` | No | Enables Sentry when non-empty |
| `SENTRY_ENABLE_IN_DEV` | No | `1` sends Sentry events from `__DEV__` |
| `SENTRY_TRACES_SAMPLE_RATE` | No | Performance sampling value from `0` to `1` |
| `CODEPUSH_KEY_IOS` / `CODEPUSH_KEY_ANDROID` | No | Reserved for OTA; no CodePush SDK ships by default |

Useful docs:

* [Sentry setup](docs/OPERATIONS.md#sentry)
* [OTA / updates policy](docs/OPERATIONS.md#over-the-air-updates)
* [Publishing / discoverability](docs/OPERATIONS.md#publishing--discoverability)

---

## โŒจ๏ธ Key Commands

| Command | What it does |
| --------------------------------- | ---------------------------------- |
| `npm start` | Start Metro (cache reset) |
| `npm run ios` / `npm run android` | Run on simulator or device |
| `npm run lint` | Biome check (read-only) |
| `npm run format` | Biome format + safe fixes |
| `npm test` | Jest |
| `npx tsc --noEmit` | Typecheck |
| `npm run i18n:all` | Extract i18n keys + generate types |
| `npm run gen:icons` | Regenerate SVG icon registry |
| `npm run android:clean` | Clean Android build artifacts |

Full command reference: [docs/development.md#key-commands](docs/development.md#key-commands)

---

## ๐Ÿ” Permissions (A gift pack)
List of full existing native permissions for IOS, and Android , declare only what you actually use. Full catalog: [docs/permissions-bare-rn.md](docs/permissions-bare-rn.md)

---

## ๐Ÿ“š Documentation

| Topic | Location |
| ------------------------------------ | ---------------------------------------------------------- |
| Rules, structure & contribution flow | [AGENTS.md](AGENTS.md) |
| Developer reference | [docs/development.md](docs/development.md) |
| Offline behavior | [docs/OFFLINE.md](docs/OFFLINE.md) |
| Permissions catalog | [docs/permissions-bare-rn.md](docs/permissions-bare-rn.md) |
| Roadmap | [docs/TODO.md](docs/TODO.md) |
| Changelog | [CHANGELOG.md](CHANGELOG.md) |

---

## ๐Ÿค Contributing

Contributions welcome โ€” see [CONTRIBUTING.md](CONTRIBUTING.md) for branch/PR rules, quality checks, and PR checklist.

---

## ๐Ÿšข CI/CD & Release

GitHub Actions, local release builds, store secrets, Sentry, Maestro, OTA policy, and publishing notes: [docs/OPERATIONS.md](docs/OPERATIONS.md)

Version history: [CHANGELOG.md](CHANGELOG.md)